@ProviderType public interface ShardPersistence extends BasePersistence<Shard>
Caching information and settings can be found in portal.properties
ShardPersistenceImpl,
ShardUtil| Modifier and Type | Method and Description |
|---|---|
void |
cacheResult(java.util.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.
|
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(java.lang.String name)
Returns the number of shards where name = ?.
|
Shard |
create(long shardId)
Creates a new shard with the primary key.
|
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(java.lang.String name)
Returns the shard where name = ? or returns
null if it could not be found. |
Shard |
fetchByName(java.lang.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. |
java.util.List<Shard> |
findAll()
Returns all the shards.
|
java.util.List<Shard> |
findAll(int start,
int end)
Returns a range of all the shards.
|
java.util.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(java.lang.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 |
remove(long shardId)
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(java.lang.String name)
Removes the shard where name = ? from the database.
|
Shard |
updateImpl(Shard shard) |
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update, update, updateShard findByName(java.lang.String name) throws NoSuchShardException, SystemException
NoSuchShardException if it could not be found.name - the nameNoSuchShardException - if a matching shard could not be foundSystemException - if a system exception occurredShard fetchByName(java.lang.String name) throws SystemException
null if it could not be found. Uses the finder cache.name - the namenull if a matching shard could not be foundSystemException - if a system exception occurredShard fetchByName(java.lang.String name, boolean retrieveFromCache) throws SystemException
null if it could not be found, optionally using the finder cache.name - the nameretrieveFromCache - whether to use the finder cachenull if a matching shard could not be foundSystemException - if a system exception occurredShard removeByName(java.lang.String name) throws NoSuchShardException, SystemException
name - the nameSystemException - if a system exception occurredNoSuchShardExceptionint countByName(java.lang.String name)
throws SystemException
name - the nameSystemException - if a system exception occurredShard findByC_C(long classNameId, long classPK) throws NoSuchShardException, SystemException
NoSuchShardException if it could not be found.classNameId - the class name IDclassPK - the class p kNoSuchShardException - if a matching shard could not be foundSystemException - if a system exception occurredShard fetchByC_C(long classNameId, long classPK) throws SystemException
null if it could not be found. Uses the finder cache.classNameId - the class name IDclassPK - the class p knull if a matching shard could not be foundSystemException - if a system exception occurredShard fetchByC_C(long classNameId, long classPK, boolean retrieveFromCache) throws SystemException
null if it could not be found, optionally using the finder cache.classNameId - the class name IDclassPK - the class p kretrieveFromCache - whether to use the finder cachenull if a matching shard could not be foundSystemException - if a system exception occurredShard removeByC_C(long classNameId, long classPK) throws NoSuchShardException, SystemException
classNameId - the class name IDclassPK - the class p kSystemException - if a system exception occurredNoSuchShardExceptionint countByC_C(long classNameId,
long classPK)
throws SystemException
classNameId - the class name IDclassPK - the class p kSystemException - if a system exception occurredvoid cacheResult(Shard shard)
shard - the shardvoid cacheResult(java.util.List<Shard> shards)
shards - the shardsShard create(long shardId)
shardId - the primary key for the new shardShard remove(long shardId) throws NoSuchShardException, SystemException
shardId - the primary key of the shardNoSuchShardException - if a shard with the primary key could not be foundSystemException - if a system exception occurredShard updateImpl(Shard shard) throws SystemException
SystemExceptionShard findByPrimaryKey(long shardId) throws NoSuchShardException, SystemException
NoSuchShardException if it could not be found.shardId - the primary key of the shardNoSuchShardException - if a shard with the primary key could not be foundSystemException - if a system exception occurredShard fetchByPrimaryKey(long shardId) throws SystemException
null if it could not be found.shardId - the primary key of the shardnull if a shard with the primary key could not be foundSystemException - if a system exception occurredjava.util.List<Shard> findAll() throws SystemException
SystemException - if a system exception occurredjava.util.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.
start - the lower bound of the range of shardsend - the upper bound of the range of shards (not inclusive)SystemException - if a system exception occurredjava.util.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.
start - 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 occurredvoid removeAll()
throws SystemException
SystemException - if a system exception occurredint countAll()
throws SystemException
SystemException - if a system exception occurred