public class LockedDatabaseGenericDelegator extends GenericDelegator
allCache, andCache, andCacheFieldSets, delegatorInfo, delegatorName, distributedCacheClear, modelGroupReader, modelReader, module, primaryKeyCache, sequencer, sqlEscapeHelper| Constructor and Description |
|---|
LockedDatabaseGenericDelegator() |
LockedDatabaseGenericDelegator(String delegatorName) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAllCacheLinesByDummyPK(Collection<? extends GenericEntity> dummyPKs) |
void |
clearAllCacheLinesByValue(Collection<? extends GenericValue> values) |
void |
clearAllCaches()
This method is a shortcut to completely clear all entity engine caches.
|
void |
clearAllCaches(boolean distribute) |
void |
clearCacheLine(GenericPK primaryKey)
Remove a CACHED Generic Entity from the cache by its primary key, does NOT
check to see if the passed GenericPK is a complete primary key.
|
void |
clearCacheLine(GenericPK primaryKey,
boolean distribute) |
void |
clearCacheLine(GenericValue value)
Remove a CACHED GenericValue from as many caches as it can.
|
void |
clearCacheLine(GenericValue value,
boolean distribute) |
void |
clearCacheLine(String entityName,
Map<String,?> fields)
Remove a CACHED Generic Entity (List) from the cache, either a PK, ByAnd, or All
|
void |
clearCacheLineFlexible(GenericEntity dummyPK)
Remove a CACHED Generic Entity from the cache by its primary key.
|
void |
clearCacheLineFlexible(GenericEntity dummyPK,
boolean distribute) |
int |
countAll(String entityName)
Returns the row count of the specified entity.
|
int |
countByAnd(String entityName,
String fieldName,
List<? extends EntityCondition> expressions,
EntityFindOptions findOptions)
Returns the count of the results that match all of the specified expressions (i.e.
|
int |
countByCondition(String entityName,
String fieldName,
EntityCondition condition,
EntityFindOptions findOptions)
Returns the count of the results that match any of the specified expressions (ie: combined using OR).
|
int |
countByOr(String entityName,
String fieldName,
List<? extends EntityCondition> expressions,
EntityFindOptions findOptions)
Returns the count of the results that match any of the specified
expressions (i.e.
|
GenericValue |
create(GenericPK primaryKey)
Creates a Entity in the form of a GenericValue and write it to the datasource.
|
GenericValue |
create(GenericPK primaryKey,
boolean doCacheClear)
Creates a Entity in the form of a GenericValue and write it to the datasource.
|
GenericValue |
create(GenericValue value)
Creates a Entity in the form of a GenericValue and write it to the datasource.
|
GenericValue |
create(GenericValue value,
boolean doCacheClear)
Creates a Entity in the form of a GenericValue and write it to the datasource.
|
GenericValue |
create(String entityName,
Map<String,?> fields)
Creates a Entity in the form of a GenericValue and write it to the database.
|
List<GenericValue> |
findAll(String entityName)
Finds all Generic entities of the given type.
|
List<GenericValue> |
findAll(String entityName,
List<String> orderBy)
Finds all Generic entities of the given type, optionally sorted.
|
List<GenericValue> |
findAllByPrimaryKeys(Collection<? extends GenericPK> primaryKeys)
Find a number of Generic Value objects by their Primary Keys, all at once.
|
List<GenericValue> |
findAllByPrimaryKeysCache(Collection<? extends GenericPK> primaryKeys)
Find a number of Generic Value objects by their Primary Keys, all at
once; this first looks in the local cache for each PK and if there then
it puts it in the return list rather than putting it in the batch to
send to a given helper.
|
List<GenericValue> |
findAllCache(String entityName)
Finds all Generic entities of the given type, looking first in the cache.
|
List<GenericValue> |
findAllCache(String entityName,
List<String> orderBy)
Finds all Generic entities, looking first in the cache; uses orderBy for
lookup, but only keys results on the entityName and fields.
|
List<GenericValue> |
findByAnd(ModelEntity modelEntity,
Map<String,?> fields,
List<String> orderBy)
Finds any entities matching the given criteria.
|
List<GenericValue> |
findByAnd(String entityName,
List<? extends EntityCondition> expressions)
Finds Generic Entity records by all of the specified expressions (ie: combined using AND).
|
List<GenericValue> |
findByAnd(String entityName,
List<? extends EntityCondition> expressions,
List<String> orderBy)
Finds Generic Entity records by all of the specified expressions (i.e.
|
List<GenericValue> |
findByAnd(String entityName,
Map<String,?> fields)
Finds Generic Entity records by all of the specified fields (ie: combined using AND).
|
List<GenericValue> |
findByAnd(String entityName,
Map<String,?> fields,
List<String> orderBy)
Finds Generic Entity records by all of the specified fields (i.e.
|
List<GenericValue> |
findByAndCache(String entityName,
Map<String,?> fields)
Finds Generic Entity records by all of the specified fields (i.e.
|
List<GenericValue> |
findByAndCache(String entityName,
Map<String,?> fields,
List<String> orderBy)
Finds Generic Entity records by all of the specified fields (i.e.
|
List<GenericValue> |
findByCondition(String entityName,
EntityCondition entityCondition,
Collection<String> fieldsToSelect,
List<String> orderBy)
Finds any GenericValues matching the given conditions.
|
List<GenericValue> |
findByLike(String entityName,
Map<String,?> fields) |
List<GenericValue> |
findByLike(String entityName,
Map<String,?> fields,
List<String> orderBy) |
List<GenericValue> |
findByOr(String entityName,
List<? extends EntityCondition> expressions)
Finds Generic Entity records by all of the specified expressions (i.e.
|
List<GenericValue> |
findByOr(String entityName,
List<? extends EntityCondition> expressions,
List<String> orderBy)
Finds Generic Entity records by all of the specified expressions (i.e.
|
List<GenericValue> |
findByOr(String entityName,
Map<String,?> fields)
Finds Generic Entity records by any of the specified fields (i.e.
|
List<GenericValue> |
findByOr(String entityName,
Map<String,?> fields,
List<String> orderBy)
Finds Generic Entity records by all of the specified fields (i.e.
|
GenericValue |
findByPrimaryKey(GenericPK primaryKey)
Find a Generic Entity by its Primary Key.
|
GenericValue |
findByPrimaryKey(String entityName,
Map<String,?> fields)
Find a Generic Entity by its Primary Key.
|
GenericValue |
findByPrimaryKeyCache(GenericPK primaryKey)
Find a cached Generic Entity by its Primary Key.
|
GenericValue |
findByPrimaryKeyCache(String entityName,
Map<String,?> fields)
Find a CACHED Generic Entity by its Primary Key.
|
GenericValue |
findByPrimaryKeyPartial(GenericPK primaryKey,
Set<String> keys)
Find a Generic Entity by its Primary Key and only returns the values
requested by the passed keys (names).
|
EntityListIterator |
findListIteratorByCondition(String entityName,
EntityCondition entityCondition,
Collection<String> fieldsToSelect,
List<String> orderBy)
Finds GenericValues by the given conditions.
|
EntityListIterator |
findListIteratorByCondition(String entityName,
EntityCondition whereEntityCondition,
EntityCondition havingEntityCondition,
Collection<String> fieldsToSelect,
List<String> orderBy,
EntityFindOptions findOptions)
Finds GenericValues by the given conditions.
|
UtilCache<String,List<GenericValue>> |
getAllCache() |
UtilCache<GenericPK,List<GenericValue>> |
getAndCache() |
protected EntityConfigUtil.DelegatorInfo |
getDelegatorInfo() |
String |
getDelegatorName()
Gets the name of the server configuration that corresponds to this delegator.
|
protected Map<?,?> |
getEcaEntityEventMap(String entityName) |
ModelFieldType |
getEntityFieldType(ModelEntity entity,
String type)
Gets a field type instance by name from the helper that corresponds to the specified entity.
|
Collection<String> |
getEntityFieldTypeNames(ModelEntity entity)
Gets field type names from the helper that corresponds to the specified entity.
|
String |
getEntityGroupName(String entityName)
Gets the helper name that corresponds to this delegator and the specified entityName.
|
GenericHelper |
getEntityHelper(ModelEntity entity)
Gets the helper that corresponds to this delegator and the specified entity.
|
GenericHelper |
getEntityHelper(String entityName)
Gets the helper that corresponds to this delegator and the specified entityName.
|
String |
getEntityHelperName(ModelEntity entity)
Gets the helper name that corresponds to this delegator and the specified entity.
|
String |
getEntityHelperName(String entityName)
Gets the helper name that corresponds to this delegator and the specified entityName.
|
Set<Set<String>> |
getFieldNameSetsCopy(String entityName)
Gets a Set of Sets of fieldNames used in the by and cache for the given entityName.
|
List<GenericValue> |
getFromAllCache(String entityName) |
List<GenericValue> |
getFromAndCache(ModelEntity entity,
Map<String,?> fields) |
List<GenericValue> |
getFromAndCache(String entityName,
Map<String,?> fields) |
GenericValue |
getFromPrimaryKeyCache(GenericPK primaryKey) |
String |
getGroupHelperName(String groupName)
Gets the helper name that corresponds to this delegator and the specified entityName.
|
List<ModelEntity> |
getModelEntitiesByGroup(String groupName)
Gets a list of entity models that are in a group corresponding to the specified group name.
|
ModelEntity |
getModelEntity(String entityName)
Gets the instance of ModelEntity that corresponds to this delegator and the specified entityName.
|
Map<String,ModelEntity> |
getModelEntityMapByGroup(String groupName)
Gets a Map of entity name & entity model pairs that are in the named group.
|
ModelGroupReader |
getModelGroupReader()
Gets the instance of ModelGroupReader that corresponds to this delegator.
|
ModelReader |
getModelReader()
Gets the instance of ModelReader that corresponds to this delegator.
|
List<GenericValue> |
getMultiRelation(GenericValue value,
String relationNameOne,
String relationNameTwo)
Get the named Related Entity for the GenericValue from the persistent
store across another Relation.
|
List<GenericValue> |
getMultiRelation(GenericValue value,
String relationNameOne,
String relationNameTwo,
List<String> orderBy)
Get the named Related Entity for the GenericValue from the persistent
store across another Relation.
|
Long |
getNextSeqId(String seqName)
Get the next guaranteed unique seq id from the sequence with the given sequence name;
if the named sequence doesn't exist, it will be created.
|
Long |
getNextSeqId(String seqName,
boolean clusterMode)
Get the next guaranteed unique seq id from the sequence with the given sequence name;
if the named sequence doesn't exist, it will be created.
|
UtilCache<GenericEntity,GenericValue> |
getPrimaryKeyCache() |
List<GenericValue> |
getRelated(String relationName,
GenericValue value)
Get the named Related Entity for the GenericValue from the persistent store
|
List<GenericValue> |
getRelated(String relationName,
Map<String,?> byAndFields,
List<String> orderBy,
GenericValue value)
Get the named Related Entity for the GenericValue from the persistent store.
|
List<GenericValue> |
getRelatedByAnd(String relationName,
Map<String,?> byAndFields,
GenericValue value)
Get the named Related Entity for the GenericValue from the persistent store.
|
List<GenericValue> |
getRelatedCache(String relationName,
GenericValue value)
Get the named Related Entity for the GenericValue from the persistent
store, checking first in the cache to see if the desired value is there.
|
GenericPK |
getRelatedDummyPK(String relationName,
Map<String,?> byAndFields,
GenericValue value)
Get a dummy primary key for the named Related Entity for the GenericValue.
|
GenericValue |
getRelatedOne(String relationName,
GenericValue value)
Get related entity where relation is of type one, uses findByPrimaryKey.
|
GenericValue |
getRelatedOneCache(String relationName,
GenericValue value)
Get related entity where relation is of type one, uses findByPrimaryKey,
checking first in the cache to see if the desired value is there.
|
List<GenericValue> |
getRelatedOrderBy(String relationName,
List<String> orderBy,
GenericValue value)
Get the named Related Entity for the GenericValue from the persistent store.
|
GenericPK |
makePK(Element element) |
GenericPK |
makePK(String entityName,
Map<String,?> fields)
Creates a Primary Key in the form of a GenericPK without persisting it.
|
GenericValue |
makeValue(Element element) |
GenericValue |
makeValue(String entityName,
Map<String,?> fields)
Creates a Entity in the form of a GenericValue without persisting it.
|
List<GenericValue> |
makeValues(Document document)
Parses the given XML document for entities.
|
void |
putAllInPrimaryKeyCache(List<? extends GenericValue> values) |
void |
putInAllCache(ModelEntity entity,
List<? extends GenericValue> values) |
void |
putInAllCache(String entityName,
List<? extends GenericValue> values) |
void |
putInAndCache(ModelEntity entity,
Map<String,?> fields,
List<? extends GenericValue> values) |
void |
putInAndCache(String entityName,
Map<String,?> fields,
List<? extends GenericValue> values) |
void |
putInPrimaryKeyCache(GenericPK primaryKey,
GenericValue value) |
List<GenericValue> |
readXmlDocument(URL url)
Parses the given XML file for entities.
|
void |
refresh(GenericValue value)
Refresh the Entity for the GenericValue from the persistent store.
|
void |
refresh(GenericValue value,
boolean doCacheClear)
Refresh the Entity for the GenericValue from the persistent store.
|
void |
refreshSequencer()
Refreshes the ID sequencer clearing all cached bank values.
|
int |
removeAll(List<? extends GenericEntity> dummyPKs)
Remove the Entities from the List from the persistent store.
|
int |
removeAll(List<? extends GenericEntity> dummyPKs,
boolean doCacheClear)
Remove the Entities from the List from the persistent store.
|
int |
removeByAnd(String entityName,
Map<String,?> fields)
Removes/deletes Generic Entity records found by all of the specified fields (ie: combined using AND).
|
int |
removeByAnd(String entityName,
Map<String,?> fields,
boolean doCacheClear)
Removes/deletes Generic Entity records found by all of the specified fields (ie: combined using AND).
|
int |
removeByCondition(String entityName,
EntityCondition entityCondition)
Removes/deletes Generic Entity records found by matching the EntityCondition.
|
int |
removeByCondition(String entityName,
EntityCondition entityCondition,
boolean doCacheClear)
Removes/deletes Generic Entity records found by matching the EntityCondition.
|
int |
removeByPrimaryKey(GenericPK primaryKey)
Remove a Generic Entity corresponding to the primaryKey.
|
int |
removeByPrimaryKey(GenericPK primaryKey,
boolean doCacheClear)
Remove a Generic Entity corresponding to the primaryKey.
|
int |
removeRelated(String relationName,
GenericValue value)
Remove the named Related Entity for the GenericValue from the persistent store.
|
int |
removeRelated(String relationName,
GenericValue value,
boolean doCacheClear)
Remove the named Related Entity for the GenericValue from the persistent store.
|
int |
removeValue(GenericValue value)
Remove a Generic Value from the database.
|
int |
removeValue(GenericValue value,
boolean doCacheClear)
Remove a Generic Value from the database.
|
void |
setSequencer(SequenceUtil sequencer)
Allows you to pass a SequenceUtil class (possibly one that overrides the getNextSeqId method);
if null is passed will effectively refresh the sequencer.
|
int |
store(GenericValue value)
Store the Entity from the GenericValue to the persistent store.
|
int |
store(GenericValue value,
boolean doCacheClear)
Store the Entity from the GenericValue to the persistent store.
|
int |
storeAll(List<? extends GenericValue> values)
Store the Entities from the List GenericValue instances to the persistent store.
|
int |
storeAll(List<? extends GenericValue> values,
boolean doCacheClear)
Store the Entities from the List GenericValue instances to the persistent store.
|
List<GenericValue> |
transform(String entityName,
EntityCondition entityCondition,
List<String> orderBy,
String lockField,
Transformation transformation)
Applies the given transformation to any entities matching the given condition.
|
getGenericDelegator, getSqlEscapeHelper, initialiseAndCheckDatabase, isLocked, lock, removeGenericDelegator, unlockpublic LockedDatabaseGenericDelegator()
public LockedDatabaseGenericDelegator(String delegatorName)
public void clearAllCacheLinesByDummyPK(Collection<? extends GenericEntity> dummyPKs)
clearAllCacheLinesByDummyPK in interface DelegatorInterfaceclearAllCacheLinesByDummyPK in class GenericDelegatorpublic void clearAllCacheLinesByValue(Collection<? extends GenericValue> values)
clearAllCacheLinesByValue in interface DelegatorInterfaceclearAllCacheLinesByValue in class GenericDelegatorpublic void clearAllCaches()
GenericDelegatorclearAllCaches in interface DelegatorInterfaceclearAllCaches in class GenericDelegatorpublic void clearAllCaches(boolean distribute)
clearAllCaches in interface DelegatorInterfaceclearAllCaches in class GenericDelegatorpublic void clearCacheLine(String entityName, Map<String,?> fields)
GenericDelegatorclearCacheLine in interface DelegatorInterfaceclearCacheLine in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML filefields - The fields of the named entity to query by with their corresponging valuespublic void clearCacheLine(GenericPK primaryKey)
GenericDelegatorclearCacheLine in interface DelegatorInterfaceclearCacheLine in class GenericDelegatorprimaryKey - The primary key to clear by.public void clearCacheLine(GenericPK primaryKey, boolean distribute)
clearCacheLine in interface DelegatorInterfaceclearCacheLine in class GenericDelegatorpublic void clearCacheLine(GenericValue value)
GenericDelegatorclearCacheLine in interface DelegatorInterfaceclearCacheLine in class GenericDelegatorvalue - The primary key to clear by.public void clearCacheLine(GenericValue value, boolean distribute)
clearCacheLine in interface DelegatorInterfaceclearCacheLine in class GenericDelegatorpublic void clearCacheLineFlexible(GenericEntity dummyPK)
GenericDelegatorclearCacheLineFlexible in interface DelegatorInterfaceclearCacheLineFlexible in class GenericDelegatordummyPK - The dummy primary key to clear by.public void clearCacheLineFlexible(GenericEntity dummyPK, boolean distribute)
clearCacheLineFlexible in interface DelegatorInterfaceclearCacheLineFlexible in class GenericDelegatorpublic GenericValue create(String entityName, Map<String,?> fields) throws GenericEntityException
GenericDelegatorcreate in interface DelegatorInterfacecreate in class GenericDelegatorentityName - the type of entity to create (if null, this method does nothing)fields - the field values to use (if null, this method does nothing)GenericEntityExceptionpublic GenericValue create(GenericPK primaryKey) throws GenericEntityException
GenericDelegatorcreate in interface DelegatorInterfacecreate in class GenericDelegatorprimaryKey - The GenericPK to create a value in the datasource fromGenericEntityExceptionpublic GenericValue create(GenericPK primaryKey, boolean doCacheClear) throws GenericEntityException
GenericDelegatorcreate in interface DelegatorInterfacecreate in class GenericDelegatorprimaryKey - the PK from which to create a value in the datasource (required)doCacheClear - whether to clear related cache entries for this primaryKey to be createdGenericEntityExceptionpublic GenericValue create(GenericValue value) throws GenericEntityException
GenericDelegatorcreate in interface DelegatorInterfacecreate in class GenericDelegatorvalue - The GenericValue to create a value in the datasource fromGenericEntityExceptionpublic GenericValue create(GenericValue value, boolean doCacheClear) throws GenericEntityException
GenericDelegatorcreate in interface DelegatorInterfacecreate in class GenericDelegatorvalue - The GenericValue from which to create a value in the datasource (required)doCacheClear - whether to automatically clear cache entries related to this operationGenericEntityExceptionpublic List<GenericValue> findAll(String entityName) throws GenericEntityException
GenericDelegatorfindAll in interface DelegatorInterfacefindAll in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML fileGenericEntityExceptionpublic List<GenericValue> findAll(String entityName, List<String> orderBy) throws GenericEntityException
GenericDelegatorfindAll in interface DelegatorInterfacefindAll in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML fileorderBy - the entity fields by which to order the query; optionally
add " ASC" for ascending or " DESC" for descending to each field nameGenericEntityExceptionpublic List<GenericValue> findAllByPrimaryKeys(Collection<? extends GenericPK> primaryKeys) throws GenericEntityException
GenericDelegatorfindAllByPrimaryKeys in interface DelegatorInterfacefindAllByPrimaryKeys in class GenericDelegatorprimaryKeys - A Collection of primary keys to find by.GenericEntityExceptionpublic List<GenericValue> findAllByPrimaryKeysCache(Collection<? extends GenericPK> primaryKeys) throws GenericEntityException
GenericDelegatorfindAllByPrimaryKeysCache in interface DelegatorInterfacefindAllByPrimaryKeysCache in class GenericDelegatorprimaryKeys - A Collection of primary keys to find by.GenericEntityExceptionpublic List<GenericValue> findAllCache(String entityName) throws GenericEntityException
GenericDelegatorfindAllCache in interface DelegatorInterfacefindAllCache in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML fileGenericEntityExceptionpublic List<GenericValue> findAllCache(String entityName, List<String> orderBy) throws GenericEntityException
GenericDelegatorfindAllCache in interface DelegatorInterfacefindAllCache in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML fileorderBy - The fields of the named entity by which to order the
query; optionally add " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic List<GenericValue> findByAnd(String entityName, List<? extends EntityCondition> expressions) throws GenericEntityException
GenericDelegatorfindByAnd in interface DelegatorInterfacefindByAnd in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML fileexpressions - The expressions to use for the lookup, each
consisting of at least a field name, an EntityOperator, and a value to
compare toGenericEntityExceptionpublic List<GenericValue> findByAnd(String entityName, List<? extends EntityCondition> expressions, List<String> orderBy) throws GenericEntityException
GenericDelegatorfindByAnd in interface DelegatorInterfacefindByAnd in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML fileexpressions - The expressions to use for the lookup, each
consisting of at least a field name, an EntityOperator, and a value to
compare toorderBy - The fields of the named entity to order the query by;
optionally add " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic List<GenericValue> findByAnd(String entityName, Map<String,?> fields) throws GenericEntityException
GenericDelegatorfindByAnd in interface DelegatorInterfacefindByAnd in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML filefields - The fields of the named entity to query by with their corresponging valuesGenericEntityExceptionpublic List<GenericValue> findByAnd(String entityName, Map<String,?> fields, List<String> orderBy) throws GenericEntityException
GenericDelegatorfindByAnd in interface DelegatorInterfacefindByAnd in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML filefields - the names and values of the fields by which to query (can be null)orderBy - The fields of the named entity to order the query by;
optionally add a " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic List<GenericValue> findByAnd(ModelEntity modelEntity, Map<String,?> fields, List<String> orderBy) throws GenericEntityException
GenericDelegatorfindByAnd in interface DelegatorInterfacefindByAnd in class GenericDelegatormodelEntity - the type of entity to find (required)fields - the names and values of the fields by which to query (can be null)orderBy - the names of fields by which to sort the results (can be null)GenericEntityExceptionpublic List<GenericValue> findByAndCache(String entityName, Map<String,?> fields) throws GenericEntityException
GenericDelegatorfindByAndCache in interface DelegatorInterfacefindByAndCache in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML filefields - The fields of the named entity to query by with their corresponging valuesGenericEntityExceptionpublic List<GenericValue> findByAndCache(String entityName, Map<String,?> fields, List<String> orderBy) throws GenericEntityException
GenericDelegatorfindByAndCache in interface DelegatorInterfacefindByAndCache in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML filefields - The fields of the named entity to query by with their corresponging valuesorderBy - The fields of the named entity to order the query by;
optionally add " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic List<GenericValue> findByCondition(String entityName, EntityCondition entityCondition, Collection<String> fieldsToSelect, List<String> orderBy) throws GenericEntityException
GenericDelegatorfindByCondition in interface DelegatorInterfacefindByCondition in class GenericDelegatorentityName - The Name of the Entity as defined in the entity model XML fileentityCondition - The EntityCondition object that specifies how to constrain this queryfieldsToSelect - The fields of the named entity to get from the
database; if empty or null all fields will be retreivedorderBy - The fields of the named entity by which to order the
query; optionally add " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic int countByAnd(String entityName, String fieldName, List<? extends EntityCondition> expressions, EntityFindOptions findOptions) throws GenericEntityException
GenericDelegatorcountByAnd in interface DelegatorInterfacecountByAnd in class GenericDelegatorentityName - The Name of the Entity as defined in the entity model XML filefieldName - The field of the named entity to count, if null this is equivalent to count(*)expressions - The expressions to use for the lookup, each
consisting of at least a field name, an EntityOperator, and a value to
compare tofindOptions - An instance of EntityFindOptions that specifies
advanced query options. The only option that is used is distinct, in
which case a select (distinct fieldname) is issued.If you issue a
distinct without a fieldName, it will be ignored because select
count (distinct *) makes no sense
GenericEntityExceptionpublic int countByOr(String entityName, String fieldName, List<? extends EntityCondition> expressions, EntityFindOptions findOptions) throws GenericEntityException
GenericDelegatorcountByOr in interface DelegatorInterfacecountByOr in class GenericDelegatorentityName - The Name of the Entity as defined in the entity model XML filefieldName - The field of the named entity to count, if null this is equivalent to count(*)expressions - The expressions to use for the lookup, each
consisting of at least a field name, an EntityOperator, and a value to compare tofindOptions - An instance of EntityFindOptions that specifies
advanced query options. The only option that is used is distinct, in
which case a select (distinct fieldname) is issued.If
you issue a distinct without a fieldName, it will be ignored because
select count (distinct *) makes no sense
GenericEntityExceptionpublic int countByCondition(String entityName, String fieldName, EntityCondition condition, EntityFindOptions findOptions) throws GenericEntityException
GenericDelegatorcountByCondition in interface DelegatorInterfacecountByCondition in class GenericDelegatorentityName - The Name of the Entity as defined in the entity model XML filefieldName - The field of the named entity to count, if null this is equivalent to count(*)condition - The EntityCondition object that specifies how to
constrain this query The expressions to use for the lookup, each
consisting of at least a field name, an EntityOperator, and a value to
compare tofindOptions - An instance of EntityFindOptions that specifies
advanced query options. The only option that is used is distinct, in
which case a select (distinct fieldname) is issued.If you issue a
distinct without a fieldName, it will be ignored as select count
(distinct *) makes no sense
GenericEntityExceptionpublic int countAll(String entityName) throws GenericEntityException
GenericDelegatorcountAll in interface DelegatorInterfacecountAll in class GenericDelegatorentityName - The Name of the Entity as defined in the entity model XML fileGenericEntityExceptionpublic List<GenericValue> findByLike(String entityName, Map<String,?> fields) throws GenericEntityException
findByLike in interface DelegatorInterfacefindByLike in class GenericDelegatorGenericEntityExceptionpublic List<GenericValue> findByLike(String entityName, Map<String,?> fields, List<String> orderBy) throws GenericEntityException
findByLike in interface DelegatorInterfacefindByLike in class GenericDelegatorGenericEntityExceptionpublic List<GenericValue> findByOr(String entityName, List<? extends EntityCondition> expressions) throws GenericEntityException
GenericDelegatorfindByOr in interface DelegatorInterfacefindByOr in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML fileexpressions - The expressions to use for the lookup, each
consisting of at least a field name, an EntityOperator, and a value to
compare toGenericEntityExceptionpublic List<GenericValue> findByOr(String entityName, List<? extends EntityCondition> expressions, List<String> orderBy) throws GenericEntityException
GenericDelegatorfindByOr in interface DelegatorInterfacefindByOr in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML fileexpressions - The expressions to use for the lookup, each
consisting of at least a field name, an EntityOperator, and a value to compare toorderBy - The fields of the named entity to order the query by;
optionally add " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic List<GenericValue> findByOr(String entityName, Map<String,?> fields) throws GenericEntityException
GenericDelegatorfindByOr in interface DelegatorInterfacefindByOr in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML filefields - The fields of the named entity to query by with their corresponging valuesGenericEntityExceptionpublic List<GenericValue> findByOr(String entityName, Map<String,?> fields, List<String> orderBy) throws GenericEntityException
GenericDelegatorfindByOr in interface DelegatorInterfacefindByOr in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML filefields - The fields of the named entity to query by with their corresponging valuesorderBy - The fields of the named entity to order the query by;
optionally add a " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic GenericValue findByPrimaryKey(String entityName, Map<String,?> fields) throws GenericEntityException
GenericDelegatorfindByPrimaryKey in interface DelegatorInterfacefindByPrimaryKey in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML filefields - The fields of the named entity to query by with their corresponging valuesGenericEntityExceptionpublic GenericValue findByPrimaryKey(GenericPK primaryKey) throws GenericEntityException
GenericDelegatorfindByPrimaryKey in interface DelegatorInterfacefindByPrimaryKey in class GenericDelegatorprimaryKey - The primary key to find by.GenericEntityExceptionpublic GenericValue findByPrimaryKeyCache(String entityName, Map<String,?> fields) throws GenericEntityException
GenericDelegatorfindByPrimaryKeyCache in interface DelegatorInterfacefindByPrimaryKeyCache in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML filefields - The fields of the named entity to query by with their corresponging valuesGenericEntityExceptionpublic GenericValue findByPrimaryKeyCache(GenericPK primaryKey) throws GenericEntityException
GenericDelegatorfindByPrimaryKeyCache in interface DelegatorInterfacefindByPrimaryKeyCache in class GenericDelegatorprimaryKey - The primary key to find by.GenericEntityExceptionpublic GenericValue findByPrimaryKeyPartial(GenericPK primaryKey, Set<String> keys) throws GenericEntityException
GenericDelegatorfindByPrimaryKeyPartial in interface DelegatorInterfacefindByPrimaryKeyPartial in class GenericDelegatorprimaryKey - The primary key to find by.keys - The keys, or names, of the values to retrieve; only these values will be retrievedGenericEntityExceptionpublic EntityListIterator findListIteratorByCondition(String entityName, EntityCondition entityCondition, Collection<String> fieldsToSelect, List<String> orderBy) throws GenericEntityException
GenericDelegatorfindListIteratorByCondition in interface DelegatorInterfacefindListIteratorByCondition in class GenericDelegatorentityName - The Name of the Entity as defined in the entity model
XML fileentityCondition - The EntityCondition object that specifies how to
constrain this query before any groupings are done (if this is a view
entity with group-by aliases)fieldsToSelect - The fields of the named entity to get from the
database; if empty or null all fields will be retreivedorderBy - The fields of the named entity to order the query by;
optionally add " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic EntityListIterator findListIteratorByCondition(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Collection<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions) throws GenericEntityException
GenericDelegatorfindListIteratorByCondition in interface DelegatorInterfacefindListIteratorByCondition in class GenericDelegatorentityName - The ModelEntity of the Entity as defined in the entity
XML filewhereEntityCondition - The EntityCondition object that specifies
how to constrain this query before any groupings are done (if this is a
view entity with group-by aliases)havingEntityCondition - The EntityCondition object that specifies
how to constrain this query after any groupings are done (if this is a
view entity with group-by aliases)fieldsToSelect - The fields of the named entity to get from the
database; if empty or null all fields will be retreivedorderBy - The fields of the named entity to order the query by;
optionally add " ASC" for ascending or " DESC" for descendingfindOptions - An instance of EntityFindOptions that specifies
advanced query options. See the EntityFindOptions JavaDoc for more
details.GenericEntityExceptionEntityConditionpublic UtilCache<String,List<GenericValue>> getAllCache()
getAllCache in interface DelegatorInterfacegetAllCache in class GenericDelegatorpublic UtilCache<GenericPK,List<GenericValue>> getAndCache()
getAndCache in interface DelegatorInterfacegetAndCache in class GenericDelegatorprotected EntityConfigUtil.DelegatorInfo getDelegatorInfo()
getDelegatorInfo in class GenericDelegatorpublic String getDelegatorName()
GenericDelegatorgetDelegatorName in interface DelegatorInterfacegetDelegatorName in class GenericDelegatorpublic ModelFieldType getEntityFieldType(ModelEntity entity, String type) throws GenericEntityException
GenericDelegatorgetEntityFieldType in interface DelegatorInterfacegetEntityFieldType in class GenericDelegatorentity - The entitytype - The name of the typeGenericEntityExceptionpublic Collection<String> getEntityFieldTypeNames(ModelEntity entity) throws GenericEntityException
GenericDelegatorgetEntityFieldTypeNames in interface DelegatorInterfacegetEntityFieldTypeNames in class GenericDelegatorentity - The entityGenericEntityExceptionpublic String getEntityGroupName(String entityName)
GenericDelegatorgetEntityGroupName in interface DelegatorInterfacegetEntityGroupName in class GenericDelegatorentityName - The name of the entity to get the helper forpublic GenericHelper getEntityHelper(ModelEntity entity) throws GenericEntityException
GenericDelegatorgetEntityHelper in interface DelegatorInterfacegetEntityHelper in class GenericDelegatorentity - The entity for which to get the helper (required)GenericEntityExceptionpublic GenericHelper getEntityHelper(String entityName) throws GenericEntityException
GenericDelegatorgetEntityHelper in interface DelegatorInterfacegetEntityHelper in class GenericDelegatorentityName - The name of the entity to get the helper forGenericEntityExceptionpublic String getEntityHelperName(ModelEntity entity)
GenericDelegatorgetEntityHelperName in interface DelegatorInterfacegetEntityHelperName in class GenericDelegatorentity - the entity for which to get the helper (can be null)public String getEntityHelperName(String entityName)
GenericDelegatorgetEntityHelperName in interface DelegatorInterfacegetEntityHelperName in class GenericDelegatorentityName - The name of the entity to get the helper name forpublic Set<Set<String>> getFieldNameSetsCopy(String entityName)
GenericDelegatorgetFieldNameSetsCopy in interface DelegatorInterfacegetFieldNameSetsCopy in class GenericDelegatorentityName - the entity for which to get the field names (can be null)public List<GenericValue> getFromAllCache(String entityName)
getFromAllCache in interface DelegatorInterfacegetFromAllCache in class GenericDelegatorpublic List<GenericValue> getFromAndCache(ModelEntity entity, Map<String,?> fields)
getFromAndCache in interface DelegatorInterfacegetFromAndCache in class GenericDelegatorpublic List<GenericValue> getFromAndCache(String entityName, Map<String,?> fields)
getFromAndCache in interface DelegatorInterfacegetFromAndCache in class GenericDelegatorpublic GenericValue getFromPrimaryKeyCache(GenericPK primaryKey)
getFromPrimaryKeyCache in interface DelegatorInterfacegetFromPrimaryKeyCache in class GenericDelegatorpublic String getGroupHelperName(String groupName)
GenericDelegatorgetGroupHelperName in interface DelegatorInterfacegetGroupHelperName in class GenericDelegatorgroupName - The name of the group to get the helper name forpublic List<ModelEntity> getModelEntitiesByGroup(String groupName)
GenericDelegatorgetModelEntitiesByGroup in interface DelegatorInterfacegetModelEntitiesByGroup in class GenericDelegatorgroupName - The name of the grouppublic ModelEntity getModelEntity(String entityName)
GenericDelegatorgetModelEntity in interface DelegatorInterfacegetModelEntity in class GenericDelegatorentityName - The name of the entity to getpublic Map<String,ModelEntity> getModelEntityMapByGroup(String groupName)
GenericDelegatorgetModelEntityMapByGroup in interface DelegatorInterfacegetModelEntityMapByGroup in class GenericDelegatorgroupName - The name of the grouppublic ModelGroupReader getModelGroupReader()
GenericDelegatorgetModelGroupReader in interface DelegatorInterfacegetModelGroupReader in class GenericDelegatorpublic ModelReader getModelReader()
GenericDelegatorgetModelReader in interface DelegatorInterfacegetModelReader in class GenericDelegatorpublic List<GenericValue> getMultiRelation(GenericValue value, String relationNameOne, String relationNameTwo) throws GenericEntityException
GenericDelegatorgetMultiRelation in interface DelegatorInterfacegetMultiRelation in class GenericDelegatorvalue - GenericValue instance containing the entityrelationNameOne - String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as
specified in the entity XML definition file, for first relationrelationNameTwo - String containing the relation name for second relationGenericEntityExceptionpublic List<GenericValue> getMultiRelation(GenericValue value, String relationNameOne, String relationNameTwo, List<String> orderBy) throws GenericEntityException
GenericDelegatorgetMultiRelation in interface DelegatorInterfacegetMultiRelation in class GenericDelegatorvalue - GenericValue instance containing the entityrelationNameOne - String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as
specified in the entity XML definition file, for first relationrelationNameTwo - String containing the relation name for second relationorderBy - The fields of the named entity to order the query by; may be null;
optionally add a " ASC" for ascending or " DESC" for descendingGenericEntityExceptionpublic Long getNextSeqId(String seqName)
DelegatorInterface
From v1.3.0 this is equivalent of calling DelegatorInterface.getNextSeqId(String, boolean) with true as second parameter.
seqName - The name of the sequence to get the next seq id frompublic Long getNextSeqId(String seqName, boolean clusterMode)
DelegatorInterfaceIf the instance should be running in cluster mode then it will try a SELECT FOR UPDATE approach to retrieving the next bank of sequence ids, to avoid potential collisions with other nodes.
If not in cluster mode, this is not required, and the existing JVM synchronization locking is enough.
It will be in clusterMode if true is passed as a parameter, or if EntityConfigUtil.DelegatorInfo#useDistributedCacheClear
is enabled
getNextSeqId in interface DelegatorInterfacegetNextSeqId in class GenericDelegatorseqName - The name of the sequence to get the next seq id fromclusterMode - Is this a node in a clustered instance or notpublic UtilCache<GenericEntity,GenericValue> getPrimaryKeyCache()
getPrimaryKeyCache in interface DelegatorInterfacegetPrimaryKeyCache in class GenericDelegatorpublic List<GenericValue> getRelated(String relationName, Map<String,?> byAndFields, List<String> orderBy, GenericValue value) throws GenericEntityException
GenericDelegatorgetRelated in interface DelegatorInterfacegetRelated in class GenericDelegatorrelationName - String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as
specified in the entity XML definition filebyAndFields - the fields that must equal in order to keep; may be nullorderBy - The fields of the named entity to order the query by; may be null;
optionally add a " ASC" for ascending or " DESC" for descendingvalue - GenericValue instance containing the entityGenericEntityExceptionpublic List<GenericValue> getRelated(String relationName, GenericValue value) throws GenericEntityException
GenericDelegatorgetRelated in interface DelegatorInterfacegetRelated in class GenericDelegatorrelationName - String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as
specified in the entity XML definition filevalue - GenericValue instance containing the entityGenericEntityExceptionpublic List<GenericValue> getRelatedByAnd(String relationName, Map<String,?> byAndFields, GenericValue value) throws GenericEntityException
GenericDelegatorgetRelatedByAnd in interface DelegatorInterfacegetRelatedByAnd in class GenericDelegatorrelationName - String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as
specified in the entity XML definition filebyAndFields - the fields that must equal in order to keep; may be nullvalue - GenericValue instance containing the entityGenericEntityExceptionpublic List<GenericValue> getRelatedCache(String relationName, GenericValue value) throws GenericEntityException
GenericDelegatorgetRelatedCache in interface DelegatorInterfacegetRelatedCache in class GenericDelegatorrelationName - String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as
specified in the entity XML definition filevalue - GenericValue instance containing the entityGenericEntityExceptionpublic GenericPK getRelatedDummyPK(String relationName, Map<String,?> byAndFields, GenericValue value) throws GenericEntityException
GenericDelegatorgetRelatedDummyPK in interface DelegatorInterfacegetRelatedDummyPK in class GenericDelegatorrelationName - String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as
specified in the entity XML definition filebyAndFields - the fields that must equal in order to keep; may be nullvalue - GenericValue instance containing the entityGenericEntityExceptionpublic GenericValue getRelatedOne(String relationName, GenericValue value) throws GenericEntityException
GenericDelegatorgetRelatedOne in interface DelegatorInterfacegetRelatedOne in class GenericDelegatorrelationName - the name of the relation to get (required)value - the value whose relation to get (required)GenericEntityExceptionpublic GenericValue getRelatedOneCache(String relationName, GenericValue value) throws GenericEntityException
GenericDelegatorgetRelatedOneCache in interface DelegatorInterfacegetRelatedOneCache in class GenericDelegatorrelationName - the name of the relation to get (required)value - the value whose relation to get (required)GenericEntityExceptionpublic List<GenericValue> getRelatedOrderBy(String relationName, List<String> orderBy, GenericValue value) throws GenericEntityException
GenericDelegatorgetRelatedOrderBy in interface DelegatorInterfacegetRelatedOrderBy in class GenericDelegatorrelationName - String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as
specified in the entity XML definition fileorderBy - The fields of the named entity to order the query by; may be null;
optionally add a " ASC" for ascending or " DESC" for descendingvalue - GenericValue instance containing the entityGenericEntityExceptionpublic GenericPK makePK(Element element)
makePK in class GenericDelegatorpublic GenericPK makePK(String entityName, Map<String,?> fields)
GenericDelegatormakePK in interface DelegatorInterfacemakePK in class GenericDelegatorentityName - the type of entity for which to create a PK (must exist in the model)fields - the primary key fields and their values (can be null)public GenericValue makeValue(Element element)
makeValue in class GenericDelegatorpublic GenericValue makeValue(String entityName, Map<String,?> fields)
GenericDelegatormakeValue in interface DelegatorInterfacemakeValue in class GenericDelegatorentityName - the type of entity to create (must exist in the model)fields - the entity fields and their values (can be null)public List<GenericValue> makeValues(Document document)
GenericDelegatormakeValues in class GenericDelegatordocument - the document to parse (can be null)public void putAllInPrimaryKeyCache(List<? extends GenericValue> values)
putAllInPrimaryKeyCache in interface DelegatorInterfaceputAllInPrimaryKeyCache in class GenericDelegatorpublic void putInAllCache(ModelEntity entity, List<? extends GenericValue> values)
putInAllCache in interface DelegatorInterfaceputInAllCache in class GenericDelegatorpublic void putInAllCache(String entityName, List<? extends GenericValue> values)
putInAllCache in interface DelegatorInterfaceputInAllCache in class GenericDelegatorpublic void putInAndCache(ModelEntity entity, Map<String,?> fields, List<? extends GenericValue> values)
putInAndCache in interface DelegatorInterfaceputInAndCache in class GenericDelegatorpublic void putInAndCache(String entityName, Map<String,?> fields, List<? extends GenericValue> values)
putInAndCache in interface DelegatorInterfaceputInAndCache in class GenericDelegatorpublic void putInPrimaryKeyCache(GenericPK primaryKey, GenericValue value)
putInPrimaryKeyCache in interface DelegatorInterfaceputInPrimaryKeyCache in class GenericDelegatorpublic List<GenericValue> readXmlDocument(URL url) throws SAXException, ParserConfigurationException, IOException
GenericDelegatorreadXmlDocument in class GenericDelegatorurl - the URL of the XML file (can be null)SAXExceptionParserConfigurationExceptionIOExceptionpublic void refresh(GenericValue value) throws GenericEntityException
GenericDelegatorrefresh in interface DelegatorInterfacerefresh in class GenericDelegatorvalue - GenericValue instance containing the entity to refreshGenericEntityExceptionpublic void refresh(GenericValue value, boolean doCacheClear) throws GenericEntityException
GenericDelegatorrefresh in interface DelegatorInterfacerefresh in class GenericDelegatorvalue - GenericValue instance containing the entity to refreshdoCacheClear - whether to automatically clear cache entries related to this operationGenericEntityExceptionpublic void refreshSequencer()
GenericDelegatorrefreshSequencer in interface DelegatorInterfacerefreshSequencer in class GenericDelegatorpublic int removeAll(List<? extends GenericEntity> dummyPKs) throws GenericEntityException
GenericDelegatorremoveAll in interface DelegatorInterfaceremoveAll in class GenericDelegatordummyPKs - Collection of GenericEntity instances containing the entities or by and fields to removeGenericEntityExceptionpublic int removeAll(List<? extends GenericEntity> dummyPKs, boolean doCacheClear) throws GenericEntityException
GenericDelegatorremoveAll in interface DelegatorInterfaceremoveAll in class GenericDelegatordummyPKs - Collection of GenericEntity instances containing the entities or by and fields to removedoCacheClear - whether to automatically clear cache entries related to this operationGenericEntityExceptionpublic int removeByAnd(String entityName, Map<String,?> fields) throws GenericEntityException
GenericDelegatorremoveByAnd in interface DelegatorInterfaceremoveByAnd in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML filefields - The fields of the named entity to query by with their corresponging valuesGenericEntityExceptionpublic int removeByAnd(String entityName, Map<String,?> fields, boolean doCacheClear) throws GenericEntityException
GenericDelegatorremoveByAnd in interface DelegatorInterfaceremoveByAnd in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML filefields - The fields of the named entity to query by with their corresponging valuesdoCacheClear - boolean that specifies whether to clear cache entries for this value to be removedGenericEntityExceptionpublic int removeByCondition(String entityName, EntityCondition entityCondition) throws GenericEntityException
GenericDelegatorremoveByCondition in interface DelegatorInterfaceremoveByCondition in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML fileentityCondition - The EntityCondition object that specifies how to constrain this queryGenericEntityExceptionpublic int removeByCondition(String entityName, EntityCondition entityCondition, boolean doCacheClear) throws GenericEntityException
GenericDelegatorremoveByCondition in interface DelegatorInterfaceremoveByCondition in class GenericDelegatorentityName - The Name of the Entity as defined in the entity XML fileentityCondition - The EntityCondition object that specifies how to constrain this querydoCacheClear - boolean that specifies whether to clear cache entries for this value to be removedGenericEntityExceptionpublic int removeByPrimaryKey(GenericPK primaryKey) throws GenericEntityException
GenericDelegatorremoveByPrimaryKey in interface DelegatorInterfaceremoveByPrimaryKey in class GenericDelegatorprimaryKey - The primary key of the entity to remove.GenericEntityExceptionpublic int removeByPrimaryKey(GenericPK primaryKey, boolean doCacheClear) throws GenericEntityException
GenericDelegatorremoveByPrimaryKey in interface DelegatorInterfaceremoveByPrimaryKey in class GenericDelegatorprimaryKey - The primary key of the entity to remove.doCacheClear - boolean that specifies whether to clear cache entries for this primaryKey to be removedGenericEntityExceptionpublic int removeRelated(String relationName, GenericValue value) throws GenericEntityException
GenericDelegatorremoveRelated in interface DelegatorInterfaceremoveRelated in class GenericDelegatorrelationName - String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as
specified in the entity XML definition filevalue - GenericValue instance containing the entityGenericEntityExceptionpublic int removeRelated(String relationName, GenericValue value, boolean doCacheClear) throws GenericEntityException
GenericDelegatorremoveRelated in interface DelegatorInterfaceremoveRelated in class GenericDelegatorrelationName - String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as specified
in the entity XML definition filevalue - GenericValue instance containing the entitydoCacheClear - boolean that specifies whether to clear cache
entries for this value to be removedGenericEntityExceptionpublic int removeValue(GenericValue value) throws GenericEntityException
GenericDelegatorremoveValue in interface DelegatorInterfaceremoveValue in class GenericDelegatorvalue - The GenericValue object of the entity to remove.GenericEntityExceptionpublic int removeValue(GenericValue value, boolean doCacheClear) throws GenericEntityException
GenericDelegatorremoveValue in interface DelegatorInterfaceremoveValue in class GenericDelegatorvalue - The GenericValue object of the entity to remove.doCacheClear - boolean that specifies whether to clear cache entries for this value to be removedGenericEntityExceptionpublic void setSequencer(SequenceUtil sequencer)
GenericDelegatorsetSequencer in interface DelegatorInterfacesetSequencer in class GenericDelegatorsequencer - the sequencer to setpublic int store(GenericValue value) throws GenericEntityException
GenericDelegatorstore in interface DelegatorInterfacestore in class GenericDelegatorvalue - GenericValue instance containing the entityGenericEntityExceptionpublic int store(GenericValue value, boolean doCacheClear) throws GenericEntityException
GenericDelegatorstore in interface DelegatorInterfacestore in class GenericDelegatorvalue - GenericValue instance containing the entitydoCacheClear - whether to automatically clear cache entries related to this operationGenericEntityExceptionpublic int storeAll(List<? extends GenericValue> values) throws GenericEntityException
GenericDelegatorstoreAll in interface DelegatorInterfacestoreAll in class GenericDelegatorvalues - List of GenericValue instances containing the entities to storeGenericEntityExceptionpublic int storeAll(List<? extends GenericValue> values, boolean doCacheClear) throws GenericEntityException
GenericDelegatorstoreAll in interface DelegatorInterfacestoreAll in class GenericDelegatorvalues - List of GenericValue instances containing the entities to storedoCacheClear - whether to automatically clear cache entries related to this operationGenericEntityExceptionpublic List<GenericValue> transform(String entityName, EntityCondition entityCondition, List<String> orderBy, String lockField, Transformation transformation)
DelegatorInterfacetransform in interface DelegatorInterfacetransform in class GenericDelegatorentityName - the type of entity to transform (required)entityCondition - the condition that selects the entities to transform (null means transform all)orderBy - the order in which the entities should be selected for updating (null means no ordering)lockField - the entity field to use for optimistic locking; the value of this field will be read
between the SELECT and the UPDATE to determine whether another process has updated one of the target records in
the meantime; if so, the transformation will be reapplied and another UPDATE attemptedtransformation - the transformation to apply (required)Copyright © 2024 Atlassian. All rights reserved.