Liferay 6.0.5

com.liferay.portal.service.persistence
Class UserUtil

java.lang.Object
  extended by com.liferay.portal.service.persistence.UserUtil

public class UserUtil
extends Object

The persistence utility for the user service. This utility wraps UserPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class.

Caching information and settings can be found in portal.properties

See Also:
UserPersistence, UserPersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Constructor Summary
UserUtil()
           
 
Method Summary
static void addGroup(long pk, Group group)
          Adds an association between the user and the group.
static void addGroup(long pk, long groupPK)
          Adds an association between the user and the group.
static void addGroups(long pk, List<Group> groups)
          Adds an association between the user and the groups.
static void addGroups(long pk, long[] groupPKs)
          Adds an association between the user and the groups.
static void addOrganization(long pk, long organizationPK)
          Adds an association between the user and the organization.
static void addOrganization(long pk, Organization organization)
          Adds an association between the user and the organization.
static void addOrganizations(long pk, List<Organization> organizations)
          Adds an association between the user and the organizations.
static void addOrganizations(long pk, long[] organizationPKs)
          Adds an association between the user and the organizations.
static void addPermission(long pk, long permissionPK)
          Adds an association between the user and the permission.
static void addPermission(long pk, Permission permission)
          Adds an association between the user and the permission.
static void addPermissions(long pk, List<Permission> permissions)
          Adds an association between the user and the permissions.
static void addPermissions(long pk, long[] permissionPKs)
          Adds an association between the user and the permissions.
static void addRole(long pk, long rolePK)
          Adds an association between the user and the role.
static void addRole(long pk, Role role)
          Adds an association between the user and the role.
static void addRoles(long pk, List<Role> roles)
          Adds an association between the user and the roles.
static void addRoles(long pk, long[] rolePKs)
          Adds an association between the user and the roles.
static void addTeam(long pk, long teamPK)
          Adds an association between the user and the team.
static void addTeam(long pk, Team team)
          Adds an association between the user and the team.
static void addTeams(long pk, List<Team> teams)
          Adds an association between the user and the teams.
static void addTeams(long pk, long[] teamPKs)
          Adds an association between the user and the teams.
static void addUserGroup(long pk, long userGroupPK)
          Adds an association between the user and the user group.
static void addUserGroup(long pk, UserGroup userGroup)
          Adds an association between the user and the user group.
static void addUserGroups(long pk, List<UserGroup> userGroups)
          Adds an association between the user and the user groups.
static void addUserGroups(long pk, long[] userGroupPKs)
          Adds an association between the user and the user groups.
static void cacheResult(List<User> users)
          Caches the users in the entity cache if it is enabled.
static void cacheResult(User user)
          Caches the user in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(User user)
           
static void clearGroups(long pk)
          Clears all associations between the user and its groups.
static void clearOrganizations(long pk)
          Clears all associations between the user and its organizations.
static void clearPermissions(long pk)
          Clears all associations between the user and its permissions.
static void clearRoles(long pk)
          Clears all associations between the user and its roles.
static void clearTeams(long pk)
          Clears all associations between the user and its teams.
static void clearUserGroups(long pk)
          Clears all associations between the user and its user groups.
static boolean containsGroup(long pk, long groupPK)
          Determines whether the group is associated with the user.
static boolean containsGroups(long pk)
          Determines whether the user has any groups associated with it.
static boolean containsOrganization(long pk, long organizationPK)
          Determines whether the organization is associated with the user.
static boolean containsOrganizations(long pk)
          Determines whether the user has any organizations associated with it.
static boolean containsPermission(long pk, long permissionPK)
          Determines whether the permission is associated with the user.
static boolean containsPermissions(long pk)
          Determines whether the user has any permissions associated with it.
static boolean containsRole(long pk, long rolePK)
          Determines whether the role is associated with the user.
static boolean containsRoles(long pk)
          Determines whether the user has any roles associated with it.
static boolean containsTeam(long pk, long teamPK)
          Determines whether the team is associated with the user.
static boolean containsTeams(long pk)
          Determines whether the user has any teams associated with it.
static boolean containsUserGroup(long pk, long userGroupPK)
          Determines whether the user group is associated with the user.
static boolean containsUserGroups(long pk)
          Determines whether the user has any user groups associated with it.
static int countAll()
          Counts all the users.
static int countByC_A(long companyId, boolean active)
          Counts all the users where companyId = ? and active = ?.
static int countByC_DU(long companyId, boolean defaultUser)
          Counts all the users where companyId = ? and defaultUser = ?.
static int countByC_EA(long companyId, String emailAddress)
          Counts all the users where companyId = ? and emailAddress = ?.
static int countByC_FID(long companyId, long facebookId)
          Counts all the users where companyId = ? and facebookId = ?.
static int countByC_O(long companyId, String openId)
          Counts all the users where companyId = ? and openId = ?.
static int countByC_SN(long companyId, String screenName)
          Counts all the users where companyId = ? and screenName = ?.
static int countByC_U(long companyId, long userId)
          Counts all the users where companyId = ? and userId = ?.
static int countByCompanyId(long companyId)
          Counts all the users where companyId = ?.
static int countByContactId(long contactId)
          Counts all the users where contactId = ?.
static int countByEmailAddress(String emailAddress)
          Counts all the users where emailAddress = ?.
static int countByPortraitId(long portraitId)
          Counts all the users where portraitId = ?.
static int countByUuid(String uuid)
          Counts all the users where uuid = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static User create(long userId)
          Creates a new user with the primary key.
static User fetchByC_DU(long companyId, boolean defaultUser)
          Finds the user where companyId = ? and defaultUser = ? or returns null if it could not be found.
static User fetchByC_DU(long companyId, boolean defaultUser, boolean retrieveFromCache)
          Finds the user where companyId = ? and defaultUser = ? or returns null if it could not be found, optionally using the finder cache.
static User fetchByC_EA(long companyId, String emailAddress)
          Finds the user where companyId = ? and emailAddress = ? or returns null if it could not be found.
static User fetchByC_EA(long companyId, String emailAddress, boolean retrieveFromCache)
          Finds the user where companyId = ? and emailAddress = ? or returns null if it could not be found, optionally using the finder cache.
static User fetchByC_FID(long companyId, long facebookId)
          Finds the user where companyId = ? and facebookId = ? or returns null if it could not be found.
static User fetchByC_FID(long companyId, long facebookId, boolean retrieveFromCache)
          Finds the user where companyId = ? and facebookId = ? or returns null if it could not be found, optionally using the finder cache.
static User fetchByC_O(long companyId, String openId)
          Finds the user where companyId = ? and openId = ? or returns null if it could not be found.
static User fetchByC_O(long companyId, String openId, boolean retrieveFromCache)
          Finds the user where companyId = ? and openId = ? or returns null if it could not be found, optionally using the finder cache.
static User fetchByC_SN(long companyId, String screenName)
          Finds the user where companyId = ? and screenName = ? or returns null if it could not be found.
static User fetchByC_SN(long companyId, String screenName, boolean retrieveFromCache)
          Finds the user where companyId = ? and screenName = ? or returns null if it could not be found, optionally using the finder cache.
static User fetchByC_U(long companyId, long userId)
          Finds the user where companyId = ? and userId = ? or returns null if it could not be found.
static User fetchByC_U(long companyId, long userId, boolean retrieveFromCache)
          Finds the user where companyId = ? and userId = ? or returns null if it could not be found, optionally using the finder cache.
static User fetchByContactId(long contactId)
          Finds the user where contactId = ? or returns null if it could not be found.
static User fetchByContactId(long contactId, boolean retrieveFromCache)
          Finds the user where contactId = ? or returns null if it could not be found, optionally using the finder cache.
static User fetchByPortraitId(long portraitId)
          Finds the user where portraitId = ? or returns null if it could not be found.
static User fetchByPortraitId(long portraitId, boolean retrieveFromCache)
          Finds the user where portraitId = ? or returns null if it could not be found, optionally using the finder cache.
static User fetchByPrimaryKey(long userId)
          Finds the user with the primary key or returns null if it could not be found.
static List<User> findAll()
          Finds all the users.
static List<User> findAll(int start, int end)
          Finds a range of all the users.
