com.mycompany.service.impl
Class UserServiceImpl

java.lang.Object
  extended by com.mycompany.service.impl.AbstractService
      extended by com.mycompany.service.impl.UserServiceImpl
All Implemented Interfaces:
UserService

@Named(value="userService")
public class UserServiceImpl
extends AbstractService
implements UserService


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

UserServiceImpl

public UserServiceImpl()
Method Detail

findRelationshipToUser

public UserRelationship findRelationshipToUser(User user1,
                                               User user2)
Description copied from interface: UserService
Finds a UserRelationship object representing a relationship between two User objects.

Specified by:
findRelationshipToUser in interface UserService
Parameters:
user1 - The first user.
user2 - The second user.
Returns:
A UserRelationship object.

findUser

public User findUser(java.lang.String username,
                     java.lang.String password)
Description copied from interface: UserService
Finds a User with the given username and password. Used for authentication.

Specified by:
findUser in interface UserService
Parameters:
username - The username.
password - The password.
Returns:
A User object if found.

findUserById

public User findUserById(java.lang.Integer id)
Description copied from interface: UserService
Finds a User by ID.

Specified by:
findUserById in interface UserService
Parameters:
id - The user's ID.
Returns:
A User object.

findUserByUsername

public User findUserByUsername(java.lang.String username)
Description copied from interface: UserService
Finds a User by username.

Specified by:
findUserByUsername in interface UserService
Parameters:
username - The username.
Returns:
A User object.

findUsers

public java.util.List<User> findUsers()
Description copied from interface: UserService
Finds a List of all User objects.

Specified by:
findUsers in interface UserService
Returns:
A List of User objects.

findUsersByName

public java.util.List<User> findUsersByName(java.lang.String suggest)
Description copied from interface: UserService
Finds a List of User objects that have a first name or last name that partially matches the suggestion string.

Specified by:
findUsersByName in interface UserService
Parameters:
suggest - The partial string.
Returns:
A List of User objects.

findUsersByType

public java.util.List<User> findUsersByType(RelationshipType type,
                                            User user)
Description copied from interface: UserService
Finds a List of User objects that are related to the User according to the specified RelationshipType.

Specified by:
findUsersByType in interface UserService
Parameters:
type - The RelationshipType object.
user - The User object.
Returns:
A List of User objects.

saveRelationship

public UserRelationship saveRelationship(UserRelationship relationship)
Description copied from interface: UserService
Saves a UserRelationship object.

Specified by:
saveRelationship in interface UserService
Parameters:
relationship - The UserRelationship to save.
Returns:
The saved object.

saveUser

public User saveUser(User user)
Description copied from interface: UserService
Saves a User object.

Specified by:
saveUser in interface UserService
Parameters:
user - The user to save.
Returns:
The saved object.