Liferay 6.0.5

com.liferay.portal.service.persistence
Class LayoutPrototypeUtil

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

public class LayoutPrototypeUtil
extends Object

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

Constructor Summary
LayoutPrototypeUtil()
           
 
Method Summary
static void cacheResult(LayoutPrototype layoutPrototype)
          Caches the layout prototype in the entity cache if it is enabled.
static void cacheResult(List<LayoutPrototype> layoutPrototypes)
          Caches the layout prototypes in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(LayoutPrototype layoutPrototype)
           
static int countAll()
          Counts all the layout prototypes.
static int countByC_A(long companyId, boolean active)
          Counts all the layout prototypes where companyId = ? and active = ?.
static int countByCompanyId(long companyId)
          Counts all the layout prototypes where companyId = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static LayoutPrototype create(long layoutPrototypeId)
          Creates a new layout prototype with the primary key.
static LayoutPrototype fetchByPrimaryKey(long layoutPrototypeId)
          Finds the layout prototype with the primary key or returns null if it could not be found.
static List<LayoutPrototype> findAll()
          Finds all the layout prototypes.
static List<LayoutPrototype> findAll(int start, int end)
          Finds a range of all the layout prototypes.
static List<LayoutPrototype> findAll(int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the layout prototypes.
static LayoutPrototype findByC_A_First(long companyId, boolean active, OrderByComparator orderByComparator)
          Finds the first layout prototype in the ordered set where companyId = ? and active = ?.
static LayoutPrototype findByC_A_Last(long companyId, boolean active, OrderByComparator orderByComparator)
          Finds the last layout prototype in the ordered set where companyId = ? and active = ?.
static LayoutPrototype[] findByC_A_PrevAndNext(long layoutPrototypeId, long companyId, boolean active, OrderByComparator orderByComparator)
          Finds the layout prototypes before and after the current layout prototype in the ordered set where companyId = ? and active = ?.
static List<LayoutPrototype> findByC_A(long companyId, boolean active)
          Finds all the layout prototypes where companyId = ? and active = ?.
static List<LayoutPrototype> findByC_A(long companyId, boolean active, int start, int end)
          Finds a range of all the layout prototypes where companyId = ? and active = ?.
static List<LayoutPrototype> findByC_A(long companyId, boolean active, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the layout prototypes where companyId = ? and active = ?.
static LayoutPrototype findByCompanyId_First(long companyId, OrderByComparator orderByComparator)
          Finds the first layout prototype in the ordered set where companyId = ?.
static LayoutPrototype findByCompanyId_Last(long companyId, OrderByComparator orderByComparator)
          Finds the last layout prototype in the ordered set where companyId = ?.
static LayoutPrototype[] findByCompanyId_PrevAndNext(long layoutPrototypeId, long companyId, OrderByComparator orderByComparator)
          Finds the layout prototypes before and after the current layout prototype in the ordered set where companyId = ?.
static List<LayoutPrototype> findByCompanyId(long companyId)
          Finds all the layout prototypes where companyId = ?.
static List<LayoutPrototype> findByCompanyId(long companyId, int start, int end)
          Finds a range of all the layout prototypes where companyId = ?.
static List<LayoutPrototype> findByCompanyId(long companyId, int start, int end, OrderByComparator orderByComparator)
          Finds an ordered range of all the layout prototypes where companyId = ?.
static LayoutPrototype findByPrimaryKey(long layoutPrototypeId)
          Finds the layout prototype with the primary key or throws a NoSuchLayoutPrototypeException if it could not be found.
static List<LayoutPrototype> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<LayoutPrototype> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<LayoutPrototype> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static LayoutPrototypePersistence getPersistence()
           
static LayoutPrototype remove(LayoutPrototype layoutPrototype)
           
static LayoutPrototype remove(long layoutPrototypeId)
          Removes the layout prototype with the primary key from the database.
static void removeAll()
          Removes all the layout prototypes from the database.
static void removeByC_A(long companyId, boolean active)
          Removes all the layout prototypes where companyId = ? and active = ? from the database.
static void removeByCompanyId(long companyId)
          Removes all the layout prototypes where companyId = ? from the database.
 void setPersistence(LayoutPrototypePersistence persistence)
           
static LayoutPrototype update(LayoutPrototype layoutPrototype, boolean merge)
           
static LayoutPrototype update(LayoutPrototype layoutPrototype, boolean merge, ServiceContext serviceContext)
           
static LayoutPrototype updateImpl(LayoutPrototype layoutPrototype, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutPrototypeUtil

public LayoutPrototypeUtil()
Method Detail

clearCache

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

clearCache

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

findWithDynamicQuery

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

findWithDynamicQuery

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

remove

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

update

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

update

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

cacheResult

public static void cacheResult(LayoutPrototype layoutPrototype)
Caches the layout prototype in the entity cache if it is enabled.

Parameters:
layoutPrototype - the layout prototype to cache

cacheResult

public static void cacheResult(List<LayoutPrototype> layoutPrototypes)
Caches the layout prototypes in the entity cache if it is enabled.

Parameters:
layoutPrototypes - the layout prototypes to cache

create

public static LayoutPrototype create(long layoutPrototypeId)
Creates a new layout prototype with the primary key. Does not add the layout prototype to the database.

Parameters:
layoutPrototypeId - the primary key for the new layout prototype
Returns:
the new layout prototype

remove

public static LayoutPrototype remove(long layoutPrototypeId)
                              throws NoSuchLayoutPrototypeException,
                                     SystemException
Removes the layout prototype with the primary key from the database. Also notifies the appropriate model listeners.

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

updateImpl

public static LayoutPrototype updateImpl(LayoutPrototype layoutPrototype,
                                         boolean merge)
                                  throws SystemException
Throws:
SystemException

findByPrimaryKey

public static LayoutPrototype findByPrimaryKey(long layoutPrototypeId)
                                        throws NoSuchLayoutPrototypeException,
                                               SystemException
Finds the layout prototype with the primary key or throws a NoSuchLayoutPrototypeException if it could not be found.

Parameters:
layoutPrototypeId - the primary key of the layout prototype to find
Returns:
the layout prototype
Throws:
NoSuchLayoutPrototypeException - if a layout prototype with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

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

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

findByCompanyId

public static List<LayoutPrototype> findByCompanyId(long companyId)
                                             throws SystemException
Finds all the layout prototypes where companyId = ?.

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

findByCompanyId

public static List<LayoutPrototype> findByCompanyId(long companyId,
                                                    int start,
                                                    int end)
                                             throws SystemException
Finds a range of all the layout prototypes 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 layout prototypes to return
end - the upper bound of the range of layout prototypes to return (not inclusive)
Returns:
the range of matching layout prototypes
Throws:
SystemException - if a system exception occurred

findByCompanyId

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

findByCompanyId_First

public static LayoutPrototype findByCompanyId_First(long companyId,
                                                    OrderByComparator orderByComparator)
                                             throws NoSuchLayoutPrototypeException,
                                                    SystemException
Finds the first layout prototype 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 layout prototype
Throws:
NoSuchLayoutPrototypeException - if a matching layout prototype could not be found
SystemException - if a system exception occurred

findByCompanyId_Last

public static LayoutPrototype findByCompanyId_Last(long companyId,
                                                   OrderByComparator orderByComparator)
                                            throws NoSuchLayoutPrototypeException,
                                                   SystemException
Finds the last layout prototype 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 layout prototype
Throws:
NoSuchLayoutPrototypeException - if a matching layout prototype could not be found
SystemException - if a system exception occurred

findByCompanyId_PrevAndNext

public static LayoutPrototype[] findByCompanyId_PrevAndNext(long layoutPrototypeId,
                                                            long companyId,
                                                            OrderByComparator orderByComparator)
                                                     throws NoSuchLayoutPrototypeException,
                                                            SystemException
Finds the layout prototypes before and after the current layout prototype 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:
layoutPrototypeId - the primary key of the current layout prototype
companyId - the company id to search with
orderByComparator - the comparator to order the set by
Returns:
the previous, current, and next layout prototype
Throws:
NoSuchLayoutPrototypeException - if a layout prototype with the primary key could not be found
SystemException - if a system exception occurred

findByC_A

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

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

findByC_A

public static List<LayoutPrototype> findByC_A(long companyId,
                                              boolean active,
                                              int start,
                                              int end)
                                       throws SystemException
Finds a range of all the layout prototypes 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 layout prototypes to return
end - the upper bound of the range of layout prototypes to return (not inclusive)
Returns:
the range of matching layout prototypes
Throws:
SystemException - if a system exception occurred

findByC_A

public static List<LayoutPrototype> findByC_A(long companyId,
                                              boolean active,
                                              int start,
                                              int end,
                                              OrderByComparator orderByComparator)
                                       throws SystemException
Finds an ordered range of all the layout prototypes 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 layout prototypes to return
end - the upper bound of the range of layout prototypes to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching layout prototypes
Throws:
SystemException - if a system exception occurred

findByC_A_First

public static LayoutPrototype findByC_A_First(long companyId,
                                              boolean active,
                                              OrderByComparator orderByComparator)
                                       throws NoSuchLayoutPrototypeException,
                                              SystemException
Finds the first layout prototype 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 layout prototype
Throws:
NoSuchLayoutPrototypeException - if a matching layout prototype could not be found
SystemException - if a system exception occurred

findByC_A_Last

public static LayoutPrototype findByC_A_Last(long companyId,
                                             boolean active,
                                             OrderByComparator orderByComparator)
                                      throws NoSuchLayoutPrototypeException,
                                             SystemException
Finds the last layout prototype 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 layout prototype
Throws:
NoSuchLayoutPrototypeException - if a matching layout prototype could not be found
SystemException - if a system exception occurred

findByC_A_PrevAndNext

public static LayoutPrototype[] findByC_A_PrevAndNext(long layoutPrototypeId,
                                                      long companyId,
                                                      boolean active,
                                                      OrderByComparator orderByComparator)
                                               throws NoSuchLayoutPrototypeException,
                                                      SystemException
Finds the layout prototypes before and after the current layout prototype 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:
layoutPrototypeId - the primary key of the current layout prototype
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 layout prototype
Throws:
NoSuchLayoutPrototypeException - if a layout prototype with the primary key could not be found
SystemException - if a system exception occurred

findAll

public static List<LayoutPrototype> findAll()
                                     throws SystemException
Finds all the layout prototypes.

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

findAll

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

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

findAll

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

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

removeByCompanyId

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

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

removeByC_A

public static void removeByC_A(long companyId,
                               boolean active)
                        throws SystemException
Removes all the layout prototypes 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 layout prototypes from the database.

Throws:
SystemException - if a system exception occurred

countByCompanyId

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

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

countByC_A

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

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

countAll

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

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

getPersistence

public static LayoutPrototypePersistence getPersistence()

setPersistence

public void setPersistence(LayoutPrototypePersistence persistence)

Liferay 6.0.5