com.liferay.portal.service.persistence
Class ShardUtil
java.lang.Object
com.liferay.portal.service.persistence.ShardUtil
public class ShardUtil
- extends java.lang.Object
View Source
- Author:
- Brian Wing Shun Chan
Method Summary |
static void |
cacheResult(java.util.List<Shard> shards)
|
static void |
cacheResult(Shard shard)
|
static void |
clearCache()
|
static int |
countAll()
|
static int |
countByC_C(long classNameId,
long classPK)
|
static int |
countByName(java.lang.String name)
|
static Shard |
create(long shardId)
|
static Shard |
fetchByC_C(long classNameId,
long classPK)
|
static Shard |
fetchByC_C(long classNameId,
long classPK,
boolean retrieveFromCache)
|
static Shard |
fetchByName(java.lang.String name)
|
static Shard |
fetchByName(java.lang.String name,
boolean retrieveFromCache)
|
static Shard |
fetchByPrimaryKey(long shardId)
|
static java.util.List<Shard> |
findAll()
|
static java.util.List<Shard> |
findAll(int start,
int end)
|
static java.util.List<Shard> |
findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
|
static Shard |
findByC_C(long classNameId,
long classPK)
|
static Shard |
findByName(java.lang.String name)
|
static Shard |
findByPrimaryKey(long shardId)
|
static java.util.List<java.lang.Object> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
|
static java.util.List<java.lang.Object> |
findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end)
|
static ShardPersistence |
getPersistence()
|
static Shard |
remove(long shardId)
|
static Shard |
remove(Shard shard)
|
static void |
removeAll()
|
static void |
removeByC_C(long classNameId,
long classPK)
|
static void |
removeByName(java.lang.String name)
|
void |
setPersistence(ShardPersistence persistence)
|
static Shard |
update(Shard shard)
Deprecated. Use update(Shard shard, boolean merge) . |
static Shard |
update(Shard shard,
boolean merge)
Add, update, or merge, the entity. |
static Shard |
updateImpl(Shard shard,
boolean merge)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShardUtil
public ShardUtil()
cacheResult
public static void cacheResult(Shard shard)
cacheResult
public static void cacheResult(java.util.List<Shard> shards)
clearCache
public static void clearCache()
create
public static Shard create(long shardId)
remove
public static Shard remove(long shardId)
throws NoSuchShardException,
com.liferay.portal.SystemException
- Throws:
NoSuchShardException
com.liferay.portal.SystemException
remove
public static Shard remove(Shard shard)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
update
public static Shard update(Shard shard)
throws com.liferay.portal.SystemException
- Deprecated. Use
update(Shard shard, boolean merge)
.
- Throws:
com.liferay.portal.SystemException
update
public static Shard update(Shard shard,
boolean merge)
throws com.liferay.portal.SystemException
- Add, update, or merge, the entity. This method also calls the model
listeners to trigger the proper events associated with adding, deleting,
or updating an entity.
- Parameters:
shard
- the entity to add, update, or mergemerge
- boolean value for whether to merge the entity. The
default value is false. Setting merge to true is more
expensive and should only be true when shard is
transient. See LEP-5473 for a detailed discussion of this
method.
- Returns:
- true if the portlet can be displayed via Ajax
- Throws:
com.liferay.portal.SystemException
updateImpl
public static Shard updateImpl(Shard shard,
boolean merge)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findByPrimaryKey
public static Shard findByPrimaryKey(long shardId)
throws NoSuchShardException,
com.liferay.portal.SystemException
- Throws:
NoSuchShardException
com.liferay.portal.SystemException
fetchByPrimaryKey
public static Shard fetchByPrimaryKey(long shardId)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findByName
public static Shard findByName(java.lang.String name)
throws NoSuchShardException,
com.liferay.portal.SystemException
- Throws:
NoSuchShardException
com.liferay.portal.SystemException
fetchByName
public static Shard fetchByName(java.lang.String name)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
fetchByName
public static Shard fetchByName(java.lang.String name,
boolean retrieveFromCache)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findByC_C
public static Shard findByC_C(long classNameId,
long classPK)
throws NoSuchShardException,
com.liferay.portal.SystemException
- Throws:
NoSuchShardException
com.liferay.portal.SystemException
fetchByC_C
public static Shard fetchByC_C(long classNameId,
long classPK)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
fetchByC_C
public static Shard fetchByC_C(long classNameId,
long classPK,
boolean retrieveFromCache)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findWithDynamicQuery
public static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findWithDynamicQuery
public static java.util.List<java.lang.Object> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
int start,
int end)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findAll
public static java.util.List<Shard> findAll()
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findAll
public static java.util.List<Shard> findAll(int start,
int end)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
findAll
public static java.util.List<Shard> findAll(int start,
int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
removeByName
public static void removeByName(java.lang.String name)
throws NoSuchShardException,
com.liferay.portal.SystemException
- Throws:
NoSuchShardException
com.liferay.portal.SystemException
removeByC_C
public static void removeByC_C(long classNameId,
long classPK)
throws NoSuchShardException,
com.liferay.portal.SystemException
- Throws:
NoSuchShardException
com.liferay.portal.SystemException
removeAll
public static void removeAll()
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
countByName
public static int countByName(java.lang.String name)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
countByC_C
public static int countByC_C(long classNameId,
long classPK)
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
countAll
public static int countAll()
throws com.liferay.portal.SystemException
- Throws:
com.liferay.portal.SystemException
getPersistence
public static ShardPersistence getPersistence()
setPersistence
public void setPersistence(ShardPersistence persistence)