static List<User> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the users.
static User findByC_A_First(long companyId, boolean active, OrderByComparator orderByComparator)
          Finds the first user in the ordered set where companyId = ? and active = ?.
static User findByC_A_Last(long companyId, boolean active, OrderByComparator orderByComparator)
          Finds the last user in the ordered set where companyId = ? and active = ?.
static User[] findByC_A_PrevAndNext(long userId, long companyId, boolean active, OrderByComparator orderByComparator)
          Finds the users before and after the current user in the ordered set where companyId = ? and active = ?.
static List<User> findByC_A(long companyId, boolean active)
          Finds all the users where companyId = ? and active = ?.
static List<User> findByC_A(long companyId, boolean active, int start, int end)
          Finds a range of all the users where companyId = ? and active = ?.
static List<User> findByC_A(long companyId, boolean active, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the users where companyId = ? and active = ?.
static User findByC_DU(long companyId, boolean defaultUser)
          Finds the user where companyId = ? and defaultUser = ? or throws a NoSuchUserException if it could not be found.
static User findByC_EA(long companyId, String emailAddress)
          Finds the user where companyId = ? and emailAddress = ? or throws a NoSuchUserException if it could not be found.
static User findByC_FID(long companyId, long facebookId)
          Finds the user where companyId = ? and facebookId = ? or throws a NoSuchUserException if it could not be found.
static User findByC_O(long companyId, String openId)
          Finds the user where companyId = ? and openId = ? or throws a NoSuchUserException if it could not be found.
static User findByC_SN(long companyId, String screenName)
          Finds the user where companyId = ? and screenName = ? or throws a NoSuchUserException if it could not be found.
static User findByC_U(long companyId, long userId)
          Finds the user where companyId = ? and userId = ? or throws a NoSuchUserException if it could not be found.
static User findByCompanyId_First(long companyId, OrderByComparator orderByComparator)
          Finds the first user in the ordered set where companyId = ?.
static User findByCompanyId_Last(long companyId, OrderByComparator orderByComparator)
          Finds the last user in the ordered set where companyId = ?.
static User[] findByCompanyId_PrevAndNext(long userId, long companyId, OrderByComparator orderByComparator)
          Finds the users before and after the current user in the ordered set where companyId = ?.
static List<User> findByCompanyId(long companyId)
          Finds all the users where companyId = ?.
static List<User> findByCompanyId(long companyId, int start, int end)
          Finds a range of all the users where companyId = ?.
static List<User> findByCompanyId(long companyId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the users where companyId = ?.
static User findByContactId(long contactId)
          Finds the user where contactId = ? or throws a NoSuchUserException if it could not be found.
static User findByEmailAddress_First(String emailAddress, OrderByComparator orderByComparator)
          Finds the first user in the ordered set where emailAddress = ?.
static User findByEmailAddress_Last(String emailAddress, OrderByComparator orderByComparator)
          Finds the last user in the ordered set where emailAddress = ?.
static User[] findByEmailAddress_PrevAndNext(long userId, String emailAddress, OrderByComparator orderByComparator)
          Finds the users before and after the current user in the ordered set where emailAddress = ?.
static List<User> findByEmailAddress(String emailAddress)
          Finds all the users where emailAddress = ?.
static List<User> findByEmailAddress(String emailAddress, int start, int end)
          Finds a range of all the users where emailAddress = ?.
static List<User> findByEmailAddress(String emailAddress, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the users where emailAddress = ?.
static User findByPortraitId(long portraitId)
          Finds the user where portraitId = ? or throws a NoSuchUserException if it could not be found.
static User findByPrimaryKey(long userId)
          Finds the user with the primary key or throws a NoSuchUserException if it could not be found.
static User findByUuid_First(String uuid, OrderByComparator orderByComparator)
          Finds the first user in the ordered set where uuid = ?.
static User findByUuid_Last(String uuid, OrderByComparator orderByComparator)
          Finds the last user in the ordered set where uuid = ?.
static User[] findByUuid_PrevAndNext(long userId, String uuid, OrderByComparator orderByComparator)
          Finds the users before and after the current user in the ordered set where uuid = ?.
static List<User> findByUuid(String uuid)
          Finds all the users where uuid = ?.
static List<User> findByUuid(String uuid, int start, int end)
          Finds a range of all the users where uuid = ?.
static List<User> findByUuid(String uuid, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the users where uuid = ?.
static List<User> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<User> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<User> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static List<Group> getGroups(long pk)
          Gets all the groups associated with the user.
static List<Group> getGroups(long pk, int start, int end)
          Gets a range of all the groups associated with the user.
static List<Group> getGroups(long pk, int start, int end, OrderByComparator orderByComparator)
          Gets an ordered range of all the groups associated with the user.
static int getGroupsSize(long pk)
          Gets the number of groups associated with the user.
static List<Organization> getOrganizations(long pk)
          Gets all the organizations associated with the user.
static List<Organization> getOrganizations(long pk, int start, int end)
          Gets a range of all the organizations associated with the user.
static List<Organization> getOrganizations(long pk, int start, int end, OrderByComparator orderByComparator)
          Gets an ordered range of all the organizations associated with the user.
static int getOrganizationsSize(long pk)
          Gets the number of organizations associated with the user.
static List<Permission> getPermissions(long pk)
          Gets all the permissions associated with the user.
static List<Permission> getPermissions(long pk, int start, int end)
          Gets a range of all the permissions associated with the user.
static List<Permission> getPermissions(long pk, int start, int end, OrderByComparator orderByComparator)
          Gets an ordered range of all the permissions associated with the user.
static int getPermissionsSize(long pk)
          Gets the number of permissions associated with the user.
static UserPersistence getPersistence()
           
static List<Role> getRoles(long pk)
          Gets all the roles associated with the user.
static List<Role> getRoles(long pk, int start, int end)
          Gets a range of all the roles associated with the user.
static List<Role> getRoles(long pk, int start, int end, OrderByComparator orderByComparator)
          Gets an ordered range of all the roles associated with the user.
static int getRolesSize(long pk)
          Gets the number of roles associated with the user.
static List<Team> getTeams(long pk)
          Gets all the teams associated with the user.
static List<Team> getTeams(long pk, int start, int end)
          Gets a range of all the teams associated with the user.
static List<Team> getTeams(long pk, int start, int end, OrderByComparator orderByComparator)
          Gets an ordered range of all the teams associated with the user.
static int getTeamsSize(long pk)
          Gets the number of teams associated with the user.
static List<UserGroup> getUserGroups(long pk)
          Gets all the user groups associated with the user.
static List<UserGroup> getUserGroups(long pk, int start, int end)
          Gets a range of all the user groups associated with the user.
static List<UserGroup> getUserGroups(long pk, int start, int end, OrderByComparator orderByComparator)
          Gets an ordered range of all the user groups associated with the user.
static int getUserGroupsSize(long pk)
          Gets the number of user groups associated with the user.
static User remove(long userId)
          Removes the user with the primary key from the database.
static User remove(User user)
           
static void removeAll()
          Removes all the users from the database.
static void removeByC_A(long companyId, boolean active)
          Removes all the users where companyId = ? and active = ? from the database.
static void removeByC_DU(long companyId, boolean defaultUser)
          Removes the user where companyId = ? and defaultUser = ? from the database.
static void removeByC_EA(long companyId, String emailAddress)
          Removes the user where companyId = ? and emailAddress = ? from the database.
static void removeByC_FID(long companyId, long facebookId)
          Removes the user where companyId = ? and facebookId = ? from the database.
static void removeByC_O(long companyId, String openId)
          Removes the user where companyId = ? and openId = ? from the database.
static void removeByC_SN(long companyId, String screenName)
          Removes the user where companyId = ? and screenName = ? from the database.
static void removeByC_U(long companyId, long userId)
          Removes the user where companyId = ? and userId = ? from the database.
static void removeByCompanyId(long companyId)
          Removes all the users where companyId = ? from the database.
static void removeByContactId(long contactId)
          Removes the user where contactId = ? from the database.
static void removeByEmailAddress(String emailAddress)
          Removes all the users where emailAddress = ? from the database.
static void removeByPortraitId(long portraitId)
          Removes the user where portraitId = ? from the database.
static void removeByUuid(String uuid)
          Removes all the users where uuid = ? from the database.
static void removeGroup(long pk, Group group)
          Removes the association between the user and the group.
static void removeGroup(long pk, long groupPK)
          Removes the association between the user and the group.
static void removeGroups(long pk, List<Group> groups)
          Removes the association between the user and the groups.
static void removeGroups(long pk, long[] groupPKs)
          Removes the association between the user and the groups.
static void removeOrganization(long pk, long organizationPK)
          Removes the association between the user and the organization.
static void removeOrganization(long pk, Organization organization)
          Removes the association between the user and the organization.
static void removeOrganizations(long pk, List<Organization> organizations)
          Removes the association between the user and the organizations.
static void removeOrganizations(long pk, long[] organizationPKs)
          Removes the association between the user and the organizations.
static void removePermission(long pk, long permissionPK)
          Removes the association between the user and the permission.
static void removePermission(long pk, Permission permission)
          Removes the association between the user and the permission.
static void removePermissions(long pk, List<Permission> permissions)
          Removes the association between the user and the permissions.
static void removePermissions(long pk, long[] permissionPKs)
          Removes the association between the user and the permissions.
static void removeRole(long pk, long rolePK)
          Removes the association between the user and the role.
static void removeRole(long pk, Role role)
          Removes the association between the user and the role.
static void removeRoles(long pk, List<Role> roles)
          Removes the association between the user and the roles.
static void removeRoles(long pk, long[] rolePKs)
          Removes the association between the user and the roles.
static void removeTeam(long pk, long teamPK)
          Removes the association between the user and the team.
static void removeTeam(long pk, Team team)
          Removes the association between the user and the team.
static void removeTeams(long pk, List<Team> teams)
          Removes the association between the user and the teams.
static void removeTeams(long pk, long[] teamPKs)
          Removes the association between the user and the teams.
static void removeUserGroup(long pk, long userGroupPK)
          Removes the association between the user and the user group.
static void removeUserGroup(long pk, UserGroup userGroup)
          Removes the association between the user and the user group.
static void removeUserGroups(long pk, List<UserGroup> userGroups)
          Removes the association between the user and the user groups.
static void removeUserGroups(long pk, long[] userGroupPKs)
          Removes the association between the user and the user groups.
static void setGroups(long pk, List<Group> groups)
          Sets the groups associated with the user, removing and adding associations as necessary.
static void setGroups(long pk, long[] groupPKs)
          Sets the groups associated with the user, removing and adding associations as necessary.
static void setOrganizations(long pk, List<Organization> organizations)
          Sets the organizations associated with the user, removing and adding associations as necessary.
static void setOrganizations(long pk, long[] organizationPKs)
          Sets the organizations associated with the user, removing and adding associations as necessary.
static void setPermissions(long pk, List<Permission> permissions)
          Sets the permissions associated with the user, removing and adding associations as necessary.
static void setPermissions(long pk, long[] permissionPKs)
          Sets the permissions associated with the user, removing and adding associations as necessary.
 void setPersistence(UserPersistence persistence)
           
static void setRoles(long pk, List<Role> roles)
          Sets the roles associated with the user, removing and adding associations as necessary.
static void setRoles(long pk, long[] rolePKs)
          Sets the roles associated with the user, removing and adding associations as necessary.
static void setTeams(long pk, List<Team> teams)
          Sets the teams associated with the user, removing and adding associations as necessary.
static void setTeams(long pk, long[] teamPKs)
          Sets the teams associated with the user, removing and adding associations as necessary.
static void setUserGroups(long pk, List<UserGroup> userGroups)
          Sets the user groups associated with the user, removing and adding associations as necessary.
static void setUserGroups(long pk, long[] userGroupPKs)
          Sets the user groups associated with the user, removing and adding associations as necessary.
static User update(User user, boolean merge)
           
static User update(User user, boolean merge, ServiceContext serviceContext)
           
static User updateImpl(User user, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserUtil

public UserUtil()
Method Detail

clearCache

public static void clearCache()
See Also:
BasePersistence.clearCache()

clearCache

public static void clearCache(User user)
See Also:
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)

countWithDynamicQuery

public long countWithDynamicQuery(DynamicQuery dynamicQuery)
                           throws SystemException
Throws:
SystemException
See Also:
BasePersistence.countWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<User> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                       throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

public static List<User> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                              int start,
                                              int end)
                                       throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)

findWithDynamicQuery

public static List<User> findWithDynamicQuery(DynamicQuery dynamicQuery,
                                              int start,
                                              int end,
                                              OrderByComparator orderByComparator)
                                       throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)

remove

public static User remove(User user)
                   throws SystemException
Throws:
SystemException
See Also:
BasePersistence.remove(com.liferay.portal.model.BaseModel)

update

public static User update(User user,
                          boolean merge)
                   throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean)

