Liferay 6.1.2-ce-ga3

com.liferay.portlet.documentlibrary.service.persistence
Class DLContentUtil

java.lang.Object
  extended by com.liferay.portlet.documentlibrary.service.persistence.DLContentUtil

public class DLContentUtil
extends Object

The persistence utility for the document library content service. This utility wraps DLContentPersistenceImpl 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:
DLContentPersistence, DLContentPersistenceImpl

Constructor Summary
DLContentUtil()
           
 
Method Summary
static void cacheResult(DLContent dlContent)
          Caches the document library content in the entity cache if it is enabled.
static void cacheResult(List<DLContent> dlContents)
          Caches the document library contents in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(DLContent dlContent)
           
static int countAll()
          Returns the number of document library contents.
static int countByC_R_LikeP(long companyId, long repositoryId, String path)
          Returns the number of document library contents where companyId = ? and repositoryId = ? and path LIKE ?.
static int countByC_R_P_V(long companyId, long repositoryId, String path, String version)
          Returns the number of document library contents where companyId = ? and repositoryId = ? and path = ? and version = ?.
static int countByC_R_P(long companyId, long repositoryId, String path)
          Returns the number of document library contents where companyId = ? and repositoryId = ? and path = ?.
static int countByC_R(long companyId, long repositoryId)
          Returns the number of document library contents where companyId = ? and repositoryId = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static DLContent create(long contentId)
          Creates a new document library content with the primary key.
static DLContent fetchByC_R_First(long companyId, long repositoryId, OrderByComparator orderByComparator)
          Returns the first document library content in the ordered set where companyId = ? and repositoryId = ?.
static DLContent fetchByC_R_Last(long companyId, long repositoryId, OrderByComparator orderByComparator)
          Returns the last document library content in the ordered set where companyId = ? and repositoryId = ?.
static DLContent fetchByC_R_LikeP_First(long companyId, long repositoryId, String path, OrderByComparator orderByComparator)
          Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?.
static DLContent fetchByC_R_LikeP_Last(long companyId, long repositoryId, String path, OrderByComparator orderByComparator)
          Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?.
static DLContent fetchByC_R_P_First(long companyId, long repositoryId, String path, OrderByComparator orderByComparator)
          Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?.
static DLContent fetchByC_R_P_Last(long companyId, long repositoryId, String path, OrderByComparator orderByComparator)
          Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?.
static DLContent fetchByC_R_P_V(long companyId, long repositoryId, String path, String version)
          Returns the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? or returns null if it could not be found.
static DLContent fetchByC_R_P_V(long companyId, long repositoryId, String path, String version, boolean retrieveFromCache)
          Returns the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? or returns null if it could not be found, optionally using the finder cache.
static DLContent fetchByPrimaryKey(long contentId)
          Returns the document library content with the primary key or returns null if it could not be found.
static List<DLContent> findAll()
          Returns all the document library contents.
static List<DLContent> findAll(int start, int end)
          Returns a range of all the document library contents.
static List<DLContent> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the document library contents.
static DLContent findByC_R_First(long companyId, long repositoryId, OrderByComparator orderByComparator)
          Returns the first document library content in the ordered set where companyId = ? and repositoryId = ?.
static DLContent findByC_R_Last(long companyId, long repositoryId, OrderByComparator orderByComparator)
          Returns the last document library content in the ordered set where companyId = ? and repositoryId = ?.
static DLContent findByC_R_LikeP_First(long companyId, long repositoryId, String path, OrderByComparator orderByComparator)
          Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?.
static DLContent findByC_R_LikeP_Last(long companyId, long repositoryId, String path, OrderByComparator orderByComparator)
          Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?.
static DLContent[] findByC_R_LikeP_PrevAndNext(long contentId, long companyId, long repositoryId, String path, OrderByComparator orderByComparator)
          Returns the document library contents before and after the current document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?.
static List<DLContent> findByC_R_LikeP(long companyId, long repositoryId, String path)
          Returns all the document library contents where companyId = ? and repositoryId = ? and path LIKE ?.
static List<DLContent> findByC_R_LikeP(long companyId, long repositoryId, String path, int start, int end)
          Returns a range of all the document library contents where companyId = ? and repositoryId = ? and path LIKE ?.
