Liferay 6.0.5

com.liferay.portal.service.persistence
Class LayoutSetUtil

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

public class LayoutSetUtil
extends Object

The persistence utility for the layout set service. This utility wraps LayoutSetPersistenceImpl 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:
LayoutSetPersistence, LayoutSetPersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Constructor Summary
LayoutSetUtil()
           
 
Method Summary
static void cacheResult(LayoutSet layoutSet)
          Caches the layout set in the entity cache if it is enabled.
static void cacheResult(List<LayoutSet> layoutSets)
          Caches the layout sets in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(LayoutSet layoutSet)
           
static int countAll()
          Counts all the layout sets.
static int countByG_P(long groupId, boolean privateLayout)
          Counts all the layout sets where groupId = ? and privateLayout = ?.
static int countByGroupId(long groupId)
          Counts all the layout sets where groupId = ?.
static int countByVirtualHost(String virtualHost)
          Counts all the layout sets where virtualHost = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static LayoutSet create(long layoutSetId)
          Creates a new layout set with the primary key.
static LayoutSet fetchByG_P(long groupId, boolean privateLayout)
          Finds the layout set where groupId = ? and privateLayout = ? or returns null if it could not be found.
static LayoutSet fetchByG_P(long groupId, boolean privateLayout, boolean retrieveFromCache)
          Finds the layout set where groupId = ? and privateLayout = ? or returns null if it could not be found, optionally using the finder cache.
static LayoutSet fetchByPrimaryKey(long layoutSetId)
          Finds the layout set with the primary key or returns null if it could not be found.
static LayoutSet fetchByVirtualHost(String virtualHost)
          Finds the layout set where virtualHost = ? or returns null if it could not be found.
static LayoutSet fetchByVirtualHost(String virtualHost, boolean retrieveFromCache)
          Finds the layout set where virtualHost = ? or returns null if it could not be found, optionally using the finder cache.
static List<LayoutSet> findAll()
          Finds all the layout sets.
static List<LayoutSet> findAll(int start, int end)
          Finds a range of all the layout sets.
static List<LayoutSet> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the layout sets.
static LayoutSet findByG_P(long groupId, boolean privateLayout)
          Finds the layout set where groupId = ? and privateLayout = ? or throws a NoSuchLayoutSetException if it could not be found.
static LayoutSet findByGroupId_First(long groupId, OrderByComparator orderByComparator)
          Finds the first layout set in the ordered set where groupId = ?.
static LayoutSet findByGroupId_Last(long groupId, OrderByComparator orderByComparator)
          Finds the last layout set in the ordered set where groupId = ?.
static LayoutSet[] findByGroupId_PrevAndNext(long layoutSetId, long groupId, OrderByComparator orderByComparator)
          Finds the layout sets before and after the current layout set in the ordered set where groupId = ?.
static List<LayoutSet> findByGroupId(long groupId)
          Finds all the layout sets where groupId = ?.
static List<LayoutSet> findByGroupId(long groupId, int start, int end)
          Finds a range of all the layout sets where groupId = ?.