update

public static User update(User user,
                          boolean merge,
                          ServiceContext serviceContext)
                   throws SystemException
Throws:
SystemException
See Also:
BasePersistence.update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)

cacheResult

public static void cacheResult(User user)
Caches the user in the entity cache if it is enabled.

Parameters:
user - the user to cache

cacheResult

public static void cacheResult(List<User> users)
Caches the users in the entity cache if it is enabled.

Parameters:
users - the users to cache

create

public static User create(long userId)
Creates a new user with the primary key. Does not add the user to the database.

Parameters:
userId - the primary key for the new user
Returns:
the new user

remove

public static User remove(long userId)
                   throws NoSuchUserException,
                          SystemException
Removes the user with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
userId - the primary key of the user to remove
Returns:
the user that was removed
Throws:
NoSuchUserException - if a user with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static User updateImpl(User user,
                              boolean merge)
                       throws SystemException
Throws:
SystemException

findByPrimaryKey

public static User findByPrimaryKey(long userId)
                             throws NoSuchUserException,
                                    SystemException
Finds the user with the primary key or throws a NoSuchUserException if it could not be found.

Parameters:
userId - the primary key of the user to find
Returns:
the user
Throws:
NoSuchUserException - if a user with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static User fetchByPrimaryKey(long userId)
                              throws SystemException
Finds the user with the primary key or returns null if it could not be found.

Parameters:
userId - the primary key of the user to find
Returns:
the user, or null if a user with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByUuid

public static List<User> findByUuid(String uuid)
                             throws SystemException
Finds all the users where uuid = ?.

Parameters:
uuid - the uuid to search with
Returns:
the matching users
Throws:
SystemException - if a system exception occurred

findByUuid

public static List<User> findByUuid(String uuid,
                                    int start,
                                    int end)
                             throws SystemException
Finds a range of all the users where uuid = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
uuid - the uuid to search with
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of matching users
Throws:
SystemException - if a system exception occurred

findByUuid

public static List<User> findByUuid(String uuid,
                                    int start,
                                    int end,
                                    OrderByComparator orderByComparator)
                             throws SystemException
Finds an ordered range of all the users where uuid = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
uuid - the uuid to search with
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching users
Throws:
SystemException - if a system exception occurred

findByUuid_First

public static User findByUuid_First(String uuid,
                                    OrderByComparator orderByComparator)
                             throws NoSuchUserException,
                                    SystemException
Finds the first user in the ordered set where uuid = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
uuid - the uuid to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

findByUuid_Last

public static User findByUuid_Last(String uuid,
                                   OrderByComparator orderByComparator)
                            throws NoSuchUserException,
                                   SystemException
Finds the last user in the ordered set where uuid = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
uuid - the uuid to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

findByUuid_PrevAndNext

public static User[] findByUuid_PrevAndNext(long userId,
                                            String uuid,
                                            OrderByComparator orderByComparator)
                                     throws NoSuchUserException,
                                            SystemException
Finds the users before and after the current user in the ordered set where uuid = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
userId - the primary key of the current user
uuid - the uuid to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next user
Throws:
NoSuchUserException - if a user with the primary key could not be found
SystemException - if a system exception occurred

findByCompanyId

public static List<User> findByCompanyId(long companyId)
                                  throws SystemException
Finds all the users where companyId = ?.

Parameters:
companyId - the company id to search with
Returns:
the matching users
Throws:
SystemException - if a system exception occurred

findByCompanyId

public static List<User> findByCompanyId(long companyId,
                                         int start,
                                         int end)
                                  throws SystemException
