@ProviderType public interface CounterPersistence extends BasePersistence<Counter>
Caching information and settings can be found in portal.properties
com.liferay.counter.service.persistence.impl.CounterPersistenceImpl,
CounterUtil| Modifier and Type | Method and Description |
|---|---|
void |
cacheResult(Counter counter)
Caches the counter in the entity cache if it is enabled.
|
void |
cacheResult(List<Counter> counters)
Caches the counters in the entity cache if it is enabled.
|
int |
countAll()
Returns the number of counters.
|
Counter |
create(String name)
Creates a new counter with the primary key.
|
Counter |
fetchByPrimaryKey(String name)
Returns the counter with the primary key or returns
null if it could not be found. |
Map<Serializable,Counter> |
fetchByPrimaryKeys(Set<Serializable> primaryKeys) |
List<Counter> |
findAll()
Returns all the counters.
|
List<Counter> |
findAll(int start,
int end)
Returns a range of all the counters.
|
List<Counter> |
findAll(int start,
int end,
OrderByComparator<Counter> orderByComparator)
Returns an ordered range of all the counters.
|
List<Counter> |
findAll(int start,
int end,
OrderByComparator<Counter> orderByComparator,
boolean retrieveFromCache)
Returns an ordered range of all the counters.
|
Counter |
findByPrimaryKey(String name)
Returns the counter with the primary key or throws a
NoSuchCounterException if it could not be found. |
Counter |
remove(String name)
Removes the counter with the primary key from the database.
|
void |
removeAll()
Removes all the counters from the database.
|
Counter |
updateImpl(Counter counter) |
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getBadColumnNames, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, updatevoid cacheResult(Counter counter)
counter - the countervoid cacheResult(List<Counter> counters)
counters - the countersCounter create(String name)
name - the primary key for the new counterCounter remove(String name) throws NoSuchCounterException
name - the primary key of the counterNoSuchCounterException - if a counter with the primary key could not be foundCounter findByPrimaryKey(String name) throws NoSuchCounterException
NoSuchCounterException if it could not be found.name - the primary key of the counterNoSuchCounterException - if a counter with the primary key could not be foundCounter fetchByPrimaryKey(String name)
null if it could not be found.name - the primary key of the counternull if a counter with the primary key could not be foundMap<Serializable,Counter> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
fetchByPrimaryKeys in interface BasePersistence<Counter>List<Counter> 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 CounterModelImpl. 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 countersend - the upper bound of the range of counters (not inclusive)List<Counter> findAll(int start, int end, OrderByComparator<Counter> 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 CounterModelImpl. 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 countersend - the upper bound of the range of counters (not inclusive)orderByComparator - the comparator to order the results by (optionally null)List<Counter> findAll(int start, int end, OrderByComparator<Counter> 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 CounterModelImpl. 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 countersend - the upper bound of the range of counters (not inclusive)orderByComparator - the comparator to order the results by (optionally null)retrieveFromCache - whether to retrieve from the finder cachevoid removeAll()
int countAll()