public class EntryUtil
extends java.lang.Object
com.liferay.portal.reports.engine.console.service.persistence.impl.EntryPersistenceImpl
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
EntryPersistence
Constructor and Description |
---|
EntryUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheResult(Entry entry)
Caches the entry in the entity cache if it is enabled.
|
static void |
cacheResult(java.util.List<Entry> entries)
Caches the entries in the entity cache if it is enabled.
|
static void |
clearCache() |
static void |
clearCache(Entry entry) |
static int |
countAll()
Returns the number of entries.
|
static long |
countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static Entry |
create(long entryId)
Creates a new entry with the primary key.
|
static Entry |
fetchByPrimaryKey(long entryId)
Returns the entry with the primary key or returns
null if it could not be found. |
static java.util.Map<java.io.Serializable,Entry> |
fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys) |
static java.util.List<Entry> |
findAll()
Returns all the entries.
|
static java.util.List<Entry> |
findAll(int start,
int end)
Returns a range of all the entries.
|
static java.util.List<Entry> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Entry> orderByComparator)
Returns an ordered range of all the entries.
|
static java.util.List<Entry> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Entry> orderByComparator,
boolean useFinderCache)
Returns an ordered range of all the entries.
|
static Entry |
findByPrimaryKey(long entryId)
Returns the entry with the primary key or throws a
NoSuchEntryException if it could not be found. |
static java.util.List<Entry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) |
static java.util.List<Entry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end) |
static java.util.List<Entry> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator<Entry> orderByComparator) |
static EntryPersistence |
getPersistence() |
static Entry |
remove(long entryId)
Removes the entry with the primary key from the database.
|
static void |
removeAll()
Removes all the entries from the database.
|
static Entry |
update(Entry entry) |
static Entry |
update(Entry entry,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
static Entry |
updateImpl(Entry entry) |
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(Entry entry)
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,Entry> fetchByPrimaryKeys(java.util.Set<java.io.Serializable> primaryKeys)
BasePersistence.fetchByPrimaryKeys(Set)
public static java.util.List<Entry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static java.util.List<Entry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static java.util.List<Entry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Entry> orderByComparator)
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static Entry update(Entry entry)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
public static Entry update(Entry entry, com.liferay.portal.kernel.service.ServiceContext serviceContext)
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
public static void cacheResult(Entry entry)
entry
- the entrypublic static void cacheResult(java.util.List<Entry> entries)
entries
- the entriespublic static Entry create(long entryId)
entryId
- the primary key for the new entrypublic static Entry remove(long entryId) throws NoSuchEntryException
entryId
- the primary key of the entryNoSuchEntryException
- if a entry with the primary key could not be foundpublic static Entry findByPrimaryKey(long entryId) throws NoSuchEntryException
NoSuchEntryException
if it could not be found.entryId
- the primary key of the entryNoSuchEntryException
- if a entry with the primary key could not be foundpublic static Entry fetchByPrimaryKey(long entryId)
null
if it could not be found.entryId
- the primary key of the entrynull
if a entry with the primary key could not be foundpublic static java.util.List<Entry> findAll()
public static java.util.List<Entry> 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 EntryModelImpl
.
start
- the lower bound of the range of entriesend
- the upper bound of the range of entries (not inclusive)public static java.util.List<Entry> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Entry> 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 EntryModelImpl
.
start
- the lower bound of the range of entriesend
- the upper bound of the range of entries (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)public static java.util.List<Entry> findAll(int start, int end, com.liferay.portal.kernel.util.OrderByComparator<Entry> 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 EntryModelImpl
.
start
- the lower bound of the range of entriesend
- the upper bound of the range of entries (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 EntryPersistence getPersistence()