Finds a range of all the users where companyId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the company id to search with
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of matching users
Throws:
SystemException - if a system exception occurred

findByCompanyId

public static List<User> findByCompanyId(long companyId,
                                         int start,
                                         int end,
                                         OrderByComparator orderByComparator)
                                  throws SystemException
Finds an ordered range of all the users where companyId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the company id to search with
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching users
Throws:
SystemException - if a system exception occurred

findByCompanyId_First

public static User findByCompanyId_First(long companyId,
                                         OrderByComparator orderByComparator)
                                  throws NoSuchUserException,
                                         SystemException
Finds the first user in the ordered set where companyId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the company id to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

findByCompanyId_Last

public static User findByCompanyId_Last(long companyId,
                                        OrderByComparator orderByComparator)
                                 throws NoSuchUserException,
                                        SystemException
Finds the last user in the ordered set where companyId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the company id to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

findByCompanyId_PrevAndNext

public static User[] findByCompanyId_PrevAndNext(long userId,
                                                 long companyId,
                                                 OrderByComparator orderByComparator)
                                          throws NoSuchUserException,
                                                 SystemException
Finds the users before and after the current user in the ordered set where companyId = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
userId - the primary key of the current user
companyId - the company id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next user
Throws:
NoSuchUserException - if a user with the primary key could not be found
SystemException - if a system exception occurred

findByContactId

public static User findByContactId(long contactId)
                            throws NoSuchUserException,
                                   SystemException
Finds the user where contactId = ? or throws a NoSuchUserException if it could not be found.

Parameters:
contactId - the contact id to search with
Returns:
the matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

fetchByContactId

public static User fetchByContactId(long contactId)
                             throws SystemException
Finds the user where contactId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
contactId - the contact id to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

fetchByContactId

public static User fetchByContactId(long contactId,
                                    boolean retrieveFromCache)
                             throws SystemException
Finds the user where contactId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
contactId - the contact id to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

findByEmailAddress

public static List<User> findByEmailAddress(String emailAddress)
                                     throws SystemException
Finds all the users where emailAddress = ?.

Parameters:
emailAddress - the email address to search with
Returns:
the matching users
Throws:
SystemException - if a system exception occurred

findByEmailAddress

public static List<User> findByEmailAddress(String emailAddress,
                                            int start,
                                            int end)
                                     throws SystemException
Finds a range of all the users where emailAddress = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
emailAddress - the email address to search with
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of matching users
Throws:
SystemException - if a system exception occurred

findByEmailAddress

public static List<User> findByEmailAddress(String emailAddress,
                                            int start,
                                            int end,
                                            OrderByComparator orderByComparator)
                                     throws SystemException
Finds an ordered range of all the users where emailAddress = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
emailAddress - the email address to search with
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching users
Throws:
SystemException - if a system exception occurred

findByEmailAddress_First

public static User findByEmailAddress_First(String emailAddress,
                                            OrderByComparator orderByComparator)
                                     throws NoSuchUserException,
                                            SystemException
Finds the first user in the ordered set where emailAddress = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
emailAddress - the email address to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

findByEmailAddress_Last

public static User findByEmailAddress_Last(String emailAddress,
                                           OrderByComparator orderByComparator)
                                    throws NoSuchUserException,
                                           SystemException
Finds the last user in the ordered set where emailAddress = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
emailAddress - the email address to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

findByEmailAddress_PrevAndNext

public static User[] findByEmailAddress_PrevAndNext(long userId,
                                                    String emailAddress,
                                                    OrderByComparator orderByComparator)
                                             throws NoSuchUserException,
                                                    SystemException
Finds the users before and after the current user in the ordered set where emailAddress = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
userId - the primary key of the current user
emailAddress - the email address to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next user
Throws:
NoSuchUserException - if a user with the primary key could not be found
SystemException - if a system exception occurred

findByPortraitId

public static User findByPortraitId(long portraitId)
                             throws NoSuchUserException,
                                    SystemException
Finds the user where portraitId = ? or throws a NoSuchUserException if it could not be found.

Parameters:
portraitId - the portrait id to search with
Returns:
the matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

fetchByPortraitId

public static User fetchByPortraitId(long portraitId)
                              throws SystemException
Finds the user where portraitId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
portraitId - the portrait id to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

fetchByPortraitId

public static User fetchByPortraitId(long portraitId,
                                     boolean retrieveFromCache)
                              throws SystemException
Finds the user where portraitId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
portraitId - the portrait id to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

findByC_U

public static User findByC_U(long companyId,
                             long userId)
                      throws NoSuchUserException,
                             SystemException
Finds the user where companyId = ? and userId = ? or throws a NoSuchUserException if it could not be found.

Parameters:
companyId - the company id to search with
userId - the user id to search with
Returns:
the matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

fetchByC_U

public static User fetchByC_U(long companyId,
                              long userId)
                       throws SystemException
Finds the user where companyId = ? and userId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company id to search with
userId - the user id to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_U

public static User fetchByC_U(long companyId,
                              long userId,
                              boolean retrieveFromCache)
                       throws SystemException
Finds the user where companyId = ? and userId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company id to search with
userId - the user id to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

findByC_DU

public static User findByC_DU(long companyId,
                              boolean defaultUser)
                       throws NoSuchUserException,
                              SystemException
Finds the user where companyId = ? and defaultUser = ? or throws a NoSuchUserException if it could not be found.

Parameters:
companyId - the company id to search with
defaultUser - the default user to search with
Returns:
the matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

fetchByC_DU

public static User fetchByC_DU(long companyId,
                               boolean defaultUser)
                        throws SystemException
Finds the user where companyId = ? and defaultUser = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company id to search with
defaultUser - the default user to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_DU

public static User fetchByC_DU(long companyId,
                               boolean defaultUser,
                               boolean retrieveFromCache)
                        throws SystemException
Finds the user where companyId = ? and defaultUser = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company id to search with
defaultUser - the default user to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

findByC_SN

public static User findByC_SN(long companyId,
                              String screenName)
                       throws NoSuchUserException,
                              SystemException
Finds the user where companyId = ? and screenName = ? or throws a NoSuchUserException if it could not be found.

Parameters:
companyId - the company id to search with
screenName - the screen name to search with
Returns:
the matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

fetchByC_SN

public static User fetchByC_SN(long companyId,
                               String screenName)
                        throws SystemException
Finds the user where companyId = ? and screenName = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company id to search with
screenName - the screen name to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_SN

public static User fetchByC_SN(long companyId,
                               String screenName,
                               boolean retrieveFromCache)
                        throws SystemException
Finds the user where companyId = ? and screenName = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company id to search with
screenName - the screen name to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

findByC_EA

public static User findByC_EA(long companyId,
                              String emailAddress)
                       throws NoSuchUserException,
                              SystemException
Finds the user where companyId = ? and emailAddress = ? or throws a NoSuchUserException if it could not be found.

Parameters:
companyId - the company id to search with
emailAddress - the email address to search with
Returns:
the matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

fetchByC_EA

public static User fetchByC_EA(long companyId,
                               String emailAddress)
                        throws SystemException
Finds the user where companyId = ? and emailAddress = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company id to search with
emailAddress - the email address to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_EA

public static User fetchByC_EA(long companyId,
                               String emailAddress,
                               boolean retrieveFromCache)
                        throws SystemException
Finds the user where companyId = ? and emailAddress = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company id to search with
emailAddress - the email address to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

findByC_FID

public static User findByC_FID(long companyId,
                               long facebookId)
                        throws NoSuchUserException,
                               SystemException
Finds the user where companyId = ? and facebookId = ? or throws a NoSuchUserException if it could not be found.

Parameters:
companyId - the company id to search with
facebookId - the facebook id to search with
Returns:
the matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

fetchByC_FID

public static User fetchByC_FID(long companyId,
                                long facebookId)
                         throws SystemException
Finds the user where companyId = ? and facebookId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company id to search with
facebookId - the facebook id to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_FID

public static User fetchByC_FID(long companyId,
                                long facebookId,
                                boolean retrieveFromCache)
                         throws SystemException
Finds the user where companyId = ? and facebookId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company id to search with
facebookId - the facebook id to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

findByC_O

