Liferay 6.1.2-ce-ga3

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

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

public class DLSyncUtil
extends Object

The persistence utility for the d l sync service. This utility wraps DLSyncPersistenceImpl 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:
DLSyncPersistence, DLSyncPersistenceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
DLSyncUtil()
           
 
Method Summary
static void cacheResult(DLSync dlSync)
          Caches the d l sync in the entity cache if it is enabled.
static void cacheResult(List<DLSync> dlSyncs)
          Caches the d l syncs in the entity cache if it is enabled.
static void clearCache()
           
static void clearCache(DLSync dlSync)
           
static int countAll()
          Returns the number of d l syncs.
static int countByC_M_R(long companyId, Date modifiedDate, long repositoryId)
          Returns the number of d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.
static int countByFileId(long fileId)
          Returns the number of d l syncs where fileId = ?.
 long countWithDynamicQuery(DynamicQuery dynamicQuery)
           
static DLSync create(long syncId)
          Creates a new d l sync with the primary key.
static DLSync fetchByC_M_R_First(long companyId, Date modifiedDate, long repositoryId, OrderByComparator orderByComparator)
          Returns the first d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.
static DLSync fetchByC_M_R_Last(long companyId, Date modifiedDate, long repositoryId, OrderByComparator orderByComparator)
          Returns the last d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.
static DLSync fetchByFileId(long fileId)
          Returns the d l sync where fileId = ? or returns null if it could not be found.
static DLSync fetchByFileId(long fileId, boolean retrieveFromCache)
          Returns the d l sync where fileId = ? or returns null if it could not be found, optionally using the finder cache.
static DLSync fetchByPrimaryKey(long syncId)
          Returns the d l sync with the primary key or returns null if it could not be found.
static List<DLSync> findAll()
          Returns all the d l syncs.
static List<DLSync> findAll(int start, int end)
          Returns a range of all the d l syncs.
static List<DLSync> findAll(int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the d l syncs.
static DLSync findByC_M_R_First(long companyId, Date modifiedDate, long repositoryId, OrderByComparator orderByComparator)
          Returns the first d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.
static DLSync findByC_M_R_Last(long companyId, Date modifiedDate, long repositoryId, OrderByComparator orderByComparator)
          Returns the last d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.
static DLSync[] findByC_M_R_PrevAndNext(long syncId, long companyId, Date modifiedDate, long repositoryId, OrderByComparator orderByComparator)
          Returns the d l syncs before and after the current d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.
static List<DLSync> findByC_M_R(long companyId, Date modifiedDate, long repositoryId)
          Returns all the d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.
static List<DLSync> findByC_M_R(long companyId, Date modifiedDate, long repositoryId, int start, int end)
          Returns a range of all the d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.
static List<DLSync> findByC_M_R(long companyId, Date modifiedDate, long repositoryId, int start, int end, OrderByComparator orderByComparator)
          Returns an ordered range of all the d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.
static DLSync findByFileId(long fileId)
          Returns the d l sync where fileId = ? or throws a NoSuchSyncException if it could not be found.
static DLSync findByPrimaryKey(long syncId)
          Returns the d l sync with the primary key or throws a NoSuchSyncException if it could not be found.
static List<DLSync> findWithDynamicQuery(DynamicQuery dynamicQuery)
           
static List<DLSync> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end)
           
static List<DLSync> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
           
static DLSyncPersistence getPersistence()
           
static DLSync remove(long syncId)
          Removes the d l sync with the primary key from the database.
static void removeAll()
          Removes all the d l syncs from the database.
static void removeByC_M_R(long companyId, Date modifiedDate, long repositoryId)
          Removes all the d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ? from the database.
static DLSync removeByFileId(long fileId)
          Removes the d l sync where fileId = ? from the database.
 void setPersistence(DLSyncPersistence persistence)
          Deprecated.  
static DLSync update(DLSync dlSync, boolean merge)
           
static DLSync update(DLSync dlSync, boolean merge, ServiceContext serviceContext)
           
static DLSync updateImpl(DLSync dlSync, boolean merge)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DLSyncUtil

public DLSyncUtil()
Method Detail

clearCache

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

clearCache

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

findWithDynamicQuery

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

findWithDynamicQuery

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

update

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

update

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

cacheResult

public static void cacheResult(DLSync dlSync)
Caches the d l sync in the entity cache if it is enabled.

