Liferay 6.2-ce-ga5

com.liferay.portal.service.persistence
Interface ShardPersistence

All Superinterfaces:
BasePersistence<Shard>
All Known Implementing Classes:
ShardPersistenceImpl

@ProviderType
public interface ShardPersistence
extends BasePersistence<Shard>

The persistence interface for the shard service.

Caching information and settings can be found in portal.properties

See Also:
ShardPersistenceImpl, ShardUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Method Summary
 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.
 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.
 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.
 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 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(String name)
          Removes the shard where name = ? from the database.
 Shard updateImpl(Shard shard)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
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, update
 

Method Detail

findByName

Shard findByName(String name)
                 throws NoSuchShardException,
                        SystemException
Returns the shard where name = ? or throws a NoSuchShardException if it could not be found.

Parameters:
name - the name
Returns:
the matching shard
Throws:
NoSuchShardException - if a matching shard could not be found
SystemException - if a system exception occurred

fetchByName

Shard fetchByName(String name)
                  throws SystemException
Returns the shard where name = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
name - the name
Returns:
the matching shard, or null if a matching shard could not be found
Throws:
SystemException - if a system exception occurred

fetchByName

Shard fetchByName(String name,
                  boolean retrieveFromCache)
                  throws SystemException
Returns the shard where name = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
name - the name
retrieveFromCache - whether to use the finder cache
Returns:
the matching shard, or null if a matching shard could not be found
Throws:
SystemException - if a system exception occurred

removeByName

Shard removeByName(String name)
                   throws NoSuchShardException,
                          SystemException
Removes the shard where name = ? from the database.

Parameters:
name - the name
Returns:
the shard that was removed
Throws:
SystemException - if a system exception occurred
NoSuchShardException

countByName

int countByName(String name)
                throws SystemException
Returns the number of shards where name = ?.

Parameters:
name - the name
Returns:
the number of matching shards
Throws:
SystemException - if a system exception occurred

findByC_C

Shard findByC_C(long classNameId,
                long classPK)
                throws NoSuchShardException,
                       SystemException
Returns the shard where classNameId = ? and classPK = ? or throws a NoSuchShardException if it could not be found.

Parameters:
classNameId - the class name ID
classPK - the class p k
Returns:
the matching shard
Throws:
NoSuchShardException - if a matching shard could not be found
SystemException - if a system exception occurred

fetchByC_C

Shard fetchByC_C(long classNameId,
                 long classPK)
                 throws SystemException
Returns the shard where classNameId = ? and classPK = ? or returns null if it could not be found. Uses the finder cache.

Parameters:
classNameId - the class name ID
classPK - the class p k
Returns:
the matching shard, or null if a matching shard could not be found
Throws:
SystemException - if a system exception occurred

fetchByC_C

Shard fetchByC_C(long classNameId,
                 long classPK,
                 boolean retrieveFromCache)
                 throws SystemException
Returns the shard where classNameId = ? and classPK = ? or returns null if it could not be found, optionally using the finder cache.

Parameters:
classNameId - the class name ID
classPK - the class p k
retrieveFromCache - whether to use the finder cache
Returns:
the matching shard, or null if a matching shard could not be found
Throws:
SystemException - if a system exception occurred

removeByC_C

Shard removeByC_C(long classNameId,
                  long classPK)
                  throws NoSuchShardException,
                         SystemException
Removes the shard where classNameId = ? and classPK = ? from the database.

Parameters:
classNameId - the class name ID
classPK - the class p k
Returns:
the shard that was removed
Throws:
SystemException - if a system exception occurred
NoSuchShardException

countByC_C

int countByC_C(long classNameId,
               long classPK)
               throws SystemException
Returns the number of shards where classNameId = ? and classPK = ?.

Parameters:
classNameId - the class name ID
classPK - the class p k
Returns:
the number of matching shards
Throws:
SystemException - if a system exception occurred

cacheResult

void cacheResult(Shard shard)
Caches the shard in the entity cache if it is enabled.

Parameters:
shard - the shard

cacheResult

void cacheResult(List<Shard> shards)
Caches the shards in the entity cache if it is enabled.

Parameters:
shards - the shards

create

Shard create(long shardId)
Creates a new shard with the primary key. Does not add the shard to the database.

Parameters:
shardId - the primary key for the new shard
Returns:
the new shard

remove

Shard remove(long shardId)
             throws NoSuchShardException,
                    SystemException
Removes the shard with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
shardId - the primary key of the shard
Returns:
the shard that was removed
Throws:
NoSuchShardException - if a shard with the primary key could not be found
SystemException - if a system exception occurred

updateImpl

Shard updateImpl(Shard shard)
                 throws SystemException
Throws:
SystemException

findByPrimaryKey

Shard findByPrimaryKey(long shardId)
                       throws NoSuchShardException,
                              SystemException
Returns the shard with the primary key or throws a NoSuchShardException if it could not be found.

Parameters:
shardId - the primary key of the shard
Returns:
the shard
Throws:
NoSuchShardException - if a shard with the primary key could not be found
SystemException - if a system exception occurred

fetchByPrimaryKey

Shard fetchByPrimaryKey(long shardId)
                        throws SystemException
Returns the shard with the primary key or returns null if it could not be found.

Parameters:
shardId - the primary key of the shard
Returns:
the shard, or null if a shard with the primary key could not be found
Throws:
SystemException - if a system exception occurred

findAll

List<Shard> findAll()
                    throws SystemException
Returns all the shards.

Returns:
the shards
Throws:
SystemException - if a system exception occurred

findAll

List<Shard> findAll(int start,
                    int end)
                    throws SystemException
Returns a range of all the shards.

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.

Parameters:
start - the lower bound of the range of shards
end - the upper bound of the range of shards (not inclusive)
Returns:
the range of shards
Throws:
SystemException - if a system exception occurred

findAll

List<Shard> findAll(int start,
                    int end,
                    OrderByComparator orderByComparator)
                    throws SystemException
Returns an ordered range of all the shards.

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.

Parameters:
start - the lower bound of the range of shards
end - the upper bound of the range of shards (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of shards
Throws:
SystemException - if a system exception occurred

removeAll

void removeAll()
               throws SystemException
Removes all the shards from the database.

Throws:
SystemException - if a system exception occurred

countAll

int countAll()
             throws SystemException
Returns the number of shards.

Returns:
the number of shards
Throws:
SystemException - if a system exception occurred

Liferay 6.2-ce-ga5