@ProviderType
public class HtmlPreviewEntryUtil
extends java.lang.Object
com.liferay.html.preview.service.persistence.impl.HtmlPreviewEntryPersistenceImpl
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
HtmlPreviewEntryPersistence
,
com.liferay.html.preview.service.persistence.impl.HtmlPreviewEntryPersistenceImpl
Constructor and Description |
---|
HtmlPreviewEntryUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(HtmlPreviewEntry htmlPreviewEntry)
Caches the html preview entry in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<HtmlPreviewEntry> htmlPreviewEntries)
Caches the html preview entries in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(HtmlPreviewEntry htmlPreviewEntry) |
static int |
countAll()
Returns the number of html preview entries.
|
static int |
countByG_C_C(long groupId,
long classNameId,
long classPK)
Returns the number of html preview entries where groupId = ? and classNameId = ? and classPK = ?.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static HtmlPreviewEntry |
create(long htmlPreviewEntryId)
Creates a new html preview entry with the primary key.
|
static HtmlPreviewEntry |
fetchByG_C_C(long groupId,
long classNameId,
long classPK)
Returns the html preview entry where groupId = ? and classNameId = ? and classPK = ? or returns
null if it could not be found. |
static HtmlPreviewEntry |
fetchByG_C_C(long groupId,
long classNameId,
long classPK,
boolean retrieveFromCache)
Returns the html preview entry where groupId = ? and classNameId = ? and classPK = ? or returns
null if it could not be found, optionally using the finder cache. |
static HtmlPreviewEntry |
fetchByPrimaryKey(long htmlPreviewEntryId)
Returns the html preview entry with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,HtmlPreviewEntry> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<HtmlPreviewEntry> |
findAll()
Returns all the html preview entries.
|
static java.util.List<HtmlPreviewEntry> |
findAll(int start,
int end)
Returns a range of all the html preview entries.
|
static java.util.List<HtmlPreviewEntry> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<HtmlPreviewEntry> orderByComparator)
Returns an ordered range of all the html preview entries.
|
static java.util.List<HtmlPreviewEntry> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<HtmlPreviewEntry> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the html preview entries.
|
static HtmlPreviewEntry |
findByG_C_C(long groupId,
long classNameId,
long classPK)
Returns the html preview entry where groupId = ? and classNameId = ? and classPK = ? or throws a
NoSuchHtmlPreviewEntryException if it could not be found. |
static HtmlPreviewEntry |
findByPrimaryKey(long htmlPreviewEntryId)
Returns the html preview entry with the primary key or throws a
NoSuchHtmlPreviewEntryException if it could not be found. |
static java.util.List<HtmlPreviewEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<HtmlPreviewEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<HtmlPreviewEntry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<HtmlPreviewEntry> orderByComparator) |
static HtmlPreviewEntryPersistence |
getPersistence() |
static HtmlPreviewEntry |
remove(long htmlPreviewEntryId)
Removes the html preview entry with the primary key from the database.
|
static void |
removeAll()
Removes all the html preview entries from the database.
|
static HtmlPreviewEntry |
removeByG_C_C(long groupId,
long classNameId,
long classPK)
Removes the html preview entry where groupId = ? and classNameId = ? and classPK = ? from the database.
|
static HtmlPreviewEntry |
update(HtmlPreviewEntry htmlPreviewEntry) |
static HtmlPreviewEntry |
update(HtmlPreviewEntry htmlPreviewEntry,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static HtmlPreviewEntry |
updateImpl(HtmlPreviewEntry htmlPreviewEntry) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(HtmlPreviewEntry htmlPreviewEntry)
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.List<HtmlPreviewEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<HtmlPreviewEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<HtmlPreviewEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<HtmlPreviewEntry> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static HtmlPreviewEntry update(HtmlPreviewEntry htmlPreviewEntry)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static HtmlPreviewEntry update(HtmlPreviewEntry htmlPreviewEntry, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static HtmlPreviewEntry findByG_C_C(long groupId, long classNameId, long classPK) throws NoSuchHtmlPreviewEntryException
NoSuchHtmlPreviewEntryException
if it could not be found.groupId
- the group IDclassNameId
- the class name IDclassPK
- the class pkNoSuchHtmlPreviewEntryException
- if a matching html preview entry could not be foundpublic static HtmlPreviewEntry fetchByG_C_C(long groupId, long classNameId, long classPK)
null
if it could not be found. Uses the finder cache.groupId
- the group IDclassNameId
- the class name IDclassPK
- the class pknull
if a matching html preview entry could not be foundpublic static HtmlPreviewEntry fetchByG_C_C(long groupId, long classNameId, long classPK, boolean retrieveFromCache)
null
if it could not be found, optionally using the finder cache.groupId
- the group IDclassNameId
- the class name IDclassPK
- the class pkretrieveFromCache
- whether to retrieve from the finder cachenull
if a matching html preview entry could not be foundpublic static HtmlPreviewEntry removeByG_C_C(long groupId, long classNameId, long classPK) throws NoSuchHtmlPreviewEntryException
groupId
- the group IDclassNameId
- the class name IDclassPK
- the class pkNoSuchHtmlPreviewEntryException
public static int countByG_C_C(long groupId, long classNameId, long classPK)
groupId
- the group IDclassNameId
- the class name IDclassPK
- the class pkpublic static void cacheResult(HtmlPreviewEntry htmlPreviewEntry)
htmlPreviewEntry
- the html preview entrypublic static void cacheResult(java.util.List<HtmlPreviewEntry> htmlPreviewEntries)
htmlPreviewEntries
- the html preview entriespublic static HtmlPreviewEntry create(long htmlPreviewEntryId)
htmlPreviewEntryId
- the primary key for the new html preview entrypublic static HtmlPreviewEntry remove(long htmlPreviewEntryId) throws NoSuchHtmlPreviewEntryException
htmlPreviewEntryId
- the primary key of the html preview entryNoSuchHtmlPreviewEntryException
- if a html preview entry with the primary key could not be foundpublic static HtmlPreviewEntry updateImpl(HtmlPreviewEntry htmlPreviewEntry)
public static HtmlPreviewEntry findByPrimaryKey(long htmlPreviewEntryId) throws NoSuchHtmlPreviewEntryException
NoSuchHtmlPreviewEntryException
if it could not be found.htmlPreviewEntryId
- the primary key of the html preview entryNoSuchHtmlPreviewEntryException
- if a html preview entry with the primary key could not be foundpublic static HtmlPreviewEntry fetchByPrimaryKey(long htmlPreviewEntryId)
null
if it could not be found.htmlPreviewEntryId
- the primary key of the html preview entrynull
if a html preview entry with the primary key could not be foundpublic static java.util.Map<java.io.Serializable,HtmlPreviewEntry> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
public static java.util.List<HtmlPreviewEntry> findAll()
public static java.util.List<HtmlPreviewEntry> 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 and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from HtmlPreviewEntryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of html preview entriesend
- the upper bound of the range of html preview entries (not inclusive)public static java.util.List<HtmlPreviewEntry> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<HtmlPreviewEntry> 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 and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from HtmlPreviewEntryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of html preview entriesend
- the upper bound of the range of html preview entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<HtmlPreviewEntry> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<HtmlPreviewEntry> orderByComparator, boolean retrieveFromCache)
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 and pagination is required (start
and end
are not QueryUtil#ALL_POS
), then the query will include the default ORDER BY logic from HtmlPreviewEntryModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start
- the lower bound of the range of html preview entriesend
- the upper bound of the range of html preview entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)retrieveFromCache
- whether to retrieve from the finder cachepublic static void removeAll()
public static int countAll()
public static HtmlPreviewEntryPersistence getPersistence()