Parameters:
dlSync - the d l sync

cacheResult

public static void cacheResult(List<DLSync> dlSyncs)
Caches the d l syncs in the entity cache if it is enabled.

Parameters:
dlSyncs - the d l syncs

create

public static DLSync create(long syncId)
Creates a new d l sync with the primary key. Does not add the d l sync to the database.

Parameters:
syncId - the primary key for the new d l sync
Returns:
the new d l sync

remove

public static DLSync remove(long syncId)
                     throws SystemException,
                            NoSuchSyncException
Removes the d l sync with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
syncId - the primary key of the d l sync
Returns:
the d l sync that was removed
Throws:
NoSuchSyncException - if a d l sync with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

public static DLSync updateImpl(DLSync dlSync,
                                boolean merge)
                         throws SystemException
Throws:
SystemException

findByPrimaryKey

public static DLSync findByPrimaryKey(long syncId)
                               throws SystemException,
                                      NoSuchSyncException
Returns the d l sync with the primary key or throws a NoSuchSyncException if it could not be found.

Parameters:
syncId - the primary key of the d l sync
Returns:
the d l sync
Throws:
NoSuchSyncException - if a d l sync with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

public static DLSync fetchByPrimaryKey(long syncId)
                                throws SystemException
Returns the d l sync with the primary key or returns null if it could not be found.

Parameters:
syncId - the primary key of the d l sync
Returns:
the d l sync, or null if a d l sync with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findByFileId

public static DLSync findByFileId(long fileId)
                           throws SystemException,
                                  NoSuchSyncException
Returns the d l sync where fileId = ? or throws a NoSuchSyncException if it could not be found.

Parameters:
fileId - the file ID
Returns:
the matching d l sync
Throws:
NoSuchSyncException - if a matching d l sync could not be found
SystemException - if a system exception occurred

fetchByFileId

public static DLSync fetchByFileId(long fileId)
                            throws SystemException
Returns the d l sync where fileId = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
fileId - the file ID
Returns:
the matching d l sync, or null if a matching d l sync could not be found
Throws:
SystemException - if a system exception occurred

fetchByFileId

public static DLSync fetchByFileId(long fileId,
                                   boolean retrieveFromCache)
                            throws SystemException
Returns the d l sync where fileId = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
fileId - the file ID
retrieveFromCache - whether to use the finder cache
Returns:
the matching d l sync, or null if a matching d l sync could not be found
Throws:
SystemException - if a system exception occurred

findByC_M_R

public static List<DLSync> findByC_M_R(long companyId,
                                       Date modifiedDate,
                                       long repositoryId)
                                throws SystemException
Returns all the d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.

Parameters:
companyId - the company ID
modifiedDate - the modified date
repositoryId - the repository ID
Returns:
the matching d l syncs
Throws:
SystemException - if a system exception occurred

findByC_M_R

public static List<DLSync> findByC_M_R(long companyId,
                                       Date modifiedDate,
                                       long repositoryId,
                                       int start,
                                       int end)
                                throws SystemException
Returns a range of all the d l syncs where companyId = ? and modifiedDate ≥ ? 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
modifiedDate - the modified date
repositoryId - the repository ID
start - the lower bound of the range of d l syncs
end - the upper bound of the range of d l syncs (not inclusive)
Returns:
the range of matching d l syncs
Throws:
SystemException - if a system exception occurred

findByC_M_R

public static List<DLSync> findByC_M_R(long companyId,
                                       Date modifiedDate,
                                       long repositoryId,
                                       int start,
                                       int end,
                                       OrderByComparator orderByComparator)
                                throws SystemException
