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