static List<DLContent> findByC_R_LikeP(long companyId, long repositoryId, String path, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ? and path LIKE ?.
static DLContent findByC_R_P_First(long companyId, long repositoryId, String path, OrderByComparator orderByComparator)
          Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?.
static DLContent findByC_R_P_Last(long companyId, long repositoryId, String path, OrderByComparator orderByComparator)
          Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?.
static DLContent[] findByC_R_P_PrevAndNext(long contentId, long companyId, long repositoryId, String path, OrderByComparator orderByComparator)
          Returns the document library contents before and after the current document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?.
static DLContent findByC_R_P_V(long companyId, long repositoryId, String path, String version)
          Returns the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? or throws a NoSuchContentException if it could not be found.
static List<DLContent> findByC_R_P(long companyId, long repositoryId, String path)
          Returns all the document library contents where companyId = ? and repositoryId = ? and path = ?.
static List<DLContent> findByC_R_P(long companyId, long repositoryId, String path, int start, int end)
          Returns a range of all the document library contents where companyId = ? and repositoryId = ? and path = ?.
static List<DLContent> findByC_R_P(long companyId, long repositoryId, String path, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ? and path = ?.
static DLContent[] findByC_R_PrevAndNext(long contentId, long companyId, long repositoryId, OrderByComparator orderByComparator)
          Returns the document library contents before and after the current document library content in the ordered set where companyId = ? and repositoryId = ?.
static List<DLContent> findByC_R(long companyId, long repositoryId)
          Returns all the document library contents where companyId = ? and repositoryId = ?.
static List<DLContent> findByC_R(long companyId, long repositoryId, int start, int end)
          Returns a range of all the document library contents where companyId = ? and repositoryId = ?.
static List<DLContent> findByC_R(long companyId, long repositoryId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ?.
static DLContent findByPrimaryKey(long contentId)
          Returns the document library content with the primary key or throws a NoSuchContentException if it could not be found.
static List<DLContent> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<DLContent> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<DLContent> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static DLContentPersistence getPersistence()
           
static DLContent remove(long contentId)
          Removes the document library content with the primary key from the database.
static void removeAll()
          Removes all the document library contents from the database.
static void removeByC_R_LikeP(long companyId, long repositoryId, String path)
          Removes all the document library contents where companyId = ? and repositoryId = ? and path LIKE ? from the database.
static DLContent removeByC_R_P_V(long companyId, long repositoryId, String path, String version)
          Removes the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? from the database.
static void removeByC_R_P(long companyId, long repositoryId, String path)
          Removes all the document library contents where companyId = ? and repositoryId = ? and path = ? from the database.
static void removeByC_R(long companyId, long repositoryId)
          Removes all the document library contents where companyId = ? and repositoryId = ? from the database.
 void setPersistence(DLContentPersistence persistence)
          Deprecated.  
static DLContent update(DLContent dlContent, boolean merge)
           
static DLContent update(DLContent dlContent, boolean merge, ServiceContext serviceContext)
           
static DLContent updateImpl(DLContent dlContent, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DLContentUtil

public DLContentUtil()
Method Detail

clearCache

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

clearCache

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

findWithDynamicQuery

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

findWithDynamicQuery

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

update

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

update

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

cacheResult

public static void cacheResult(DLContent dlContent)
Caches the document library content in the entity cache if it is enabled.

Parameters:
dlContent - the document library content

cacheResult

public static void cacheResult(List<DLContent> dlContents)
Caches the document library contents in the entity cache if it is enabled.

Parameters:
dlContents - the document library contents

create

public static DLContent create(long contentId)
Creates a new document library content with the primary key. Does not add the document library content to the database.

Parameters:
contentId - the primary key for the new document library content
Returns:
the new document library content

remove

public static DLContent remove(long contentId)
                        throws SystemException,
                               NoSuchContentException
Removes the document library content with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
contentId - the primary key of the document library content
Returns:
the document library content that was removed
Throws:
NoSuchContentException - if a document library content with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static DLContent updateImpl(DLContent dlContent,
                                   boolean merge)
                            throws SystemException
Throws:
SystemException

findByPrimaryKey

public static DLContent findByPrimaryKey(long contentId)
                                  throws SystemException,
                                         NoSuchContentException
Returns the document library content with the primary key or throws a NoSuchContentException if it could not be found.

Parameters:
contentId - the primary key of the document library content
Returns:
the document library content
Throws:
NoSuchContentException - if a document library content with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static DLContent fetchByPrimaryKey(long contentId)
                                   throws SystemException
Returns the document library content with the primary key or returns null if it could not be found.

Parameters:
contentId - the primary key of the document library content
Returns:
the document library content, or null if a document library content with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByC_R

public static List<DLContent> findByC_R(long companyId,
                                        long repositoryId)
                                 throws SystemException
Returns all the document library contents where companyId = ? and repositoryId = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
Returns:
the matching document library contents
Throws:
SystemException - if a system exception occurred

findByC_R

public static List<DLContent> findByC_R(long companyId,
                                        long repositoryId,
                                        int start,
                                        int end)
                                 throws SystemException
Returns a range of all the document library contents where companyId = ? and repositoryId = ?.

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
repositoryId - the repository ID
start - the lower bound of the range of document library contents
end - the upper bound of the range of document library contents (not inclusive)
Returns:
the range of matching document library contents
Throws:
SystemException - if a system exception occurred

findByC_R

public static List<DLContent> findByC_R(long companyId,
                                        long repositoryId,
                                        int start,
                                        int end,
                                        OrderByComparator orderByComparator)
                                 throws SystemException
Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ?.

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

findByC_R_First

public static DLContent findByC_R_First(long companyId,
                                        long repositoryId,
                                        OrderByComparator orderByComparator)
                                 throws SystemException,
                                        NoSuchContentException
Returns the first document library content in the ordered set where companyId = ? and repositoryId = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching document library content
Throws:
NoSuchContentException - if a matching document library content could not be found
SystemException - if a system exception occurred

fetchByC_R_First

public static DLContent fetchByC_R_First(long companyId,
                                         long repositoryId,
                                         OrderByComparator orderByComparator)
                                  throws SystemException
Returns the first document library content in the ordered set where companyId = ? and repositoryId = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching document library content, or null if a matching document library content could not be found
Throws:
SystemException - if a system exception occurred

findByC_R_Last

public static DLContent findByC_R_Last(long companyId,
                                       long repositoryId,
                                       OrderByComparator orderByComparator)
                                throws SystemException,
                                       NoSuchContentException
Returns the last document library content in the ordered set where companyId = ? and repositoryId = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching document library content
Throws:
NoSuchContentException - if a matching document library content could not be found
SystemException - if a system exception occurred

fetchByC_R_Last

public static DLContent fetchByC_R_Last(long companyId,
                                        long repositoryId,
                                        OrderByComparator orderByComparator)
                                 throws SystemException
Returns the last document library content in the ordered set where companyId = ? and repositoryId = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching document library content, or null if a matching document library content could not be found
Throws:
SystemException - if a system exception occurred

findByC_R_PrevAndNext

public static DLContent[] findByC_R_PrevAndNext(long contentId,
                                                long companyId,
                                                long repositoryId,
                                                OrderByComparator orderByComparator)
                                         throws SystemException,
                                                NoSuchContentException
Returns the document library contents before and after the current document library content in the ordered set where companyId = ? and repositoryId = ?.

Parameters:
contentId - the primary key of the current document library content
companyId - the company ID
repositoryId - the repository ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next document library content
Throws:
NoSuchContentException - if a document library content with the primary key could not be found
SystemException - if a system exception occurred

findByC_R_P

public static List<DLContent> findByC_R_P(long companyId,
                                          long repositoryId,
                                          String path)
                                   throws SystemException
Returns all the document library contents where companyId = ? and repositoryId = ? and path = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
Returns:
the matching document library contents
Throws:
SystemException - if a system exception occurred

findByC_R_P

public static List<DLContent> findByC_R_P(long companyId,
                                          long repositoryId,
                                          String path,
                                          int start,
                                          int end)
                                   throws SystemException
Returns a range of all the document library contents where companyId = ? and repositoryId = ? and path = ?.

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
repositoryId - the repository ID
path - the path
start - the lower bound of the range of document library contents
end - the upper bound of the range of document library contents (not inclusive)
Returns:
the range of matching document library contents
Throws:
SystemException - if a system exception occurred

findByC_R_P

public static List<DLContent> findByC_R_P(long companyId,
                                          long repositoryId,
                                          String path,
                                          int start,
                                          int end,
                                          OrderByComparator orderByComparator)
                                   throws SystemException
Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ? and path = ?.

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

findByC_R_P_First

public static DLContent findByC_R_P_First(long companyId,
                                          long repositoryId,
                                          String path,
                                          OrderByComparator orderByComparator)
                                   throws SystemException,
                                          NoSuchContentException
Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching document library content
Throws:
NoSuchContentException - if a matching document library content could not be found
SystemException - if a system exception occurred

fetchByC_R_P_First

public static DLContent fetchByC_R_P_First(long companyId,
                                           long repositoryId,
                                           String path,
                                           OrderByComparator orderByComparator)
                                    throws SystemException
Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching document library content, or null if a matching document library content could not be found
Throws:
SystemException - if a system exception occurred

findByC_R_P_Last

public static DLContent findByC_R_P_Last(long companyId,
                                         long repositoryId,
                                         String path,
                                         OrderByComparator orderByComparator)
                                  throws SystemException,
                                         NoSuchContentException
Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching document library content
Throws:
NoSuchContentException - if a matching document library content could not be found
SystemException - if a system exception occurred

fetchByC_R_P_Last

public static DLContent fetchByC_R_P_Last(long companyId,
                                          long repositoryId,
                                          String path,
                                          OrderByComparator orderByComparator)
                                   throws SystemException
Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching document library content, or null if a matching document library content could not be found
Throws:
SystemException - if a system exception occurred

findByC_R_P_PrevAndNext

public static DLContent[] findByC_R_P_PrevAndNext(long contentId,
                                                  long companyId,
                                                  long repositoryId,
                                                  String path,
                                                  OrderByComparator orderByComparator)
                                           throws SystemException,
                                                  NoSuchContentException
Returns the document library contents before and after the current document library content in the ordered set where companyId = ? and repositoryId = ? and path = ?.

Parameters:
contentId - the primary key of the current document library content
companyId - the company ID
repositoryId - the repository ID
path - the path
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next document library content
Throws:
NoSuchContentException - if a document library content with the primary key could not be found
SystemException - if a system exception occurred

findByC_R_LikeP

public static List<DLContent> findByC_R_LikeP(long companyId,
                                              long repositoryId,
                                              String path)
                                       throws SystemException
Returns all the document library contents where companyId = ? and repositoryId = ? and path LIKE ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
Returns:
the matching document library contents
Throws:
SystemException - if a system exception occurred

findByC_R_LikeP

public static List<DLContent> findByC_R_LikeP(long companyId,
                                              long repositoryId,
                                              String path,
                                              int start,
                                              int end)
                                       throws SystemException
Returns a range of all the document library contents where companyId = ? and repositoryId = ? and path LIKE ?.

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
repositoryId - the repository ID
path - the path
start - the lower bound of the range of document library contents
end - the upper bound of the range of document library contents (not inclusive)
Returns:
the range of matching document library contents
Throws:
SystemException - if a system exception occurred

findByC_R_LikeP

public static List<DLContent> findByC_R_LikeP(long companyId,
                                              long repositoryId,
                                              String path,
                                              int start,
                                              int end,
                                              OrderByComparator orderByComparator)
                                       throws SystemException
Returns an ordered range of all the document library contents where companyId = ? and repositoryId = ? and path LIKE ?.

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

findByC_R_LikeP_First

public static DLContent findByC_R_LikeP_First(long companyId,
                                              long repositoryId,
                                              String path,
                                              OrderByComparator orderByComparator)
                                       throws SystemException,
                                              NoSuchContentException
Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching document library content
Throws:
NoSuchContentException - if a matching document library content could not be found
SystemException - if a system exception occurred

fetchByC_R_LikeP_First

public static DLContent fetchByC_R_LikeP_First(long companyId,
                                               long repositoryId,
                                               String path,
                                               OrderByComparator orderByComparator)
                                        throws SystemException
Returns the first document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching document library content, or null if a matching document library content could not be found
Throws:
SystemException - if a system exception occurred

findByC_R_LikeP_Last

public static DLContent findByC_R_LikeP_Last(long companyId,
                                             long repositoryId,
                                             String path,
                                             OrderByComparator orderByComparator)
                                      throws SystemException,
                                             NoSuchContentException
Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching document library content
Throws:
NoSuchContentException - if a matching document library content could not be found
SystemException - if a system exception occurred

fetchByC_R_LikeP_Last

public static DLContent fetchByC_R_LikeP_Last(long companyId,
                                              long repositoryId,
                                              String path,
                                              OrderByComparator orderByComparator)
                                       throws SystemException
Returns the last document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching document library content, or null if a matching document library content could not be found
Throws:
SystemException - if a system exception occurred

findByC_R_LikeP_PrevAndNext

public static DLContent[] findByC_R_LikeP_PrevAndNext(long contentId,
                                                      long companyId,
                                                      long repositoryId,
                                                      String path,
                                                      OrderByComparator orderByComparator)
                                               throws SystemException,
                                                      NoSuchContentException
Returns the document library contents before and after the current document library content in the ordered set where companyId = ? and repositoryId = ? and path LIKE ?.

Parameters:
contentId - the primary key of the current document library content
companyId - the company ID
repositoryId - the repository ID
path - the path
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next document library content
Throws:
NoSuchContentException - if a document library content with the primary key could not be found
SystemException - if a system exception occurred

findByC_R_P_V

public static DLContent findByC_R_P_V(long companyId,
                                      long repositoryId,
                                      String path,
                                      String version)
                               throws SystemException,
                                      NoSuchContentException
Returns the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? or throws a NoSuchContentException if it could not be found.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
version - the version
Returns:
the matching document library content
Throws:
NoSuchContentException - if a matching document library content could not be found
SystemException - if a system exception occurred

fetchByC_R_P_V

public static DLContent fetchByC_R_P_V(long companyId,
                                       long repositoryId,
                                       String path,
                                       String version)
                                throws SystemException
Returns the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
version - the version
Returns:
the matching document library content, or null if a matching document library content could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_R_P_V

public static DLContent fetchByC_R_P_V(long companyId,
                                       long repositoryId,
                                       String path,
                                       String version,
                                       boolean retrieveFromCache)
                                throws SystemException
Returns the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
version - the version
retrieveFromCache - whether to use the finder cache
Returns:
the matching document library content, or null if a matching document library content could not be found
Throws:
SystemException - if a system exception occurred

findAll

public static List<DLContent> findAll()
                               throws SystemException
Returns all the document library contents.

Returns:
the document library contents
Throws:
SystemException - if a system exception occurred

findAll

public static List<DLContent> findAll(int start,
                                      int end)
                               throws SystemException
Returns a range of all the document library contents.

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

findAll

public static List<DLContent> findAll(int start,
                                      int end,
                                      OrderByComparator orderByComparator)
                               throws SystemException
Returns an ordered range of all the document library contents.

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

removeByC_R

public static void removeByC_R(long companyId,
                               long repositoryId)
                        throws SystemException
Removes all the document library contents where companyId = ? and repositoryId = ? from the database.

Parameters:
companyId - the company ID
repositoryId - the repository ID
Throws:
SystemException - if a system exception occurred

removeByC_R_P

public static void removeByC_R_P(long companyId,
                                 long repositoryId,
                                 String path)
                          throws SystemException
Removes all the document library contents where companyId = ? and repositoryId = ? and path = ? from the database.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
Throws:
SystemException - if a system exception occurred

removeByC_R_LikeP

public static void removeByC_R_LikeP(long companyId,
                                     long repositoryId,
                                     String path)
                              throws SystemException
Removes all the document library contents where companyId = ? and repositoryId = ? and path LIKE ? from the database.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
Throws:
SystemException - if a system exception occurred

removeByC_R_P_V

public static DLContent removeByC_R_P_V(long companyId,
                                        long repositoryId,
                                        String path,
                                        String version)
                                 throws SystemException,
                                        NoSuchContentException
Removes the document library content where companyId = ? and repositoryId = ? and path = ? and version = ? from the database.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
version - the version
Returns:
the document library content that was removed
Throws:
SystemException - if a system exception occurred
NoSuchContentException

removeAll

public static void removeAll()
                      throws SystemException
Removes all the document library contents from the database.

Throws:
SystemException - if a system exception occurred

countByC_R

public static int countByC_R(long companyId,
                             long repositoryId)
                      throws SystemException
Returns the number of document library contents where companyId = ? and repositoryId = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
Returns:
the number of matching document library contents
Throws:
SystemException - if a system exception occurred

countByC_R_P

public static int countByC_R_P(long companyId,
                               long repositoryId,
                               String path)
                        throws SystemException
Returns the number of document library contents where companyId = ? and repositoryId = ? and path = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
Returns:
the number of matching document library contents
Throws:
SystemException - if a system exception occurred

countByC_R_LikeP

public static int countByC_R_LikeP(long companyId,
                                   long repositoryId,
                                   String path)
                            throws SystemException
Returns the number of document library contents where companyId = ? and repositoryId = ? and path LIKE ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
Returns:
the number of matching document library contents
Throws:
SystemException - if a system exception occurred

countByC_R_P_V

public static int countByC_R_P_V(long companyId,
                                 long repositoryId,
                                 String path,
                                 String version)
                          throws SystemException
Returns the number of document library contents where companyId = ? and repositoryId = ? and path = ? and version = ?.

Parameters:
companyId - the company ID
repositoryId - the repository ID
path - the path
version - the version
Returns:
the number of matching document library contents
Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Returns the number of document library contents.

Returns:
the number of document library contents
Throws:
SystemException - if a system exception occurred

getPersistence

public static DLContentPersistence getPersistence()

setPersistence

public void setPersistence(DLContentPersistence persistence)
Deprecated. 


Liferay 6.1.2-ce-ga3