public class DLStorageQuotaUtil
extends java.lang.Object
com.liferay.document.library.service.persistence.impl.DLStorageQuotaPersistenceImpl
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
DLStorageQuotaPersistence
Constructor and Description |
---|
DLStorageQuotaUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(DLStorageQuota dlStorageQuota)
Caches the dl storage quota in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<DLStorageQuota> dlStorageQuotas)
Caches the dl storage quotas in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(DLStorageQuota dlStorageQuota) |
static int |
countAll()
Returns the number of dl storage quotas.
|
static int |
countByCompanyId(long companyId)
Returns the number of dl storage quotas where companyId = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static DLStorageQuota |
create(long dlStorageQuotaId)
Creates a new dl storage quota with the primary key.
|
static DLStorageQuota |
fetchByCompanyId(long companyId)
Returns the dl storage quota where companyId = ? or returns
null if it could not be found. |
static DLStorageQuota |
fetchByCompanyId(long companyId,
boolean useFinderCache)
Returns the dl storage quota where companyId = ? or returns
null if it could not be found, optionally using the finder cache. |
static DLStorageQuota |
fetchByPrimaryKey(long dlStorageQuotaId)
Returns the dl storage quota with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,DLStorageQuota> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<DLStorageQuota> |
findAll()
Returns all the dl storage quotas.
|
static java.util.List<DLStorageQuota> |
findAll(int start,
int end)
Returns a range of all the dl storage quotas.
|
static java.util.List<DLStorageQuota> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DLStorageQuota> orderByComparator)
Returns an ordered range of all the dl storage quotas.
|
static java.util.List<DLStorageQuota> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DLStorageQuota> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the dl storage quotas.
|
static DLStorageQuota |
findByCompanyId(long companyId)
Returns the dl storage quota where companyId = ? or throws a
NoSuchStorageQuotaException if it could not be found. |
static DLStorageQuota |
findByPrimaryKey(long dlStorageQuotaId)
Returns the dl storage quota with the primary key or throws a
NoSuchStorageQuotaException if it could not be found. |
static java.util.List<DLStorageQuota> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<DLStorageQuota> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<DLStorageQuota> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<DLStorageQuota> orderByComparator) |
static DLStorageQuotaPersistence |
getPersistence() |
static DLStorageQuota |
remove(long dlStorageQuotaId)
Removes the dl storage quota with the primary key from the database.
|
static void |
removeAll()
Removes all the dl storage quotas from the database.
|
static DLStorageQuota |
removeByCompanyId(long companyId)
Removes the dl storage quota where companyId = ? from the database.
|
static DLStorageQuota |
update(DLStorageQuota dlStorageQuota) |
static DLStorageQuota |
update(DLStorageQuota dlStorageQuota,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static DLStorageQuota |
updateImpl(DLStorageQuota dlStorageQuota) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(DLStorageQuota dlStorageQuota)
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static java.util.Map<java.io.Serializable,DLStorageQuota> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<DLStorageQuota> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<DLStorageQuota> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<DLStorageQuota> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DLStorageQuota> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static DLStorageQuota update(DLStorageQuota dlStorageQuota)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static DLStorageQuota update(DLStorageQuota dlStorageQuota, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static DLStorageQuota findByCompanyId(long companyId) throws NoSuchStorageQuotaException
NoSuchStorageQuotaException
if it could not be found.companyId
- the company IDNoSuchStorageQuotaException
- if a matching dl storage quota could not be foundpublic static DLStorageQuota fetchByCompanyId(long companyId)
null
if it could not be found. Uses the finder cache.companyId
- the company IDnull
if a matching dl storage quota could not be foundpublic static DLStorageQuota fetchByCompanyId(long companyId, boolean useFinderCache)
null
if it could not be found, optionally using the finder cache.companyId
- the company IDuseFinderCache
- whether to use the finder cachenull
if a matching dl storage quota could not be foundpublic static DLStorageQuota removeByCompanyId(long companyId) throws NoSuchStorageQuotaException
companyId
- the company IDNoSuchStorageQuotaException
public static int countByCompanyId(long companyId)
companyId
- the company IDpublic static void cacheResult(DLStorageQuota dlStorageQuota)
dlStorageQuota
- the dl storage quotapublic static void cacheResult(java.util.List<DLStorageQuota> dlStorageQuotas)
dlStorageQuotas
- the dl storage quotaspublic static DLStorageQuota create(long dlStorageQuotaId)
dlStorageQuotaId
- the primary key for the new dl storage quotapublic static DLStorageQuota remove(long dlStorageQuotaId) throws NoSuchStorageQuotaException
dlStorageQuotaId
- the primary key of the dl storage quotaNoSuchStorageQuotaException
- if a dl storage quota with the primary key could not be foundpublic static DLStorageQuota updateImpl(DLStorageQuota dlStorageQuota)
public static DLStorageQuota findByPrimaryKey(long dlStorageQuotaId) throws NoSuchStorageQuotaException
NoSuchStorageQuotaException
if it could not be found.dlStorageQuotaId
- the primary key of the dl storage quotaNoSuchStorageQuotaException
- if a dl storage quota with the primary key could not be foundpublic static DLStorageQuota fetchByPrimaryKey(long dlStorageQuotaId)
null
if it could not be found.dlStorageQuotaId
- the primary key of the dl storage quotanull
if a dl storage quota with the primary key could not be foundpublic static java.util.List<DLStorageQuota> findAll()
public static java.util.List<DLStorageQuota> findAll(int start, int end)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from DLStorageQuotaModelImpl
.
start
- the lower bound of the range of dl storage quotasend
- the upper bound of the range of dl storage quotas (not inclusive)public static java.util.List<DLStorageQuota> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DLStorageQuota> orderByComparator)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from DLStorageQuotaModelImpl
.
start
- the lower bound of the range of dl storage quotasend
- the upper bound of the range of dl storage quotas (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<DLStorageQuota> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DLStorageQuota> orderByComparator, boolean useFinderCache)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent, then the query will include the default ORDER BY logic from DLStorageQuotaModelImpl
.
start
- the lower bound of the range of dl storage quotasend
- the upper bound of the range of dl storage quotas (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)useFinderCache
- whether to use the finder cachepublic static void removeAll()
public static int countAll()
public static DLStorageQuotaPersistence getPersistence()