Liferay 6.1.2-ce-ga3

com.liferay.portal.service.persistence
Class OrgGroupPermissionUtil

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

public class OrgGroupPermissionUtil
extends Object

The persistence utility for the org group permission service. This utility wraps OrgGroupPermissionPersistenceImpl 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.

Caching information and settings can be found in portal.properties

See Also:
OrgGroupPermissionPersistence, OrgGroupPermissionPersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
OrgGroupPermissionUtil()
           
 
Method Summary
static void cacheResult(List<OrgGroupPermission> orgGroupPermissions)
          Caches the org group permissions in the entity cache if it is enabled.
static void cacheResult(OrgGroupPermission orgGroupPermission)
          Caches the org group permission in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(OrgGroupPermission orgGroupPermission)
           
static int countAll()
          Returns the number of org group permissions.
static int countByGroupId(long groupId)
          Returns the number of org group permissions where groupId = ?.
static int countByPermissionId(long permissionId)
          Returns the number of org group permissions where permissionId = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static OrgGroupPermission create(OrgGroupPermissionPK orgGroupPermissionPK)
          Creates a new org group permission with the primary key.
static OrgGroupPermission fetchByGroupId_First(long groupId, OrderByComparator orderByComparator)
          Returns the first org group permission in the ordered set where groupId = ?.
static OrgGroupPermission fetchByGroupId_Last(long groupId, OrderByComparator orderByComparator)
          Returns the last org group permission in the ordered set where groupId = ?.
static OrgGroupPermission fetchByPermissionId_First(long permissionId, OrderByComparator orderByComparator)
          Returns the first org group permission in the ordered set where permissionId = ?.
static OrgGroupPermission fetchByPermissionId_Last(long permissionId, OrderByComparator orderByComparator)
          Returns the last org group permission in the ordered set where permissionId = ?.
static OrgGroupPermission fetchByPrimaryKey(OrgGroupPermissionPK orgGroupPermissionPK)
          Returns the org group permission with the primary key or returns null if it could not be found.
static List<OrgGroupPermission> findAll()
          Returns all the org group permissions.
static List<OrgGroupPermission> findAll(int start, int end)
          Returns a range of all the org group permissions.
static List<OrgGroupPermission> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the org group permissions.
static OrgGroupPermission findByGroupId_First(long groupId, OrderByComparator orderByComparator)
          Returns the first org group permission in the ordered set where groupId = ?.
static OrgGroupPermission findByGroupId_Last(long groupId, OrderByComparator orderByComparator)
          Returns the last org group permission in the ordered set where groupId = ?.
static OrgGroupPermission[] findByGroupId_PrevAndNext(OrgGroupPermissionPK orgGroupPermissionPK, long groupId, OrderByComparator orderByComparator)
          Returns the org group permissions before and after the current org group permission in the ordered set where groupId = ?.
static List<OrgGroupPermission> findByGroupId(long groupId)
          Returns all the org group permissions where groupId = ?.
static List<OrgGroupPermission> findByGroupId(long groupId, int start, int end)
          Returns a range of all the org group permissions where groupId = ?.
static List<OrgGroupPermission> findByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the org group permissions where groupId = ?.
static OrgGroupPermission findByPermissionId_First(long permissionId, OrderByComparator orderByComparator)
          Returns the first org group permission in the ordered set where permissionId = ?.
static OrgGroupPermission findByPermissionId_Last(long permissionId, OrderByComparator orderByComparator)
          Returns the last org group permission in the ordered set where permissionId = ?.
static OrgGroupPermission[] findByPermissionId_PrevAndNext(OrgGroupPermissionPK orgGroupPermissionPK, long permissionId, OrderByComparator orderByComparator)
          Returns the org group permissions before and after the current org group permission in the ordered set where permissionId = ?.
static List<OrgGroupPermission> findByPermissionId(long permissionId)
          Returns all the org group permissions where permissionId = ?.
static List<OrgGroupPermission> findByPermissionId(long permissionId, int start, int end)
          Returns a range of all the org group permissions where permissionId = ?.