public static User findByC_O(long companyId,
                             String openId)
                      throws NoSuchUserException,
                             SystemException
Finds the user where companyId = ? and openId = ? or throws a NoSuchUserException if it could not be found.

Parameters:
companyId - the company id to search with
openId - the open id to search with
Returns:
the matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

fetchByC_O

public static User fetchByC_O(long companyId,
                              String openId)
                       throws SystemException
Finds the user where companyId = ? and openId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company id to search with
openId - the open id to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_O

public static User fetchByC_O(long companyId,
                              String openId,
                              boolean retrieveFromCache)
                       throws SystemException
Finds the user where companyId = ? and openId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company id to search with
openId - the open id to search with
Returns:
the matching user, or null if a matching user could not be found
Throws:
SystemException - if a system exception occurred

findByC_A

public static List<User> findByC_A(long companyId,
                                   boolean active)
                            throws SystemException
Finds all the users where companyId = ? and active = ?.

Parameters:
companyId - the company id to search with
active - the active to search with
Returns:
the matching users
Throws:
SystemException - if a system exception occurred

findByC_A

public static List<User> findByC_A(long companyId,
                                   boolean active,
                                   int start,
                                   int end)
                            throws SystemException
Finds a range of all the users where companyId = ? and active = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the company id to search with
active - the active to search with
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of matching users
Throws:
SystemException - if a system exception occurred

findByC_A

public static List<User> findByC_A(long companyId,
                                   boolean active,
                                   int start,
                                   int end,
                                   OrderByComparator orderByComparator)
                            throws SystemException
Finds an ordered range of all the users where companyId = ? and active = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the company id to search with
active - the active to search with
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching users
Throws:
SystemException - if a system exception occurred

findByC_A_First

public static User findByC_A_First(long companyId,
                                   boolean active,
                                   OrderByComparator orderByComparator)
                            throws NoSuchUserException,
                                   SystemException
Finds the first user in the ordered set where companyId = ? and active = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the company id to search with
active - the active to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

findByC_A_Last

public static User findByC_A_Last(long companyId,
                                  boolean active,
                                  OrderByComparator orderByComparator)
                           throws NoSuchUserException,
                                  SystemException
Finds the last user in the ordered set where companyId = ? and active = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
companyId - the company id to search with
active - the active to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching user
Throws:
NoSuchUserException - if a matching user could not be found
SystemException - if a system exception occurred

findByC_A_PrevAndNext

public static User[] findByC_A_PrevAndNext(long userId,
                                           long companyId,
                                           boolean active,
                                           OrderByComparator orderByComparator)
                                    throws NoSuchUserException,
                                           SystemException
Finds the users before and after the current user in the ordered set where companyId = ? and active = ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
userId - the primary key of the current user
companyId - the company id to search with
active - the active to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next user
Throws:
NoSuchUserException - if a user with the primary key could not be found
SystemException - if a system exception occurred

findAll

public static List<User> findAll()
                          throws SystemException
Finds all the users.

Returns:
the users
Throws:
SystemException - if a system exception occurred

findAll

public static List<User> findAll(int start,
                                 int end)
                          throws SystemException
Finds a range of all the users.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of users
Throws:
SystemException - if a system exception occurred

findAll

public static List<User> findAll(int start,
                                 int end,
                                 OrderByComparator orderByComparator)
                          throws SystemException
Finds an ordered range of all the users.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of users
Throws:
SystemException - if a system exception occurred

removeByUuid

public static void removeByUuid(String uuid)
                         throws SystemException
Removes all the users where uuid = ? from the database.

Parameters:
uuid - the uuid to search with
Throws:
SystemException - if a system exception occurred

removeByCompanyId

public static void removeByCompanyId(long companyId)
                              throws SystemException
Removes all the users where companyId = ? from the database.

Parameters:
companyId - the company id to search with
Throws:
SystemException - if a system exception occurred

removeByContactId

public static void removeByContactId(long contactId)
                              throws NoSuchUserException,
                                     SystemException
Removes the user where contactId = ? from the database.

Parameters:
contactId - the contact id to search with
Throws:
SystemException - if a system exception occurred
NoSuchUserException

removeByEmailAddress

public static void removeByEmailAddress(String emailAddress)
                                 throws SystemException
Removes all the users where emailAddress = ? from the database.

Parameters:
emailAddress - the email address to search with
Throws:
SystemException - if a system exception occurred

removeByPortraitId

public static void removeByPortraitId(long portraitId)
                               throws NoSuchUserException,
                                      SystemException
Removes the user where portraitId = ? from the database.

Parameters:
portraitId - the portrait id to search with
Throws:
SystemException - if a system exception occurred
NoSuchUserException

removeByC_U

public static void removeByC_U(long companyId,
                               long userId)
                        throws NoSuchUserException,
                               SystemException
Removes the user where companyId = ? and userId = ? from the database.

Parameters:
companyId - the company id to search with
userId - the user id to search with
Throws:
SystemException - if a system exception occurred
NoSuchUserException

removeByC_DU

public static void removeByC_DU(long companyId,
                                boolean defaultUser)
                         throws NoSuchUserException,
                                SystemException
Removes the user where companyId = ? and defaultUser = ? from the database.

Parameters:
companyId - the company id to search with
defaultUser - the default user to search with
Throws:
SystemException - if a system exception occurred
NoSuchUserException

removeByC_SN

public static void removeByC_SN(long companyId,
                                String screenName)
                         throws NoSuchUserException,
                                SystemException
Removes the user where companyId = ? and screenName = ? from the database.

Parameters:
companyId - the company id to search with
screenName - the screen name to search with
Throws:
SystemException - if a system exception occurred
NoSuchUserException

removeByC_EA

public static void removeByC_EA(long companyId,
                                String emailAddress)
                         throws NoSuchUserException,
                                SystemException
Removes the user where companyId = ? and emailAddress = ? from the database.

Parameters:
companyId - the company id to search with
emailAddress - the email address to search with
Throws:
SystemException - if a system exception occurred
NoSuchUserException

removeByC_FID

public static void removeByC_FID(long companyId,
                                 long facebookId)
                          throws NoSuchUserException,
                                 SystemException
Removes the user where companyId = ? and facebookId = ? from the database.

Parameters:
companyId - the company id to search with
facebookId - the facebook id to search with
Throws:
SystemException - if a system exception occurred
NoSuchUserException

removeByC_O

public static void removeByC_O(long companyId,
                               String openId)
                        throws NoSuchUserException,
                               SystemException
Removes the user where companyId = ? and openId = ? from the database.

Parameters:
companyId - the company id to search with
openId - the open id to search with
Throws:
SystemException - if a system exception occurred
NoSuchUserException

removeByC_A

public static void removeByC_A(long companyId,
                               boolean active)
                        throws SystemException
Removes all the users where companyId = ? and active = ? from the database.

Parameters:
companyId - the company id to search with
active - the active to search with
Throws:
SystemException - if a system exception occurred

removeAll

public static void removeAll()
                      throws SystemException
Removes all the users from the database.

Throws:
SystemException - if a system exception occurred

countByUuid

public static int countByUuid(String uuid)
                       throws SystemException
Counts all the users where uuid = ?.

Parameters:
uuid - the uuid to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countByCompanyId

public static int countByCompanyId(long companyId)
                            throws SystemException
Counts all the users where companyId = ?.

Parameters:
companyId - the company id to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countByContactId

public static int countByContactId(long contactId)
                            throws SystemException
Counts all the users where contactId = ?.

Parameters:
contactId - the contact id to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countByEmailAddress

public static int countByEmailAddress(String emailAddress)
                               throws SystemException
Counts all the users where emailAddress = ?.

Parameters:
emailAddress - the email address to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countByPortraitId

public static int countByPortraitId(long portraitId)
                             throws SystemException
Counts all the users where portraitId = ?.

Parameters:
portraitId - the portrait id to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countByC_U

public static int countByC_U(long companyId,
                             long userId)
                      throws SystemException
Counts all the users where companyId = ? and userId = ?.

Parameters:
companyId - the company id to search with
userId - the user id to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countByC_DU

public static int countByC_DU(long companyId,
                              boolean defaultUser)
                       throws SystemException
Counts all the users where companyId = ? and defaultUser = ?.

