com.liferay.portal.service.persistence
Class UserGroupUtil

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

public class UserGroupUtil
extends java.lang.Object

View Source

Author:
Brian Wing Shun Chan

Constructor Summary
UserGroupUtil()
           
 
Method Summary
static void addUser(long pk, long userPK)
           
static void addUser(long pk, User user)
           
static void addUsers(long pk, java.util.List<User> users)
           
static void addUsers(long pk, long[] userPKs)
           
static void clearUsers(long pk)
           
static boolean containsUser(long pk, long userPK)
           
static boolean containsUsers(long pk)
           
static int countAll()
           
static int countByC_N(long companyId, java.lang.String name)
           
static int countByC_P(long companyId, long parentUserGroupId)
           
static int countByCompanyId(long companyId)
           
static UserGroup create(long userGroupId)
           
static UserGroup fetchByC_N(long companyId, java.lang.String name)
           
static UserGroup fetchByPrimaryKey(long userGroupId)
           
static java.util.List<UserGroup> findAll()
           
static java.util.List<UserGroup> findAll(int start, int end)
           
static java.util.List<UserGroup> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
static UserGroup findByC_N(long companyId, java.lang.String name)
           
static UserGroup findByC_P_First(long companyId, long parentUserGroupId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
static UserGroup findByC_P_Last(long companyId, long parentUserGroupId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
static UserGroup[] findByC_P_PrevAndNext(long userGroupId, long companyId, long parentUserGroupId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
static java.util.List<UserGroup> findByC_P(long companyId, long parentUserGroupId)
           
static java.util.List<UserGroup> findByC_P(long companyId, long parentUserGroupId, int start, int end)
           
static java.util.List<UserGroup> findByC_P(long companyId, long parentUserGroupId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
static UserGroup findByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
static UserGroup findByCompanyId_Last(long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
static UserGroup[] findByCompanyId_PrevAndNext(long userGroupId, long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
           
static java.util.List<UserGroup> findByCompanyId(long companyId)
           
static java.util.List<UserGroup> findByCompanyId(long companyId, int start, int end)
           
static java.util.List<UserGroup> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
static UserGroup findByPrimaryKey(long userGroupId)
           
static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
           
static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
           
static UserGroupPersistence getPersistence()
           
static java.util.List<User> getUsers(long pk)
           
static java.util.List<User> getUsers(long pk, int start, int end)
           
static java.util.List<User> getUsers(long pk, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
static int getUsersSize(long pk)
           
static UserGroup remove(long userGroupId)
           
static UserGroup remove(UserGroup userGroup)
           
static void removeAll()
           
static void removeByC_N(long companyId, java.lang.String name)
           
static void removeByC_P(long companyId, long parentUserGroupId)
           
static void removeByCompanyId(long companyId)
           
static void removeUser(long pk, long userPK)
           
static void removeUser(long pk, User user)
           
static void removeUsers(long pk, java.util.List<User> users)
           
static void removeUsers(long pk, long[] userPKs)
           
 void setPersistence(UserGroupPersistence persistence)
           
static void setUsers(long pk, java.util.List<User> users)
           
static void setUsers(long pk, long[] userPKs)
           
static UserGroup update(UserGroup userGroup)
          Deprecated. Use update(UserGroup userGroup, boolean merge).
static UserGroup update(UserGroup userGroup, boolean merge)
          Add, update, or merge, the entity.
static UserGroup updateImpl(UserGroup userGroup, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserGroupUtil

public UserGroupUtil()
Method Detail

create

public static UserGroup create(long userGroupId)

remove

public static UserGroup remove(long userGroupId)
                        throws NoSuchUserGroupException,
                               com.liferay.portal.SystemException
Throws:
NoSuchUserGroupException
com.liferay.portal.SystemException

remove

public static UserGroup remove(UserGroup userGroup)
                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

update

public static UserGroup update(UserGroup userGroup)
                        throws com.liferay.portal.SystemException
Deprecated. Use update(UserGroup userGroup, boolean merge).

Throws:
com.liferay.portal.SystemException

update

public static UserGroup update(UserGroup userGroup,
                               boolean merge)
                        throws com.liferay.portal.SystemException
Add, update, or merge, the entity. This method also calls the model listeners to trigger the proper events associated with adding, deleting, or updating an entity.

Parameters:
userGroup - the entity to add, update, or merge
merge - boolean value for whether to merge the entity. The default value is false. Setting merge to true is more expensive and should only be true when userGroup is transient. See LEP-5473 for a detailed discussion of this method.
Returns:
true if the portlet can be displayed via Ajax
Throws:
com.liferay.portal.SystemException

updateImpl

public static UserGroup updateImpl(UserGroup userGroup,
                                   boolean merge)
                            throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByPrimaryKey

public static UserGroup findByPrimaryKey(long userGroupId)
                                  throws NoSuchUserGroupException,
                                         com.liferay.portal.SystemException
Throws:
NoSuchUserGroupException
com.liferay.portal.SystemException

fetchByPrimaryKey

public static UserGroup fetchByPrimaryKey(long userGroupId)
                                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByCompanyId

public static java.util.List<UserGroup> findByCompanyId(long companyId)
                                                 throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByCompanyId

public static java.util.List<UserGroup> findByCompanyId(long companyId,
                                                        int start,
                                                        int end)
                                                 throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByCompanyId

public static java.util.List<UserGroup> findByCompanyId(long companyId,
                                                        int start,
                                                        int end,
                                                        com.liferay.portal.kernel.util.OrderByComparator obc)
                                                 throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByCompanyId_First

public static UserGroup findByCompanyId_First(long companyId,
                                              com.liferay.portal.kernel.util.OrderByComparator obc)
                                       throws NoSuchUserGroupException,
                                              com.liferay.portal.SystemException
Throws:
NoSuchUserGroupException
com.liferay.portal.SystemException

findByCompanyId_Last

public static UserGroup findByCompanyId_Last(long companyId,
                                             com.liferay.portal.kernel.util.OrderByComparator obc)
                                      throws NoSuchUserGroupException,
                                             com.liferay.portal.SystemException
Throws:
NoSuchUserGroupException
com.liferay.portal.SystemException

findByCompanyId_PrevAndNext

public static UserGroup[] findByCompanyId_PrevAndNext(long userGroupId,
                                                      long companyId,
                                                      com.liferay.portal.kernel.util.OrderByComparator obc)
                                               throws NoSuchUserGroupException,
                                                      com.liferay.portal.SystemException
Throws:
NoSuchUserGroupException
com.liferay.portal.SystemException

findByC_P

public static java.util.List<UserGroup> findByC_P(long companyId,
                                                  long parentUserGroupId)
                                           throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByC_P

public static java.util.List<UserGroup> findByC_P(long companyId,
                                                  long parentUserGroupId,
                                                  int start,
                                                  int end)
                                           throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByC_P

public static java.util.List<UserGroup> findByC_P(long companyId,
                                                  long parentUserGroupId,
                                                  int start,
                                                  int end,
                                                  com.liferay.portal.kernel.util.OrderByComparator obc)
                                           throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findByC_P_First

public static UserGroup findByC_P_First(long companyId,
                                        long parentUserGroupId,
                                        com.liferay.portal.kernel.util.OrderByComparator obc)
                                 throws NoSuchUserGroupException,
                                        com.liferay.portal.SystemException
Throws:
NoSuchUserGroupException
com.liferay.portal.SystemException

findByC_P_Last

public static UserGroup findByC_P_Last(long companyId,
                                       long parentUserGroupId,
                                       com.liferay.portal.kernel.util.OrderByComparator obc)
                                throws NoSuchUserGroupException,
                                       com.liferay.portal.SystemException
Throws:
NoSuchUserGroupException
com.liferay.portal.SystemException

findByC_P_PrevAndNext

public static UserGroup[] findByC_P_PrevAndNext(long userGroupId,
                                                long companyId,
                                                long parentUserGroupId,
                                                com.liferay.portal.kernel.util.OrderByComparator obc)
                                         throws NoSuchUserGroupException,
                                                com.liferay.portal.SystemException
Throws:
NoSuchUserGroupException
com.liferay.portal.SystemException

findByC_N

public static UserGroup findByC_N(long companyId,
                                  java.lang.String name)
                           throws NoSuchUserGroupException,
                                  com.liferay.portal.SystemException
Throws:
NoSuchUserGroupException
com.liferay.portal.SystemException

fetchByC_N

public static UserGroup fetchByC_N(long companyId,
                                   java.lang.String name)
                            throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findWithDynamicQuery

public static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
                                                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findWithDynamicQuery

public static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
                                                                    int start,
                                                                    int end)
                                                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

public static java.util.List<UserGroup> findAll()
                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

public static java.util.List<UserGroup> findAll(int start,
                                                int end)
                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

findAll

public static java.util.List<UserGroup> findAll(int start,
                                                int end,
                                                com.liferay.portal.kernel.util.OrderByComparator obc)
                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeByCompanyId

public static void removeByCompanyId(long companyId)
                              throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeByC_P

public static void removeByC_P(long companyId,
                               long parentUserGroupId)
                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeByC_N

public static void removeByC_N(long companyId,
                               java.lang.String name)
                        throws NoSuchUserGroupException,
                               com.liferay.portal.SystemException
Throws:
NoSuchUserGroupException
com.liferay.portal.SystemException

removeAll

public static void removeAll()
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countByCompanyId

public static int countByCompanyId(long companyId)
                            throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countByC_P

public static int countByC_P(long companyId,
                             long parentUserGroupId)
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countByC_N

public static int countByC_N(long companyId,
                             java.lang.String name)
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

countAll

public static int countAll()
                    throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUsers

public static java.util.List<User> getUsers(long pk)
                                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUsers

public static java.util.List<User> getUsers(long pk,
                                            int start,
                                            int end)
                                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUsers

public static java.util.List<User> getUsers(long pk,
                                            int start,
                                            int end,
                                            com.liferay.portal.kernel.util.OrderByComparator obc)
                                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUsersSize

public static int getUsersSize(long pk)
                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

containsUser

public static boolean containsUser(long pk,
                                   long userPK)
                            throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

containsUsers

public static boolean containsUsers(long pk)
                             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

addUser

public static void addUser(long pk,
                           long userPK)
                    throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

addUser

public static void addUser(long pk,
                           User user)
                    throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

addUsers

public static void addUsers(long pk,
                            long[] userPKs)
                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

addUsers

public static void addUsers(long pk,
                            java.util.List<User> users)
                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

clearUsers

public static void clearUsers(long pk)
                       throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeUser

public static void removeUser(long pk,
                              long userPK)
                       throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeUser

public static void removeUser(long pk,
                              User user)
                       throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeUsers

public static void removeUsers(long pk,
                               long[] userPKs)
                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

removeUsers

public static void removeUsers(long pk,
                               java.util.List<User> users)
                        throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

setUsers

public static void setUsers(long pk,
                            long[] userPKs)
                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

setUsers

public static void setUsers(long pk,
                            java.util.List<User> users)
                     throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getPersistence

public static UserGroupPersistence getPersistence()

setPersistence

public void setPersistence(UserGroupPersistence persistence)