|
Liferay 6.2-ce-ga3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.service.persistence.impl.BasePersistenceImpl<Shard>
com.liferay.portal.service.persistence.ShardPersistenceImpl
public class ShardPersistenceImpl
The persistence implementation for the shard service.
Caching information and settings can be found in portal.properties
ShardPersistence,
ShardUtil| Field Summary | |
|---|---|
static String |
FINDER_CLASS_NAME_ENTITY
|
static String |
FINDER_CLASS_NAME_LIST_WITH_PAGINATION
|
static String |
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION
|
static FinderPath |
FINDER_PATH_COUNT_ALL
|
static FinderPath |
FINDER_PATH_COUNT_BY_C_C
|
static FinderPath |
FINDER_PATH_COUNT_BY_NAME
|
static FinderPath |
FINDER_PATH_FETCH_BY_C_C
|
static FinderPath |
FINDER_PATH_FETCH_BY_NAME
|
static FinderPath |
FINDER_PATH_WITH_PAGINATION_FIND_ALL
|
static FinderPath |
FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL
|
| Fields inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl |
|---|
COUNT_COLUMN_NAME, FINDER_ARGS_EMPTY, listeners, ORDER_BY_ASC, ORDER_BY_ASC_HAS_NEXT, ORDER_BY_CLAUSE, ORDER_BY_DESC, ORDER_BY_DESC_HAS_NEXT, WHERE_AND, WHERE_GREATER_THAN, WHERE_GREATER_THAN_HAS_NEXT, WHERE_LESSER_THAN, WHERE_LESSER_THAN_HAS_NEXT, WHERE_OR |
| Constructor Summary | |
|---|---|
ShardPersistenceImpl()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
Initializes the shard persistence. |
void |
cacheResult(List<Shard> shards)
Caches the shards in the entity cache if it is enabled. |
void |
cacheResult(Shard shard)
Caches the shard in the entity cache if it is enabled. |
protected void |
cacheUniqueFindersCache(Shard shard)
|
void |
clearCache()
Clears the cache for all shards. |
void |
clearCache(List<Shard> shards)
Clears the cache for a List instances of this model. |
void |
clearCache(Shard shard)
Clears the cache for the shard. |
protected void |
clearUniqueFindersCache(Shard shard)
|
int |
countAll()
Returns the number of shards. |
int |
countByC_C(long classNameId,
long classPK)
Returns the number of shards where classNameId = ? and classPK = ?. |
int |
countByName(String name)
Returns the number of shards where name = ?. |
Shard |
create(long shardId)
Creates a new shard with the primary key. |
void |
destroy()
|
Shard |
fetchByC_C(long classNameId,
long classPK)
Returns the shard where classNameId = ? and classPK = ? or returns null if it could not be found. |
Shard |
fetchByC_C(long classNameId,
long classPK,
boolean retrieveFromCache)
Returns the shard where classNameId = ? and classPK = ? or returns null if it could not be found, optionally using the finder cache. |
Shard |
fetchByName(String name)
Returns the shard where name = ? or returns null if it could not be found. |
Shard |
fetchByName(String name,
boolean retrieveFromCache)
Returns the shard where name = ? or returns null if it could not be found, optionally using the finder cache. |
Shard |
fetchByPrimaryKey(long shardId)
Returns the shard with the primary key or returns null if it could not be found. |
Shard |
fetchByPrimaryKey(Serializable primaryKey)
Returns the shard with the primary key or returns null if it could not be found. |
List<Shard> |
findAll()
Returns all the shards. |
List<Shard> |
findAll(int start,
int end)
Returns a range of all the shards. |
List<Shard> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the shards. |
Shard |
findByC_C(long classNameId,
long classPK)
Returns the shard where classNameId = ? and classPK = ? or throws a NoSuchShardException if it could not be found. |
Shard |
findByName(String name)
Returns the shard where name = ? or throws a NoSuchShardException if it could not be found. |
Shard |
findByPrimaryKey(long shardId)
Returns the shard with the primary key or throws a NoSuchShardException if it could not be found. |
Shard |
findByPrimaryKey(Serializable primaryKey)
Returns the shard with the primary key or throws a NoSuchModelException if it could not be found. |
Shard |
remove(long shardId)
Removes the shard with the primary key from the database. |
Shard |
remove(Serializable primaryKey)
Removes the shard with the primary key from the database. |
void |
removeAll()
Removes all the shards from the database. |
Shard |
removeByC_C(long classNameId,
long classPK)
Removes the shard where classNameId = ? and classPK = ? from the database. |
Shard |
removeByName(String name)
Removes the shard where name = ? from the database. |
protected Shard |
removeImpl(Shard shard)
Removes the model instance from the database. |
protected Shard |
toUnwrappedModel(Shard shard)
|
Shard |
updateImpl(Shard shard)
Updates the model instance in the database or adds it if it does not yet exist. |
| Methods inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl |
|---|
appendOrderByComparator, appendOrderByComparator, closeSession, countWithDynamicQuery, countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getBadColumnNames, getClassLoader, getCurrentSession, getDataSource, getDB, getDialect, getListeners, getModelClass, openNewSession, openSession, processException, registerListener, remove, removeConjunction, setDataSource, setModelClass, setSessionFactory, unregisterListener, update, update, update, update, updateImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence |
|---|
closeSession, countWithDynamicQuery, countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, setDataSource, unregisterListener, update, update, update, update |
| Field Detail |
|---|
public static final String FINDER_CLASS_NAME_ENTITY
public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION
public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION
public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL
public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL
public static final FinderPath FINDER_PATH_COUNT_ALL
public static final FinderPath FINDER_PATH_FETCH_BY_NAME
public static final FinderPath FINDER_PATH_COUNT_BY_NAME
public static final FinderPath FINDER_PATH_FETCH_BY_C_C
public static final FinderPath FINDER_PATH_COUNT_BY_C_C
| Constructor Detail |
|---|
public ShardPersistenceImpl()
| Method Detail |
|---|
public Shard findByName(String name)
throws NoSuchShardException,
SystemException
NoSuchShardException if it could not be found.
findByName in interface ShardPersistencename - the name
NoSuchShardException - if a matching shard could not be found
SystemException - if a system exception occurred
public Shard fetchByName(String name)
throws SystemException
null if it could not be found. Uses the finder cache.
fetchByName in interface ShardPersistencename - the name
null if a matching shard could not be found
SystemException - if a system exception occurred
public Shard fetchByName(String name,
boolean retrieveFromCache)
throws SystemException
null if it could not be found, optionally using the finder cache.
fetchByName in interface ShardPersistencename - the nameretrieveFromCache - whether to use the finder cache
null if a matching shard could not be found
SystemException - if a system exception occurred
public Shard removeByName(String name)
throws NoSuchShardException,
SystemException
removeByName in interface ShardPersistencename - the name
SystemException - if a system exception occurred
NoSuchShardException
public int countByName(String name)
throws SystemException
countByName in interface ShardPersistencename - the name
SystemException - if a system exception occurred
public Shard findByC_C(long classNameId,
long classPK)
throws NoSuchShardException,
SystemException
NoSuchShardException if it could not be found.
findByC_C in interface ShardPersistenceclassNameId - the class name IDclassPK - the class p k
NoSuchShardException - if a matching shard could not be found
SystemException - if a system exception occurred
public Shard fetchByC_C(long classNameId,
long classPK)
throws SystemException
null if it could not be found. Uses the finder cache.
fetchByC_C in interface ShardPersistenceclassNameId - the class name IDclassPK - the class p k
null if a matching shard could not be found
SystemException - if a system exception occurred
public Shard fetchByC_C(long classNameId,
long classPK,
boolean retrieveFromCache)
throws SystemException
null if it could not be found, optionally using the finder cache.
fetchByC_C in interface ShardPersistenceclassNameId - the class name IDclassPK - the class p kretrieveFromCache - whether to use the finder cache
null if a matching shard could not be found
SystemException - if a system exception occurred
public Shard removeByC_C(long classNameId,
long classPK)
throws NoSuchShardException,
SystemException
removeByC_C in interface ShardPersistenceclassNameId - the class name IDclassPK - the class p k
SystemException - if a system exception occurred
NoSuchShardException
public int countByC_C(long classNameId,
long classPK)
throws SystemException
countByC_C in interface ShardPersistenceclassNameId - the class name IDclassPK - the class p k
SystemException - if a system exception occurredpublic void cacheResult(Shard shard)
cacheResult in interface ShardPersistenceshard - the shardpublic void cacheResult(List<Shard> shards)
cacheResult in interface ShardPersistenceshards - the shardspublic void clearCache()
The EntityCache and FinderCache are both cleared by this method.
clearCache in interface BasePersistence<Shard>clearCache in class BasePersistenceImpl<Shard>public void clearCache(Shard shard)
The EntityCache and FinderCache are both cleared by this method.
clearCache in interface BasePersistence<Shard>clearCache in class BasePersistenceImpl<Shard>shard - the instance of this model to clear the cache forpublic void clearCache(List<Shard> shards)
BasePersistence
The EntityCache and FinderCache are both cleared by this
method.
clearCache in interface BasePersistence<Shard>clearCache in class BasePersistenceImpl<Shard>shards - the List instances of this model to clear the cache forprotected void cacheUniqueFindersCache(Shard shard)
protected void clearUniqueFindersCache(Shard shard)
public Shard create(long shardId)
create in interface ShardPersistenceshardId - the primary key for the new shard
public Shard remove(long shardId)
throws NoSuchShardException,
SystemException
remove in interface ShardPersistenceshardId - the primary key of the shard
NoSuchShardException - if a shard with the primary key could not be found
SystemException - if a system exception occurred
public Shard remove(Serializable primaryKey)
throws NoSuchShardException,
SystemException
remove in interface BasePersistence<Shard>remove in class BasePersistenceImpl<Shard>primaryKey - the primary key of the shard
NoSuchShardException - if a shard with the primary key could not be found
SystemException - if a system exception occurred
protected Shard removeImpl(Shard shard)
throws SystemException
BasePersistenceImplBasePersistenceImpl.update(BaseModel,
boolean) depends on this method to implement the remove operation; it
only notifies the model listeners.
removeImpl in class BasePersistenceImpl<Shard>shard - the model instance to remove
SystemException - if a system exception occurred
public Shard updateImpl(Shard shard)
throws SystemException
BasePersistenceImplBasePersistenceImpl.remove(BaseModel) depends on this method to implement the
update operation; it only notifies the model listeners.
updateImpl in interface ShardPersistenceupdateImpl in class BasePersistenceImpl<Shard>shard - the model instance to update
SystemException - if a system exception occurredprotected Shard toUnwrappedModel(Shard shard)
public Shard findByPrimaryKey(Serializable primaryKey)
throws NoSuchShardException,
SystemException
NoSuchModelException if it could not be found.
findByPrimaryKey in interface BasePersistence<Shard>findByPrimaryKey in class BasePersistenceImpl<Shard>primaryKey - the primary key of the shard
NoSuchShardException - if a shard with the primary key could not be found
SystemException - if a system exception occurred
public Shard findByPrimaryKey(long shardId)
throws NoSuchShardException,
SystemException
NoSuchShardException if it could not be found.
findByPrimaryKey in interface ShardPersistenceshardId - the primary key of the shard
NoSuchShardException - if a shard with the primary key could not be found
SystemException - if a system exception occurred
public Shard fetchByPrimaryKey(Serializable primaryKey)
throws SystemException
null if it could not be found.
fetchByPrimaryKey in interface BasePersistence<Shard>fetchByPrimaryKey in class BasePersistenceImpl<Shard>primaryKey - the primary key of the shard
null if a shard with the primary key could not be found
SystemException - if a system exception occurred
public Shard fetchByPrimaryKey(long shardId)
throws SystemException
null if it could not be found.
fetchByPrimaryKey in interface ShardPersistenceshardId - the primary key of the shard
null if a shard with the primary key could not be found
SystemException - if a system exception occurred
public List<Shard> findAll()
throws SystemException
findAll in interface ShardPersistenceSystemException - if a system exception occurred
public List<Shard> findAll(int start,
int end)
throws SystemException
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 ShardModelImpl. 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.
findAll in interface ShardPersistencestart - the lower bound of the range of shardsend - the upper bound of the range of shards (not inclusive)
SystemException - if a system exception occurred
public List<Shard> findAll(int start,
int end,
OrderByComparator orderByComparator)
throws SystemException
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 ShardModelImpl. 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.
findAll in interface ShardPersistencestart - the lower bound of the range of shardsend - the upper bound of the range of shards (not inclusive)orderByComparator - the comparator to order the results by (optionally null)
SystemException - if a system exception occurred
public void removeAll()
throws SystemException
removeAll in interface ShardPersistenceSystemException - if a system exception occurred
public int countAll()
throws SystemException
countAll in interface ShardPersistenceSystemException - if a system exception occurredpublic void afterPropertiesSet()
public void destroy()
|
Liferay 6.2-ce-ga3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||