static List<LayoutSet> findByGroupId(long groupId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the layout sets where groupId = ?.
static LayoutSet findByPrimaryKey(long layoutSetId)
          Finds the layout set with the primary key or throws a NoSuchLayoutSetException if it could not be found.
static LayoutSet findByVirtualHost(String virtualHost)
          Finds the layout set where virtualHost = ? or throws a NoSuchLayoutSetException if it could not be found.
static List<LayoutSet> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<LayoutSet> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<LayoutSet> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static LayoutSetPersistence getPersistence()
           
static LayoutSet remove(LayoutSet layoutSet)
           
static LayoutSet remove(long layoutSetId)
          Removes the layout set with the primary key from the database.
static void removeAll()
          Removes all the layout sets from the database.
static void removeByG_P(long groupId, boolean privateLayout)
          Removes the layout set where groupId = ? and privateLayout = ? from the database.
static void removeByGroupId(long groupId)
          Removes all the layout sets where groupId = ? from the database.
static void removeByVirtualHost(String virtualHost)
          Removes the layout set where virtualHost = ? from the database.
 void setPersistence(LayoutSetPersistence persistence)
           
static LayoutSet update(LayoutSet layoutSet, boolean merge)
           
static LayoutSet update(LayoutSet layoutSet, boolean merge, ServiceContext serviceContext)
           
static LayoutSet updateImpl(LayoutSet layoutSet, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutSetUtil

public LayoutSetUtil()
Method Detail

clearCache

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

clearCache

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

findWithDynamicQuery

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

findWithDynamicQuery

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

remove

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

update

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

update

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

cacheResult

public static void cacheResult(LayoutSet layoutSet)
Caches the layout set in the entity cache if it is enabled.

Parameters:
layoutSet - the layout set to cache

cacheResult

public static void cacheResult(List<LayoutSet> layoutSets)
Caches the layout sets in the entity cache if it is enabled.

Parameters:
layoutSets - the layout sets to cache

create

public static LayoutSet create(long layoutSetId)
Creates a new layout set with the primary key. Does not add the layout set to the database.

Parameters:
layoutSetId - the primary key for the new layout set
Returns:
the new layout set

remove

public static LayoutSet remove(long layoutSetId)
                        throws NoSuchLayoutSetException,
                               SystemException
Removes the layout set with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
layoutSetId - the primary key of the layout set to remove
Returns:
the layout set that was removed
Throws:
NoSuchLayoutSetException - if a layout set with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static LayoutSet updateImpl(LayoutSet layoutSet,
                                   boolean merge)
                            throws SystemException
Throws:
SystemException

findByPrimaryKey

public static LayoutSet findByPrimaryKey(long layoutSetId)
                                  throws NoSuchLayoutSetException,
                                         SystemException
Finds the layout set with the primary key or throws a NoSuchLayoutSetException if it could not be found.

Parameters:
layoutSetId - the primary key of the layout set to find
Returns:
the layout set
Throws:
NoSuchLayoutSetException - if a layout set with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static LayoutSet fetchByPrimaryKey(long layoutSetId)
                                   throws SystemException
Finds the layout set with the primary key or returns null if it could not be found.

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

findByGroupId

public static List<LayoutSet> findByGroupId(long groupId)
                                     throws SystemException
Finds all the layout sets where groupId = ?.

Parameters:
groupId - the group id to search with
Returns:
the matching layout sets
Throws:
SystemException - if a system exception occurred

findByGroupId

public static List<LayoutSet> findByGroupId(long groupId,
                                            int start,
                                            int end)
                                     throws SystemException
Finds a range of all the layout sets 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 to search with
start - the lower bound of the range of layout sets to return
end - the upper bound of the range of layout sets to return (not inclusive)
Returns:
the range of matching layout sets
Throws:
SystemException - if a system exception occurred

findByGroupId

public static List<LayoutSet> findByGroupId(long groupId,
                                            int start,
                                            int end,
                                            OrderByComparator orderByComparator)
                                     throws SystemException
Finds an ordered range of all the layout sets 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 to search with
start - the lower bound of the range of layout sets to return
end - the upper bound of the range of layout sets to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching layout sets
Throws:
SystemException - if a system exception occurred

findByGroupId_First

public static LayoutSet findByGroupId_First(long groupId,
                                            OrderByComparator orderByComparator)
                                     throws NoSuchLayoutSetException,
                                            SystemException
Finds the first layout set in the ordered set 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 to search with
orderByComparator - the comparator to order the set by
Returns:
the first matching layout set
Throws:
NoSuchLayoutSetException - if a matching layout set could not be found
SystemException - if a system exception occurred

findByGroupId_Last

public static LayoutSet findByGroupId_Last(long groupId,
                                           OrderByComparator orderByComparator)
                                    throws NoSuchLayoutSetException,
                                           SystemException
Finds the last layout set in the ordered set 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 to search with
orderByComparator - the comparator to order the set by
Returns:
the last matching layout set
Throws:
NoSuchLayoutSetException - if a matching layout set could not be found
SystemException - if a system exception occurred

findByGroupId_PrevAndNext

public static LayoutSet[] findByGroupId_PrevAndNext(long layoutSetId,
                                                    long groupId,
                                                    OrderByComparator orderByComparator)
                                             throws NoSuchLayoutSetException,
                                                    SystemException
Finds the layout sets before and after the current layout set in the ordered set 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:
layoutSetId - the primary key of the current layout set
groupId - the group id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next layout set
Throws:
NoSuchLayoutSetException - if a layout set with the primary key could not be found
SystemException - if a system exception occurred

findByVirtualHost

public static LayoutSet findByVirtualHost(String virtualHost)
                                   throws NoSuchLayoutSetException,
                                          SystemException
Finds the layout set where virtualHost = ? or throws a NoSuchLayoutSetException if it could not be found.

Parameters:
virtualHost - the virtual host to search with
Returns:
the matching layout set
Throws:
NoSuchLayoutSetException - if a matching layout set could not be found
SystemException - if a system exception occurred

fetchByVirtualHost

public static LayoutSet fetchByVirtualHost(String virtualHost)
                                    throws SystemException
Finds the layout set where virtualHost = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
virtualHost - the virtual host to search with
Returns:
the matching layout set, or null if a matching layout set could not be found
Throws:
SystemException - if a system exception occurred

fetchByVirtualHost

public static LayoutSet fetchByVirtualHost(String virtualHost,
                                           boolean retrieveFromCache)
                                    throws SystemException
Finds the layout set where virtualHost = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
virtualHost - the virtual host to search with
Returns:
the matching layout set, or null if a matching layout set could not be found
Throws:
SystemException - if a system exception occurred

findByG_P

public static LayoutSet findByG_P(long groupId,
                                  boolean privateLayout)
                           throws NoSuchLayoutSetException,
                                  SystemException
Finds the layout set where groupId = ? and privateLayout = ? or throws a NoSuchLayoutSetException if it could not be found.

Parameters:
groupId - the group id to search with
privateLayout - the private layout to search with
Returns:
the matching layout set
Throws:
NoSuchLayoutSetException - if a matching layout set could not be found
SystemException - if a system exception occurred

fetchByG_P

public static LayoutSet fetchByG_P(long groupId,
                                   boolean privateLayout)
                            throws SystemException
Finds the layout set where groupId = ? and privateLayout = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
groupId - the group id to search with
privateLayout - the private layout to search with
Returns:
the matching layout set, or null if a matching layout set could not be found
Throws:
SystemException - if a system exception occurred

fetchByG_P

public static LayoutSet fetchByG_P(long groupId,
                                   boolean privateLayout,
                                   boolean retrieveFromCache)
                            throws SystemException
Finds the layout set where groupId = ? and privateLayout = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
groupId - the group id to search with
privateLayout - the private layout to search with
Returns:
the matching layout set, or null if a matching layout set could not be found
Throws:
SystemException - if a system exception occurred

findAll

public static List<LayoutSet> findAll()
                               throws SystemException
Finds all the layout sets.

Returns:
the layout sets
Throws:
SystemException - if a system exception occurred

findAll

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

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 layout sets to return
end - the upper bound of the range of layout sets to return (not inclusive)
Returns:
the range of layout sets
Throws:
SystemException - if a system exception occurred

findAll

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

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

removeByGroupId

public static void removeByGroupId(long groupId)
                            throws SystemException
Removes all the layout sets where groupId = ? from the database.

Parameters:
groupId - the group id to search with
Throws:
SystemException - if a system exception occurred

removeByVirtualHost

public static void removeByVirtualHost(String virtualHost)
                                throws NoSuchLayoutSetException,
                                       SystemException
Removes the layout set where virtualHost = ? from the database.

Parameters:
virtualHost - the virtual host to search with
Throws:
SystemException - if a system exception occurred
NoSuchLayoutSetException

removeByG_P

public static void removeByG_P(long groupId,
                               boolean privateLayout)
                        throws NoSuchLayoutSetException,
                               SystemException
Removes the layout set where groupId = ? and privateLayout = ? from the database.

Parameters:
groupId - the group id to search with
privateLayout - the private layout to search with
Throws:
SystemException - if a system exception occurred
NoSuchLayoutSetException

removeAll

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

Throws:
SystemException - if a system exception occurred

countByGroupId

public static int countByGroupId(long groupId)
                          throws SystemException
Counts all the layout sets where groupId = ?.

Parameters:
groupId - the group id to search with
Returns:
the number of matching layout sets
Throws:
SystemException - if a system exception occurred

countByVirtualHost

public static int countByVirtualHost(String virtualHost)
                              throws SystemException
Counts all the layout sets where virtualHost = ?.

Parameters:
virtualHost - the virtual host to search with
Returns:
the number of matching layout sets
Throws:
SystemException - if a system exception occurred

countByG_P

public static int countByG_P(long groupId,
                             boolean privateLayout)
                      throws SystemException
Counts all the layout sets where groupId = ? and privateLayout = ?.

Parameters:
groupId - the group id to search with
privateLayout - the private layout to search with
Returns:
the number of matching layout sets
Throws:
SystemException - if a system exception occurred

countAll

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

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

getPersistence

public static LayoutSetPersistence getPersistence()

setPersistence

public void setPersistence(LayoutSetPersistence persistence)

Liferay 6.0.5