|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mycompany.service.impl.AbstractService
com.mycompany.service.impl.UserServiceImpl
@Named(value="userService") public class UserServiceImpl
User service implementation class.
Constructor Summary | |
---|---|
UserServiceImpl()
|
Method Summary | |
---|---|
UserRelationship |
findRelationshipToUser(User user1,
User user2)
Finds a UserRelationship object representing a relationship
between two User objects. |
User |
findUser(java.lang.String username,
java.lang.String password)
Finds a User with the given username and password. |
User |
findUserById(java.lang.Integer id)
Finds a User by ID. |
User |
findUserByUsername(java.lang.String username)
Finds a User by username. |
java.util.List<User> |
findUsers()
Finds a List of all User objects. |
java.util.List<User> |
findUsersByName(java.lang.String suggest)
Finds a List of User objects that have a first name or last name
that partially matches the suggestion string. |
java.util.List<User> |
findUsersByType(RelationshipType type,
User user)
Finds a List of User objects that are related to the User
according to the specified RelationshipType . |
UserRelationship |
saveRelationship(UserRelationship relationship)
Saves a UserRelationship object. |
User |
saveUser(User user)
Saves a User object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserServiceImpl()
Method Detail |
---|
public UserRelationship findRelationshipToUser(User user1, User user2)
UserRelationship
object representing a relationship
between two User
objects.
findRelationshipToUser
in interface UserService
user1
- The first user.user2
- The second user.
public User findUser(java.lang.String username, java.lang.String password)
User
with the given username and password. Used for
authentication.
findUser
in interface UserService
username
- The username.password
- The password.
public User findUserById(java.lang.Integer id)
User
by ID.
findUserById
in interface UserService
id
- The user's ID.
public User findUserByUsername(java.lang.String username)
User
by username.
findUserByUsername
in interface UserService
username
- The username.
public java.util.List<User> findUsers()
User
objects.
findUsers
in interface UserService
public java.util.List<User> findUsersByName(java.lang.String suggest)
User
objects that have a first name or last name
that partially matches the suggestion string.
findUsersByName
in interface UserService
suggest
- The partial string.
public java.util.List<User> findUsersByType(RelationshipType type, User user)
User
objects that are related to the User
according to the specified RelationshipType
.
findUsersByType
in interface UserService
type
- The RelationshipType
object.user
- The User
object.
User
objects.public UserRelationship saveRelationship(UserRelationship relationship)
UserRelationship
object.
saveRelationship
in interface UserService
relationship
- The UserRelationship to save.
public User saveUser(User user)
User
object.
saveUser
in interface UserService
user
- The user to save.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |