Class ViewCountEntryUtil
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
- See Also:
- Generated:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
cacheResult
(ViewCountEntry viewCountEntry) Caches the view count entry in the entity cache if it is enabled.static void
cacheResult
(List<ViewCountEntry> viewCountEntries) Caches the view count entries in the entity cache if it is enabled.static void
static void
clearCache
(ViewCountEntry viewCountEntry) static int
countAll()
Returns the number of view count entries.static int
countByC_CN
(long companyId, long classNameId) Returns the number of view count entries where companyId = ? and classNameId = ?.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
fetchByC_CN_First
(long companyId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) Returns the first view count entry in the ordered set where companyId = ? and classNameId = ?.static ViewCountEntry
fetchByC_CN_Last
(long companyId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) Returns the last view count entry in the ordered set where companyId = ? and classNameId = ?.static ViewCountEntry
fetchByPrimaryKey
(ViewCountEntryPK viewCountEntryPK) Returns the view count entry with the primary key or returnsnull
if it could not be found.static Map<Serializable,
ViewCountEntry> fetchByPrimaryKeys
(Set<Serializable> primaryKeys) static List<ViewCountEntry>
findAll()
Returns all the view count entries.static List<ViewCountEntry>
findAll
(int start, int end) Returns a range of all the view count entries.static 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 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 List<ViewCountEntry>
findByC_CN
(long companyId, long classNameId) Returns all the view count entries where companyId = ? and classNameId = ?.static List<ViewCountEntry>
findByC_CN
(long companyId, long classNameId, int start, int end) Returns a range of all the view count entries where companyId = ? and classNameId = ?.static List<ViewCountEntry>
findByC_CN
(long companyId, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) Returns an ordered range of all the view count entries where companyId = ? and classNameId = ?.static List<ViewCountEntry>
findByC_CN
(long companyId, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator, boolean useFinderCache) Returns an ordered range of all the view count entries where companyId = ? and classNameId = ?.static ViewCountEntry
findByC_CN_First
(long companyId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) Returns the first view count entry in the ordered set where companyId = ? and classNameId = ?.static ViewCountEntry
findByC_CN_Last
(long companyId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) Returns the last view count entry in the ordered set where companyId = ? and classNameId = ?.static ViewCountEntry[]
findByC_CN_PrevAndNext
(ViewCountEntryPK viewCountEntryPK, long companyId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) Returns the view count entries before and after the current view count entry in the ordered set where companyId = ? and classNameId = ?.static ViewCountEntry
findByPrimaryKey
(ViewCountEntryPK viewCountEntryPK) Returns the view count entry with the primary key or throws aNoSuchEntryException
if it could not be found.static List<ViewCountEntry>
findWithDynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) static List<ViewCountEntry>
findWithDynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) static List<ViewCountEntry>
findWithDynamicQuery
(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) static ViewCountEntryPersistence
static ViewCountEntry
remove
(ViewCountEntryPK viewCountEntryPK) Removes the view count entry with the primary key from the database.static void
Removes all the view count entries from the database.static void
removeByC_CN
(long companyId, long classNameId) Removes all the view count entries where companyId = ? and classNameId = ? from the database.static void
setPersistence
(ViewCountEntryPersistence persistence) static ViewCountEntry
update
(ViewCountEntry viewCountEntry) static ViewCountEntry
update
(ViewCountEntry viewCountEntry, com.liferay.portal.kernel.service.ServiceContext serviceContext) static ViewCountEntry
updateImpl
(ViewCountEntry viewCountEntry)
-
Constructor Details
-
ViewCountEntryUtil
public ViewCountEntryUtil()
-
-
Method Details
-
clearCache
public static void clearCache()- See Also:
-
BasePersistence.clearCache()
-
clearCache
- See Also:
-
BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
-
countWithDynamicQuery
public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
BasePersistence.countWithDynamicQuery(DynamicQuery)
-
fetchByPrimaryKeys
- See Also:
-
BasePersistence.fetchByPrimaryKeys(Set)
-
findWithDynamicQuery
public static List<ViewCountEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) - See Also:
-
BasePersistence.findWithDynamicQuery(DynamicQuery)
-
findWithDynamicQuery
public static List<ViewCountEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end) - See Also:
-
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
-
findWithDynamicQuery
public static List<ViewCountEntry> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) - See Also:
-
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
-
update
- See Also:
-
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
-
update
public static ViewCountEntry update(ViewCountEntry viewCountEntry, com.liferay.portal.kernel.service.ServiceContext serviceContext) - See Also:
-
BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
-
findByC_CN
Returns all the view count entries where companyId = ? and classNameId = ?.- Parameters:
companyId
- the company IDclassNameId
- the class name ID- Returns:
- the matching view count entries
-
findByC_CN
Returns a range of all the view count entries where companyId = ? and classNameId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromViewCountEntryModelImpl
.- Parameters:
companyId
- the company IDclassNameId
- the class name IDstart
- the lower bound of the range of view count entriesend
- the upper bound of the range of view count entries (not inclusive)- Returns:
- the range of matching view count entries
-
findByC_CN
public static List<ViewCountEntry> findByC_CN(long companyId, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) Returns an ordered range of all the view count entries where companyId = ? and classNameId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromViewCountEntryModelImpl
.- Parameters:
companyId
- the company IDclassNameId
- the class name IDstart
- 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 (optionallynull
)- Returns:
- the ordered range of matching view count entries
-
findByC_CN
public static List<ViewCountEntry> findByC_CN(long companyId, long classNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator, boolean useFinderCache) Returns an ordered range of all the view count entries where companyId = ? and classNameId = ?.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromViewCountEntryModelImpl
.- Parameters:
companyId
- the company IDclassNameId
- the class name IDstart
- 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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of matching view count entries
-
findByC_CN_First
public static ViewCountEntry findByC_CN_First(long companyId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) throws NoSuchEntryException Returns the first view count entry in the ordered set where companyId = ? and classNameId = ?.- Parameters:
companyId
- the company IDclassNameId
- the class name IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching view count entry
- Throws:
NoSuchEntryException
- if a matching view count entry could not be foundNoSuchEntryException
-
fetchByC_CN_First
public static ViewCountEntry fetchByC_CN_First(long companyId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) Returns the first view count entry in the ordered set where companyId = ? and classNameId = ?.- Parameters:
companyId
- the company IDclassNameId
- the class name IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the first matching view count entry, or
null
if a matching view count entry could not be found
-
findByC_CN_Last
public static ViewCountEntry findByC_CN_Last(long companyId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) throws NoSuchEntryException Returns the last view count entry in the ordered set where companyId = ? and classNameId = ?.- Parameters:
companyId
- the company IDclassNameId
- the class name IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching view count entry
- Throws:
NoSuchEntryException
- if a matching view count entry could not be foundNoSuchEntryException
-
fetchByC_CN_Last
public static ViewCountEntry fetchByC_CN_Last(long companyId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) Returns the last view count entry in the ordered set where companyId = ? and classNameId = ?.- Parameters:
companyId
- the company IDclassNameId
- the class name IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the last matching view count entry, or
null
if a matching view count entry could not be found
-
findByC_CN_PrevAndNext
public static ViewCountEntry[] findByC_CN_PrevAndNext(ViewCountEntryPK viewCountEntryPK, long companyId, long classNameId, com.liferay.portal.kernel.util.OrderByComparator<ViewCountEntry> orderByComparator) throws NoSuchEntryException Returns the view count entries before and after the current view count entry in the ordered set where companyId = ? and classNameId = ?.- Parameters:
viewCountEntryPK
- the primary key of the current view count entrycompanyId
- the company IDclassNameId
- the class name IDorderByComparator
- the comparator to order the set by (optionallynull
)- Returns:
- the previous, current, and next view count entry
- Throws:
NoSuchEntryException
- if a view count entry with the primary key could not be foundNoSuchEntryException
-
removeByC_CN
public static void removeByC_CN(long companyId, long classNameId) Removes all the view count entries where companyId = ? and classNameId = ? from the database.- Parameters:
companyId
- the company IDclassNameId
- the class name ID
-
countByC_CN
public static int countByC_CN(long companyId, long classNameId) Returns the number of view count entries where companyId = ? and classNameId = ?.- Parameters:
companyId
- the company IDclassNameId
- the class name ID- Returns:
- the number of matching view count entries
-
cacheResult
Caches the view count entry in the entity cache if it is enabled.- Parameters:
viewCountEntry
- the view count entry
-
cacheResult
Caches the view count entries in the entity cache if it is enabled.- Parameters:
viewCountEntries
- the view count entries
-
create
Creates a new view count entry with the primary key. Does not add the view count entry to the database.- Parameters:
viewCountEntryPK
- the primary key for the new view count entry- Returns:
- the new view count entry
-
remove
Removes the view count entry with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
viewCountEntryPK
- the primary key of the view count entry- Returns:
- the view count entry that was removed
- Throws:
NoSuchEntryException
- if a view count entry with the primary key could not be foundNoSuchEntryException
-
updateImpl
-
findByPrimaryKey
public static ViewCountEntry findByPrimaryKey(ViewCountEntryPK viewCountEntryPK) throws NoSuchEntryException Returns the view count entry with the primary key or throws aNoSuchEntryException
if it could not be found.- Parameters:
viewCountEntryPK
- the primary key of the view count entry- Returns:
- the view count entry
- Throws:
NoSuchEntryException
- if a view count entry with the primary key could not be foundNoSuchEntryException
-
fetchByPrimaryKey
Returns the view count entry with the primary key or returnsnull
if it could not be found.- Parameters:
viewCountEntryPK
- the primary key of the view count entry- Returns:
- the view count entry, or
null
if a view count entry with the primary key could not be found
-
findAll
Returns all the view count entries.- Returns:
- the view count entries
-
findAll
Returns a range of all the view count entries.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromViewCountEntryModelImpl
.- Parameters:
start
- the lower bound of the range of view count entriesend
- the upper bound of the range of view count entries (not inclusive)- Returns:
- the range of view count entries
-
findAll
public static 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.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromViewCountEntryModelImpl
.- Parameters:
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 (optionallynull
)- Returns:
- the ordered range of view count entries
-
findAll
public static 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.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromViewCountEntryModelImpl
.- Parameters:
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 (optionallynull
)useFinderCache
- whether to use the finder cache- Returns:
- the ordered range of view count entries
-
removeAll
public static void removeAll()Removes all the view count entries from the database. -
countAll
public static int countAll()Returns the number of view count entries.- Returns:
- the number of view count entries
-
getCompoundPKColumnNames
-
getPersistence
-
setPersistence
-