Parameters:
companyId - the company id to search with
defaultUser - the default user to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countByC_SN

public static int countByC_SN(long companyId,
                              String screenName)
                       throws SystemException
Counts all the users where companyId = ? and screenName = ?.

Parameters:
companyId - the company id to search with
screenName - the screen name to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countByC_EA

public static int countByC_EA(long companyId,
                              String emailAddress)
                       throws SystemException
Counts all the users where companyId = ? and emailAddress = ?.

Parameters:
companyId - the company id to search with
emailAddress - the email address to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countByC_FID

public static int countByC_FID(long companyId,
                               long facebookId)
                        throws SystemException
Counts all the users where companyId = ? and facebookId = ?.

Parameters:
companyId - the company id to search with
facebookId - the facebook id to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countByC_O

public static int countByC_O(long companyId,
                             String openId)
                      throws SystemException
Counts all the users where companyId = ? and openId = ?.

Parameters:
companyId - the company id to search with
openId - the open id to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countByC_A

public static int countByC_A(long companyId,
                             boolean active)
                      throws SystemException
Counts all the users where companyId = ? and active = ?.

Parameters:
companyId - the company id to search with
active - the active to search with
Returns:
the number of matching users
Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Counts all the users.

Returns:
the number of users
Throws:
SystemException - if a system exception occurred

getGroups

public static List<Group> getGroups(long pk)
                             throws SystemException
Gets all the groups associated with the user.

Parameters:
pk - the primary key of the user to get the associated groups for
Returns:
the groups associated with the user
Throws:
SystemException - if a system exception occurred

getGroups

public static List<Group> getGroups(long pk,
                                    int start,
                                    int end)
                             throws SystemException
Gets a range of all the groups associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated groups for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of groups associated with the user
Throws:
SystemException - if a system exception occurred

getGroups

public static List<Group> getGroups(long pk,
                                    int start,
                                    int end,
                                    OrderByComparator orderByComparator)
                             throws SystemException
Gets an ordered range of all the groups associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated groups for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of groups associated with the user
Throws:
SystemException - if a system exception occurred

getGroupsSize

public static int getGroupsSize(long pk)
                         throws SystemException
Gets the number of groups associated with the user.

Parameters:
pk - the primary key of the user to get the number of associated groups for
Returns:
the number of groups associated with the user
Throws:
SystemException - if a system exception occurred

containsGroup

public static boolean containsGroup(long pk,
                                    long groupPK)
                             throws SystemException
Determines whether the group is associated with the user.

Parameters:
pk - the primary key of the user
groupPK - the primary key of the group
Returns:
whether the group is associated with the user
Throws:
SystemException - if a system exception occurred

containsGroups

public static boolean containsGroups(long pk)
                              throws SystemException
Determines whether the user has any groups associated with it.

Parameters:
pk - the primary key of the user to check for associations with groups
Returns:
whether the user has any groups associated with it
Throws:
SystemException - if a system exception occurred

addGroup

public static void addGroup(long pk,
                            long groupPK)
                     throws SystemException
Adds an association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
groupPK - the primary key of the group
Throws:
SystemException - if a system exception occurred

addGroup

public static void addGroup(long pk,
                            Group group)
                     throws SystemException
Adds an association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
group - the group
Throws:
SystemException - if a system exception occurred

addGroups

public static void addGroups(long pk,
                             long[] groupPKs)
                      throws SystemException
Adds an association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
groupPKs - the primary keys of the groups
Throws:
SystemException - if a system exception occurred

addGroups

public static void addGroups(long pk,
                             List<Group> groups)
                      throws SystemException
Adds an association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
groups - the groups
Throws:
SystemException - if a system exception occurred

clearGroups

public static void clearGroups(long pk)
                        throws SystemException
Clears all associations between the user and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to clear the associated groups from
Throws:
SystemException - if a system exception occurred

removeGroup

public static void removeGroup(long pk,
                               long groupPK)
                        throws SystemException
Removes the association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
groupPK - the primary key of the group
Throws:
SystemException - if a system exception occurred

removeGroup

public static void removeGroup(long pk,
                               Group group)
                        throws SystemException
Removes the association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
group - the group
Throws:
SystemException - if a system exception occurred

removeGroups

public static void removeGroups(long pk,
                                long[] groupPKs)
                         throws SystemException
Removes the association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
groupPKs - the primary keys of the groups
Throws:
SystemException - if a system exception occurred

removeGroups

public static void removeGroups(long pk,
                                List<Group> groups)
                         throws SystemException
Removes the association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
groups - the groups
Throws:
SystemException - if a system exception occurred

setGroups

public static void setGroups(long pk,
                             long[] groupPKs)
                      throws SystemException
Sets the groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
groupPKs - the primary keys of the groups to be associated with the user
Throws:
SystemException - if a system exception occurred

setGroups

public static void setGroups(long pk,
                             List<Group> groups)
                      throws SystemException
Sets the groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
groups - the groups to be associated with the user
Throws:
SystemException - if a system exception occurred

getOrganizations

public static List<Organization> getOrganizations(long pk)
                                           throws SystemException
Gets all the organizations associated with the user.

Parameters:
pk - the primary key of the user to get the associated organizations for
Returns:
the organizations associated with the user
Throws:
SystemException - if a system exception occurred

getOrganizations

public static List<Organization> getOrganizations(long pk,
                                                  int start,
                                                  int end)
                                           throws SystemException
Gets a range of all the organizations associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated organizations for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of organizations associated with the user
Throws:
SystemException - if a system exception occurred

getOrganizations

public static List<Organization> getOrganizations(long pk,
                                                  int start,
                                                  int end,
                                                  OrderByComparator orderByComparator)
                                           throws SystemException
Gets an ordered range of all the organizations associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated organizations for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of organizations associated with the user
Throws:
SystemException - if a system exception occurred

getOrganizationsSize

public static int getOrganizationsSize(long pk)
                                throws SystemException
Gets the number of organizations associated with the user.

Parameters:
pk - the primary key of the user to get the number of associated organizations for
Returns:
the number of organizations associated with the user
Throws:
SystemException - if a system exception occurred

containsOrganization

public static boolean containsOrganization(long pk,
                                           long organizationPK)
                                    throws SystemException
Determines whether the organization is associated with the user.

Parameters:
pk - the primary key of the user
organizationPK - the primary key of the organization
Returns:
whether the organization is associated with the user
Throws:
SystemException - if a system exception occurred

containsOrganizations

public static boolean containsOrganizations(long pk)
                                     throws SystemException
Determines whether the user has any organizations associated with it.

Parameters:
pk - the primary key of the user to check for associations with organizations
Returns:
whether the user has any organizations associated with it
Throws:
SystemException - if a system exception occurred

addOrganization

public static void addOrganization(long pk,
                                   long organizationPK)
                            throws SystemException
Adds an association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
organizationPK - the primary key of the organization
Throws:
SystemException - if a system exception occurred

addOrganization

public static void addOrganization(long pk,
                                   Organization organization)
                            throws SystemException
Adds an association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
organization - the organization
Throws:
SystemException - if a system exception occurred

addOrganizations

public static void addOrganizations(long pk,
                                    long[] organizationPKs)
                             throws SystemException
Adds an association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
organizationPKs - the primary keys of the organizations
Throws:
SystemException - if a system exception occurred

addOrganizations

public static void addOrganizations(long pk,
                                    List<Organization> organizations)
                             throws SystemException
Adds an association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
organizations - the organizations
Throws:
SystemException - if a system exception occurred

clearOrganizations

public static void clearOrganizations(long pk)
                               throws SystemException
Clears all associations between the user and its organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to clear the associated organizations from
Throws:
SystemException - if a system exception occurred

removeOrganization

public static void removeOrganization(long pk,
                                      long organizationPK)
                               throws SystemException
Removes the association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
organizationPK - the primary key of the organization
Throws:
SystemException - if a system exception occurred

removeOrganization

public static void removeOrganization(long pk,
                                      Organization organization)
                               throws SystemException
Removes the association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
organization - the organization
Throws:
SystemException - if a system exception occurred

removeOrganizations

public static void removeOrganizations(long pk,
                                       long[] organizationPKs)
                                throws SystemException
Removes the association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
organizationPKs - the primary keys of the organizations
Throws:
SystemException - if a system exception occurred