Returns an ordered range of all the d l syncs where companyId = ? and modifiedDate ≥ ? 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
modifiedDate - the modified date
repositoryId - the repository ID
start - the lower bound of the range of d l syncs
end - the upper bound of the range of d l syncs (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching d l syncs
Throws:
SystemException - if a system exception occurred

findByC_M_R_First

public static DLSync findByC_M_R_First(long companyId,
                                       Date modifiedDate,
                                       long repositoryId,
                                       OrderByComparator orderByComparator)
                                throws SystemException,
                                       NoSuchSyncException
Returns the first d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.

Parameters:
companyId - the company ID
modifiedDate - the modified date
repositoryId - the repository ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching d l sync
Throws:
NoSuchSyncException - if a matching d l sync could not be found
SystemException - if a system exception occurred

fetchByC_M_R_First

public static DLSync fetchByC_M_R_First(long companyId,
                                        Date modifiedDate,
                                        long repositoryId,
                                        OrderByComparator orderByComparator)
                                 throws SystemException
Returns the first d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.

Parameters:
companyId - the company ID
modifiedDate - the modified date
repositoryId - the repository ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching d l sync, or null if a matching d l sync could not be found
Throws:
SystemException - if a system exception occurred

findByC_M_R_Last

public static DLSync findByC_M_R_Last(long companyId,
                                      Date modifiedDate,
                                      long repositoryId,
                                      OrderByComparator orderByComparator)
                               throws SystemException,
                                      NoSuchSyncException
Returns the last d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.

Parameters:
companyId - the company ID
modifiedDate - the modified date
repositoryId - the repository ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching d l sync
Throws:
NoSuchSyncException - if a matching d l sync could not be found
SystemException - if a system exception occurred

fetchByC_M_R_Last

public static DLSync fetchByC_M_R_Last(long companyId,
                                       Date modifiedDate,
                                       long repositoryId,
                                       OrderByComparator orderByComparator)
                                throws SystemException
Returns the last d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.

Parameters:
companyId - the company ID
modifiedDate - the modified date
repositoryId - the repository ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching d l sync, or null if a matching d l sync could not be found
Throws:
SystemException - if a system exception occurred

findByC_M_R_PrevAndNext

public static DLSync[] findByC_M_R_PrevAndNext(long syncId,
                                               long companyId,
                                               Date modifiedDate,
                                               long repositoryId,
                                               OrderByComparator orderByComparator)
                                        throws SystemException,
                                               NoSuchSyncException
Returns the d l syncs before and after the current d l sync in the ordered set where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.

Parameters:
syncId - the primary key of the current d l sync
companyId - the company ID
modifiedDate - the modified date
repositoryId - the repository ID
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the previous, current, and next d l sync
Throws:
NoSuchSyncException - if a d l sync with the primary key could not be found
SystemException - if a system exception occurred

findAll

public static List<DLSync> findAll()
                            throws SystemException
Returns all the d l syncs.

Returns:
the d l syncs
Throws:
SystemException - if a system exception occurred

findAll

public static List<DLSync> findAll(int start,
                                   int end)
                            throws SystemException
Returns a range of all the d l syncs.

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

findAll

public static List<DLSync> findAll(int start,
                                   int end,
                                   OrderByComparator orderByComparator)
                            throws SystemException
Returns an ordered range of all the d l syncs.

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

removeByFileId

public static DLSync removeByFileId(long fileId)
                             throws SystemException,
                                    NoSuchSyncException
Removes the d l sync where fileId = ? from the database.

Parameters:
fileId - the file ID
Returns:
the d l sync that was removed
Throws:
SystemException - if a system exception occurred
NoSuchSyncException

removeByC_M_R

public static void removeByC_M_R(long companyId,
                                 Date modifiedDate,
                                 long repositoryId)
                          throws SystemException
Removes all the d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ? from the database.

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

removeAll

public static void removeAll()
                      throws SystemException
Removes all the d l syncs from the database.

Throws:
SystemException - if a system exception occurred

countByFileId

public static int countByFileId(long fileId)
                         throws SystemException
Returns the number of d l syncs where fileId = ?.

Parameters:
fileId - the file ID
Returns:
the number of matching d l syncs
Throws:
SystemException - if a system exception occurred

countByC_M_R

public static int countByC_M_R(long companyId,
                               Date modifiedDate,
                               long repositoryId)
                        throws SystemException
Returns the number of d l syncs where companyId = ? and modifiedDate ≥ ? and repositoryId = ?.

Parameters:
companyId - the company ID
modifiedDate - the modified date
repositoryId - the repository ID
Returns:
the number of matching d l syncs
Throws:
SystemException - if a system exception occurred

countAll

public static int countAll()
                    throws SystemException
Returns the number of d l syncs.

Returns:
the number of d l syncs
Throws:
SystemException - if a system exception occurred

getPersistence

public static DLSyncPersistence getPersistence()

setPersistence

public void setPersistence(DLSyncPersistence persistence)
Deprecated. 


Liferay 6.1.2-ce-ga3