static List<OrgGroupPermission> findByPermissionId(long permissionId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the org group permissions where permissionId = ?.
static OrgGroupPermission findByPrimaryKey(OrgGroupPermissionPK orgGroupPermissionPK)
          Returns the org group permission with the primary key or throws a NoSuchOrgGroupPermissionException if it could not be found.
static List<OrgGroupPermission> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<OrgGroupPermission> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<OrgGroupPermission> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static OrgGroupPermissionPersistence getPersistence()
           
static OrgGroupPermission remove(OrgGroupPermissionPK orgGroupPermissionPK)
          Removes the org group permission with the primary key from the database.
static void removeAll()
          Removes all the org group permissions from the database.
static void removeByGroupId(long groupId)
          Removes all the org group permissions where groupId = ? from the database.
static void removeByPermissionId(long permissionId)
          Removes all the org group permissions where permissionId = ? from the database.
 void setPersistence(OrgGroupPermissionPersistence persistence)
          Deprecated.  
static OrgGroupPermission update(OrgGroupPermission orgGroupPermission, boolean merge)
           
static OrgGroupPermission update(OrgGroupPermission orgGroupPermission, boolean merge, ServiceContext serviceContext)
           
static OrgGroupPermission updateImpl(OrgGroupPermission orgGroupPermission, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrgGroupPermissionUtil

public OrgGroupPermissionUtil()
Method Detail

clearCache

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

clearCache

public static void clearCache(OrgGroupPermission orgGroupPermission)
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<OrgGroupPermission> findWithDynamicQuery(DynamicQuery dynamicQuery)
                                                     throws SystemException
Throws:
SystemException
See Also:
BasePersistence.findWithDynamicQuery(DynamicQuery)

findWithDynamicQuery

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

findWithDynamicQuery

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

update

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

update

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

cacheResult

public static void cacheResult(OrgGroupPermission orgGroupPermission)
Caches the org group permission in the entity cache if it is enabled.

Parameters:
orgGroupPermission - the org group permission

cacheResult

public static void cacheResult(List<OrgGroupPermission> orgGroupPermissions)
Caches the org group permissions in the entity cache if it is enabled.

Parameters:
orgGroupPermissions - the org group permissions

create

public static OrgGroupPermission create(OrgGroupPermissionPK orgGroupPermissionPK)
Creates a new org group permission with the primary key. Does not add the org group permission to the database.

Parameters:
orgGroupPermissionPK - the primary key for the new org group permission
Returns:
the new org group permission

remove

public static OrgGroupPermission remove(OrgGroupPermissionPK orgGroupPermissionPK)
                                 throws NoSuchOrgGroupPermissionException,
                                        SystemException
Removes the org group permission with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
orgGroupPermissionPK - the primary key of the org group permission
Returns:
the org group permission that was removed
Throws:
NoSuchOrgGroupPermissionException - if a org group permission with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static OrgGroupPermission updateImpl(OrgGroupPermission orgGroupPermission,
                                            boolean merge)
                                     throws SystemException
Throws:
SystemException

findByPrimaryKey

public static OrgGroupPermission findByPrimaryKey(OrgGroupPermissionPK orgGroupPermissionPK)
                                           throws NoSuchOrgGroupPermissionException,
                                                  SystemException
Returns the org group permission with the primary key or throws a NoSuchOrgGroupPermissionException if it could not be found.

Parameters:
orgGroupPermissionPK - the primary key of the org group permission
Returns:
the org group permission
Throws:
NoSuchOrgGroupPermissionException - if a org group permission with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static OrgGroupPermission fetchByPrimaryKey(OrgGroupPermissionPK orgGroupPermissionPK)
                                            throws SystemException
Returns the org group permission with the primary key or returns null if it could not be found.

Parameters:
orgGroupPermissionPK - the primary key of the org group permission
Returns:
the org group permission, or null if a org group permission with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByGroupId

public static List<OrgGroupPermission> findByGroupId(long groupId)
                                              throws SystemException
Returns all the org group permissions where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the matching org group permissions
Throws:
SystemException - if a system exception occurred

findByGroupId

public static List<OrgGroupPermission> findByGroupId(long groupId,
                                                     int start,
                                                     int end)
                                              throws SystemException
Returns a range of all the org group permissions where groupId = ?.

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:
groupId - the group ID
start - the lower bound of the range of org group permissions
end - the upper bound of the range of org group permissions (not inclusive)
Returns:
the range of matching org group permissions
Throws:
SystemException - if a system exception occurred

findByGroupId

public static List<OrgGroupPermission> findByGroupId(long groupId,
                                                     int start,
                                                     int end,
                                                     OrderByComparator orderByComparator)
                                              throws SystemException
Returns an ordered range of all the org group permissions where groupId = ?.

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:
groupId - the group ID
start - the lower bound of the range of org group permissions
end - the upper bound of the range of org group permissions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching org group permissions
Throws:
SystemException - if a system exception occurred

findByGroupId_First

public static OrgGroupPermission findByGroupId_First(long groupId,
                                                     OrderByComparator orderByComparator)
                                              throws NoSuchOrgGroupPermissionException,
                                                     SystemException
Returns the first org group permission in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching org group permission
Throws:
NoSuchOrgGroupPermissionException - if a matching org group permission could not be found
SystemException - if a system exception occurred

fetchByGroupId_First

public static OrgGroupPermission fetchByGroupId_First(long groupId,
                                                      OrderByComparator orderByComparator)
                                               throws SystemException
Returns the first org group permission in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching org group permission, or null if a matching org group permission could not be found
Throws:
SystemException - if a system exception occurred

findByGroupId_Last

public static OrgGroupPermission findByGroupId_Last(long groupId,
                                                    OrderByComparator orderByComparator)
                                             throws NoSuchOrgGroupPermissionException,
                                                    SystemException
Returns the last org group permission in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching org group permission
Throws:
NoSuchOrgGroupPermissionException - if a matching org group permission could not be found
SystemException - if a system exception occurred

fetchByGroupId_Last

public static OrgGroupPermission fetchByGroupId_Last(long groupId,
                                                     OrderByComparator orderByComparator)
                                              throws SystemException
Returns the last org group permission in the ordered set where groupId = ?.

Parameters:
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching org group permission, or null if a matching org group permission could not be found
Throws:
SystemException - if a system exception occurred

findByGroupId_PrevAndNext

public static OrgGroupPermission[] findByGroupId_PrevAndNext(OrgGroupPermissionPK orgGroupPermissionPK,
                                                             long groupId,
                                                             OrderByComparator orderByComparator)
                                                      throws NoSuchOrgGroupPermissionException,
                                                             SystemException
Returns the org group permissions before and after the current org group permission in the ordered set where groupId = ?.

Parameters:
orgGroupPermissionPK - the primary key of the current org group permission
groupId - the group ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next org group permission
Throws:
NoSuchOrgGroupPermissionException - if a org group permission with the primary key could not be found
SystemException - if a system exception occurred

findByPermissionId

public static List<OrgGroupPermission> findByPermissionId(long permissionId)
                                                   throws SystemException
Returns all the org group permissions where permissionId = ?.

Parameters:
permissionId - the permission ID
Returns:
the matching org group permissions
Throws:
SystemException - if a system exception occurred

findByPermissionId

public static List<OrgGroupPermission> findByPermissionId(long permissionId,
                                                          int start,
                                                          int end)
                                                   throws SystemException
Returns a range of all the org group permissions where permissionId = ?.

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:
permissionId - the permission ID
start - the lower bound of the range of org group permissions
end - the upper bound of the range of org group permissions (not inclusive)
Returns:
the range of matching org group permissions
Throws:
SystemException - if a system exception occurred

findByPermissionId

public static List<OrgGroupPermission> findByPermissionId(long permissionId,
                                                          int start,
                                                          int end,
                                                          OrderByComparator orderByComparator)
                                                   throws SystemException
Returns an ordered range of all the org group permissions where permissionId = ?.

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:
permissionId - the permission ID
start - the lower bound of the range of org group permissions
end - the upper bound of the range of org group permissions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching org group permissions
Throws:
SystemException - if a system exception occurred

findByPermissionId_First

public static OrgGroupPermission findByPermissionId_First(long permissionId,
                                                          OrderByComparator orderByComparator)
                                                   throws NoSuchOrgGroupPermissionException,
                                                          SystemException
Returns the first org group permission in the ordered set where permissionId = ?.

Parameters:
permissionId - the permission ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching org group permission
Throws:
NoSuchOrgGroupPermissionException - if a matching org group permission could not be found
SystemException - if a system exception occurred

fetchByPermissionId_First

public static OrgGroupPermission fetchByPermissionId_First(long permissionId,
                                                           OrderByComparator orderByComparator)
                                                    throws SystemException
Returns the first org group permission in the ordered set where permissionId = ?.

Parameters:
permissionId - the permission ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching org group permission, or null if a matching org group permission could not be found
Throws:
SystemException - if a system exception occurred

findByPermissionId_Last

public static OrgGroupPermission findByPermissionId_Last(long permissionId,
                                                         OrderByComparator orderByComparator)
                                                  throws NoSuchOrgGroupPermissionException,
                                                         SystemException
Returns the last org group permission in the ordered set where permissionId = ?.

Parameters:
permissionId - the permission ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching org group permission
Throws:
NoSuchOrgGroupPermissionException - if a matching org group permission could not be found
SystemException - if a system exception occurred

fetchByPermissionId_Last

public static OrgGroupPermission fetchByPermissionId_Last(long permissionId,
                                                          OrderByComparator orderByComparator)
                                                   throws SystemException
Returns the last org group permission in the ordered set where permissionId = ?.

Parameters:
permissionId - the permission ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching org group permission, or null if a matching org group permission could not be found
Throws:
SystemException - if a system exception occurred

findByPermissionId_PrevAndNext

public static OrgGroupPermission[] findByPermissionId_PrevAndNext(OrgGroupPermissionPK orgGroupPermissionPK,
                                                                  long permissionId,
                                                                  OrderByComparator orderByComparator)
                                                           throws NoSuchOrgGroupPermissionException,
                                                                  SystemException
Returns the org group permissions before and after the current org group permission in the ordered set where permissionId = ?.

Parameters:
orgGroupPermissionPK - the primary key of the current org group permission
permissionId - the permission ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next org group permission
Throws:
NoSuchOrgGroupPermissionException - if a org group permission with the primary key could not be found
SystemException - if a system exception occurred

findAll

public static List<OrgGroupPermission> findAll()
                                        throws SystemException
Returns all the org group permissions.

Returns:
the org group permissions
Throws:
SystemException - if a system exception occurred

findAll

public static List<OrgGroupPermission> findAll(int start,
                                               int end)
                                        throws SystemException
Returns a range of all the org group permissions.

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 org group permissions
end - the upper bound of the range of org group permissions (not inclusive)
Returns:
the range of org group permissions
Throws:
SystemException - if a system exception occurred

findAll

public static List<OrgGroupPermission> findAll(int start,
                                               int end,
                                               OrderByComparator orderByComparator)
                                        throws SystemException
Returns an ordered range of all the org group permissions.

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 org group permissions
end - the upper bound of the range of org group permissions (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of org group permissions
Throws:
SystemException - if a system exception occurred

removeByGroupId

public static void removeByGroupId(long groupId)
                            throws SystemException
Removes all the org group permissions where groupId = ? from the database.

Parameters:
groupId - the group ID
Throws:
SystemException - if a system exception occurred

removeByPermissionId

public static void removeByPermissionId(long permissionId)
                                 throws SystemException
Removes all the org group permissions where permissionId = ? from the database.

Parameters:
permissionId - the permission ID
Throws:
SystemException - if a system exception occurred

removeAll

public static void removeAll()
                      throws SystemException
Removes all the org group permissions from the database.

Throws:
SystemException - if a system exception occurred

countByGroupId

public static int countByGroupId(long groupId)
                          throws SystemException
Returns the number of org group permissions where groupId = ?.

Parameters:
groupId - the group ID
Returns:
the number of matching org group permissions
Throws:
SystemException - if a system exception occurred

countByPermissionId

public static int countByPermissionId(long permissionId)
                               throws SystemException
Returns the number of org group permissions where permissionId = ?.

Parameters:
permissionId - the permission ID
Returns:
the number of matching org group permissions
Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Returns the number of org group permissions.

Returns:
the number of org group permissions
Throws:
SystemException - if a system exception occurred

getPersistence

public static OrgGroupPermissionPersistence getPersistence()

setPersistence

public void setPersistence(OrgGroupPermissionPersistence persistence)
Deprecated. 


Liferay 6.1.2-ce-ga3