removeOrganizations

public static void removeOrganizations(long pk,
                                       List<Organization> organizations)
                                throws SystemException
Removes the association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
organizations - the organizations
Throws:
SystemException - if a system exception occurred

setOrganizations

public static void setOrganizations(long pk,
                                    long[] organizationPKs)
                             throws SystemException
Sets the organizations associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
organizationPKs - the primary keys of the organizations to be associated with the user
Throws:
SystemException - if a system exception occurred

setOrganizations

public static void setOrganizations(long pk,
                                    List<Organization> organizations)
                             throws SystemException
Sets the organizations associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
organizations - the organizations to be associated with the user
Throws:
SystemException - if a system exception occurred

getPermissions

public static List<Permission> getPermissions(long pk)
                                       throws SystemException
Gets all the permissions associated with the user.

Parameters:
pk - the primary key of the user to get the associated permissions for
Returns:
the permissions associated with the user
Throws:
SystemException - if a system exception occurred

getPermissions

public static List<Permission> getPermissions(long pk,
                                              int start,
                                              int end)
                                       throws SystemException
Gets a range of all the permissions associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated permissions for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of permissions associated with the user
Throws:
SystemException - if a system exception occurred

getPermissions

public static List<Permission> getPermissions(long pk,
                                              int start,
                                              int end,
                                              OrderByComparator orderByComparator)
                                       throws SystemException
Gets an ordered range of all the permissions associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated permissions for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of permissions associated with the user
Throws:
SystemException - if a system exception occurred

getPermissionsSize

public static int getPermissionsSize(long pk)
                              throws SystemException
Gets the number of permissions associated with the user.

Parameters:
pk - the primary key of the user to get the number of associated permissions for
Returns:
the number of permissions associated with the user
Throws:
SystemException - if a system exception occurred

containsPermission

public static boolean containsPermission(long pk,
                                         long permissionPK)
                                  throws SystemException
Determines whether the permission is associated with the user.

Parameters:
pk - the primary key of the user
permissionPK - the primary key of the permission
Returns:
whether the permission is associated with the user
Throws:
SystemException - if a system exception occurred

containsPermissions

public static boolean containsPermissions(long pk)
                                   throws SystemException
Determines whether the user has any permissions associated with it.

Parameters:
pk - the primary key of the user to check for associations with permissions
Returns:
whether the user has any permissions associated with it
Throws:
SystemException - if a system exception occurred

addPermission

public static void addPermission(long pk,
                                 long permissionPK)
                          throws SystemException
Adds an association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
permissionPK - the primary key of the permission
Throws:
SystemException - if a system exception occurred

addPermission

public static void addPermission(long pk,
                                 Permission permission)
                          throws SystemException
Adds an association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
permission - the permission
Throws:
SystemException - if a system exception occurred

addPermissions

public static void addPermissions(long pk,
                                  long[] permissionPKs)
                           throws SystemException
Adds an association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
permissionPKs - the primary keys of the permissions
Throws:
SystemException - if a system exception occurred

addPermissions

public static void addPermissions(long pk,
                                  List<Permission> permissions)
                           throws SystemException
Adds an association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
permissions - the permissions
Throws:
SystemException - if a system exception occurred

clearPermissions

public static void clearPermissions(long pk)
                             throws SystemException
Clears all associations between the user and its permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to clear the associated permissions from
Throws:
SystemException - if a system exception occurred

removePermission

public static void removePermission(long pk,
                                    long permissionPK)
                             throws SystemException
Removes the association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
permissionPK - the primary key of the permission
Throws:
SystemException - if a system exception occurred

removePermission

public static void removePermission(long pk,
                                    Permission permission)
                             throws SystemException
Removes the association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
permission - the permission
Throws:
SystemException - if a system exception occurred

removePermissions

public static void removePermissions(long pk,
                                     long[] permissionPKs)
                              throws SystemException
Removes the association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
permissionPKs - the primary keys of the permissions
Throws:
SystemException - if a system exception occurred

removePermissions

public static void removePermissions(long pk,
                                     List<Permission> permissions)
                              throws SystemException
Removes the association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
permissions - the permissions
Throws:
SystemException - if a system exception occurred

setPermissions

public static void setPermissions(long pk,
                                  long[] permissionPKs)
                           throws SystemException
Sets the permissions associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
permissionPKs - the primary keys of the permissions to be associated with the user
Throws:
SystemException - if a system exception occurred

setPermissions

public static void setPermissions(long pk,
                                  List<Permission> permissions)
                           throws SystemException
Sets the permissions associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
permissions - the permissions to be associated with the user
Throws:
SystemException - if a system exception occurred

getRoles

public static List<Role> getRoles(long pk)
                           throws SystemException
Gets all the roles associated with the user.

Parameters:
pk - the primary key of the user to get the associated roles for
Returns:
the roles associated with the user
Throws:
SystemException - if a system exception occurred

getRoles

public static List<Role> getRoles(long pk,
                                  int start,
                                  int end)
                           throws SystemException
Gets a range of all the roles associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated roles for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of roles associated with the user
Throws:
SystemException - if a system exception occurred

getRoles

public static List<Role> getRoles(long pk,
                                  int start,
                                  int end,
                                  OrderByComparator orderByComparator)
                           throws SystemException
Gets an ordered range of all the roles associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated roles for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of roles associated with the user
Throws:
SystemException - if a system exception occurred

getRolesSize

public static int getRolesSize(long pk)
                        throws SystemException
Gets the number of roles associated with the user.

Parameters:
pk - the primary key of the user to get the number of associated roles for
Returns:
the number of roles associated with the user
Throws:
SystemException - if a system exception occurred

containsRole

public static boolean containsRole(long pk,
                                   long rolePK)
                            throws SystemException
Determines whether the role is associated with the user.

Parameters:
pk - the primary key of the user
rolePK - the primary key of the role
Returns:
whether the role is associated with the user
Throws:
SystemException - if a system exception occurred

containsRoles

public static boolean containsRoles(long pk)
                             throws SystemException
Determines whether the user has any roles associated with it.

Parameters:
pk - the primary key of the user to check for associations with roles
Returns:
whether the user has any roles associated with it
Throws:
SystemException - if a system exception occurred

addRole

public static void addRole(long pk,
                           long rolePK)
                    throws SystemException
Adds an association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
rolePK - the primary key of the role
Throws:
SystemException - if a system exception occurred

addRole

public static void addRole(long pk,
                           Role role)
                    throws SystemException
Adds an association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
role - the role
Throws:
SystemException - if a system exception occurred

addRoles

public static void addRoles(long pk,
                            long[] rolePKs)
                     throws SystemException
Adds an association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
rolePKs - the primary keys of the roles
Throws:
SystemException - if a system exception occurred

addRoles

public static void addRoles(long pk,
                            List<Role> roles)
                     throws SystemException
Adds an association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
roles - the roles
Throws:
SystemException - if a system exception occurred

clearRoles

public static void clearRoles(long pk)
                       throws SystemException
Clears all associations between the user and its roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to clear the associated roles from
Throws:
SystemException - if a system exception occurred

removeRole

public static void removeRole(long pk,
                              long rolePK)
                       throws SystemException
Removes the association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
rolePK - the primary key of the role
Throws:
SystemException - if a system exception occurred

removeRole

public static void removeRole(long pk,
                              Role role)
                       throws SystemException
Removes the association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
role - the role
Throws:
SystemException - if a system exception occurred

removeRoles

public static void removeRoles(long pk,
                               long[] rolePKs)
                        throws SystemException
Removes the association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
rolePKs - the primary keys of the roles
Throws:
SystemException - if a system exception occurred

removeRoles

public static void removeRoles(long pk,
                               List<Role> roles)
                        throws SystemException
Removes the association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
roles - the roles
Throws:
SystemException - if a system exception occurred

setRoles

public static void setRoles(long pk,
                            long[] rolePKs)
                     throws SystemException
Sets the roles associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
rolePKs - the primary keys of the roles to be associated with the user
Throws:
SystemException - if a system exception occurred

setRoles

public static void setRoles(long pk,
                            List<Role> roles)
                     throws SystemException
Sets the roles associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
roles - the roles to be associated with the user
Throws:
SystemException - if a system exception occurred

getTeams

public static List<Team> getTeams(long pk)
                           throws SystemException
Gets all the teams associated with the user.

Parameters:
pk - the primary key of the user to get the associated teams for
Returns:
the teams associated with the user
Throws:
SystemException - if a system exception occurred

getTeams

public static List<Team> getTeams(long pk,
                                  int start,
                                  int end)
                           throws SystemException
Gets a range of all the teams associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated teams for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of teams associated with the user
Throws:
SystemException - if a system exception occurred

getTeams

public static List<Team> getTeams(long pk,
                                  int start,
                                  int end,
                                  OrderByComparator orderByComparator)
                           throws SystemException
Gets an ordered range of all the teams associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated teams for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of teams associated with the user
Throws:
SystemException - if a system exception occurred

getTeamsSize

public static int getTeamsSize(long pk)
                        throws SystemException
Gets the number of teams associated with the user.

Parameters:
pk - the primary key of the user to get the number of associated teams for
Returns:
the number of teams associated with the user
Throws:
SystemException - if a system exception occurred

containsTeam

public static boolean containsTeam(long pk,
                                   long teamPK)
                            throws SystemException
Determines whether the team is associated with the user.

Parameters:
pk - the primary key of the user
teamPK - the primary key of the team
Returns:
whether the team is associated with the user
Throws:
SystemException - if a system exception occurred

containsTeams

public static boolean containsTeams(long pk)
                             throws SystemException
Determines whether the user has any teams associated with it.

Parameters:
pk - the primary key of the user to check for associations with teams
Returns:
whether the user has any teams associated with it
Throws:
SystemException - if a system exception occurred

addTeam

public static void addTeam(long pk,
                           long teamPK)
                    throws SystemException
Adds an association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
teamPK - the primary key of the team
Throws:
SystemException - if a system exception occurred

addTeam

public static void addTeam(long pk,
                           Team team)
                    throws SystemException
Adds an association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
team - the team
Throws:
SystemException - if a system exception occurred

addTeams

public static void addTeams(long pk,
                            long[] teamPKs)
                     throws SystemException
Adds an association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
teamPKs - the primary keys of the teams
Throws:
SystemException - if a system exception occurred

addTeams

public static void addTeams(long pk,
                            List<Team> teams)
                     throws SystemException
Adds an association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
teams - the teams
Throws:
SystemException - if a system exception occurred

clearTeams

public static void clearTeams(long pk)
                       throws SystemException
Clears all associations between the user and its teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to clear the associated teams from
Throws:
SystemException - if a system exception occurred

removeTeam

public static void removeTeam(long pk,
                              long teamPK)
                       throws SystemException
Removes the association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
teamPK - the primary key of the team
Throws:
SystemException - if a system exception occurred

removeTeam

public static void removeTeam(long pk,
                              Team team)
                       throws SystemException
Removes the association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
team - the team
Throws:
SystemException - if a system exception occurred

removeTeams

public static void removeTeams(long pk,
                               long[] teamPKs)
                        throws SystemException
Removes the association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
teamPKs - the primary keys of the teams
Throws:
SystemException - if a system exception occurred

removeTeams

public static void removeTeams(long pk,
                               List<Team> teams)
                        throws SystemException
Removes the association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
teams - the teams
Throws:
SystemException - if a system exception occurred

setTeams

public static void setTeams(long pk,
                            long[] teamPKs)
                     throws SystemException
Sets the teams associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
teamPKs - the primary keys of the teams to be associated with the user
Throws:
SystemException - if a system exception occurred

setTeams

public static void setTeams(long pk,
                            List<Team> teams)
                     throws SystemException
Sets the teams associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
teams - the teams to be associated with the user
Throws:
SystemException - if a system exception occurred

getUserGroups

public static List<UserGroup> getUserGroups(long pk)
                                     throws SystemException
Gets all the user groups associated with the user.

Parameters:
pk - the primary key of the user to get the associated user groups for
Returns:
the user groups associated with the user
Throws:
SystemException - if a system exception occurred

getUserGroups

public static List<UserGroup> getUserGroups(long pk,
                                            int start,
                                            int end)
                                     throws SystemException
Gets a range of all the user groups associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated user groups for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
Returns:
the range of user groups associated with the user
Throws:
SystemException - if a system exception occurred

getUserGroups

public static List<UserGroup> getUserGroups(long pk,
                                            int start,
                                            int end,
                                            OrderByComparator orderByComparator)
                                     throws SystemException
Gets an ordered range of all the user groups associated with the user.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set.

Parameters:
pk - the primary key of the user to get the associated user groups for
start - the lower bound of the range of users to return
end - the upper bound of the range of users to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of user groups associated with the user
Throws:
SystemException - if a system exception occurred

getUserGroupsSize

public static int getUserGroupsSize(long pk)
                             throws SystemException
Gets the number of user groups associated with the user.

Parameters:
pk - the primary key of the user to get the number of associated user groups for
Returns:
the number of user groups associated with the user
Throws:
SystemException - if a system exception occurred

containsUserGroup

public static boolean containsUserGroup(long pk,
                                        long userGroupPK)
                                 throws SystemException
Determines whether the user group is associated with the user.

Parameters:
pk - the primary key of the user
userGroupPK - the primary key of the user group
Returns:
whether the user group is associated with the user
Throws:
SystemException - if a system exception occurred

containsUserGroups

public static boolean containsUserGroups(long pk)
                                  throws SystemException
Determines whether the user has any user groups associated with it.

Parameters:
pk - the primary key of the user to check for associations with user groups
Returns:
whether the user has any user groups associated with it
Throws:
SystemException - if a system exception occurred

addUserGroup

public static void addUserGroup(long pk,
                                long userGroupPK)
                         throws SystemException
Adds an association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
userGroupPK - the primary key of the user group
Throws:
SystemException - if a system exception occurred

addUserGroup

public static void addUserGroup(long pk,
                                UserGroup userGroup)
                         throws SystemException
Adds an association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
userGroup - the user group
Throws:
SystemException - if a system exception occurred

addUserGroups

public static void addUserGroups(long pk,
                                 long[] userGroupPKs)
                          throws SystemException
Adds an association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
userGroupPKs - the primary keys of the user groups
Throws:
SystemException - if a system exception occurred

addUserGroups

public static void addUserGroups(long pk,
                                 List<UserGroup> userGroups)
                          throws SystemException
Adds an association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
userGroups - the user groups
Throws:
SystemException - if a system exception occurred

clearUserGroups

public static void clearUserGroups(long pk)
                            throws SystemException
Clears all associations between the user and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to clear the associated user groups from
Throws:
SystemException - if a system exception occurred

removeUserGroup

public static void removeUserGroup(long pk,
                                   long userGroupPK)
                            throws SystemException
Removes the association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
userGroupPK - the primary key of the user group
Throws:
SystemException - if a system exception occurred

removeUserGroup

public static void removeUserGroup(long pk,
                                   UserGroup userGroup)
                            throws SystemException
Removes the association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
userGroup - the user group
Throws:
SystemException - if a system exception occurred

removeUserGroups

public static void removeUserGroups(long pk,
                                    long[] userGroupPKs)
                             throws SystemException
Removes the association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
userGroupPKs - the primary keys of the user groups
Throws:
SystemException - if a system exception occurred

removeUserGroups

public static void removeUserGroups(long pk,
                                    List<UserGroup> userGroups)
                             throws SystemException
Removes the association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user
userGroups - the user groups
Throws:
SystemException - if a system exception occurred

setUserGroups

public static void setUserGroups(long pk,
                                 long[] userGroupPKs)
                          throws SystemException
Sets the user groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
userGroupPKs - the primary keys of the user groups to be associated with the user
Throws:
SystemException - if a system exception occurred

setUserGroups

public static void setUserGroups(long pk,
                                 List<UserGroup> userGroups)
                          throws SystemException
Sets the user groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache.

Parameters:
pk - the primary key of the user to set the associations for
userGroups - the user groups to be associated with the user
Throws:
SystemException - if a system exception occurred

getPersistence

public static UserPersistence getPersistence()

setPersistence

public void setPersistence(UserPersistence persistence)

Liferay 6.0.5