| java.lang.Object org.ofbiz.entity.GenericDelegator
Method Summary | |
protected void | absorbList(List lst) | public void | clearAllCacheLinesByDummyPK(Collection dummyPKs) | public void | clearAllCacheLinesByValue(Collection values) | public void | clearAllCaches() This method is a shortcut to completely clear all entity engine caches. | public void | clearAllCaches(boolean distribute) | public void | clearCacheLine(String entityName, Map fields) | public 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. | public void | clearCacheLine(GenericPK primaryKey, boolean distribute) | public void | clearCacheLine(GenericValue value) Remove a CACHED GenericValue from as many caches as it can. | public void | clearCacheLine(GenericValue value, boolean distribute) | public void | clearCacheLineFlexible(GenericEntity dummyPK) Remove a CACHED Generic Entity from the cache by its primary key. | public void | clearCacheLineFlexible(GenericEntity dummyPK, boolean distribute) | public GenericValue | create(String entityName, Map fields) | public GenericValue | create(GenericValue value) | public GenericValue | create(GenericValue value, boolean doCacheClear) | public GenericValue | create(GenericPK primaryKey) | public GenericValue | create(GenericPK primaryKey, boolean doCacheClear) | public GenericValue | createOrStore(GenericValue value, boolean doCacheClear) | public GenericValue | createOrStore(GenericValue value) | protected void | evalEcaRules(String event, String currentOperation, GenericEntity value, Map eventMap, boolean noEventMapFound, boolean isError) | public List | findAll(String entityName) | public List | findAll(String entityName, List orderBy) | public List | findAllByPrimaryKeys(Collection primaryKeys) Find a number of Generic Value objects by their Primary Keys, all at once
Parameters: primaryKeys - A Collection of primary keys to find by. | public List | findAllByPrimaryKeysCache(Collection 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.
Parameters: primaryKeys - A Collection of primary keys to find by. | public List | findAllCache(String entityName) | public List | findAllCache(String entityName, List orderBy) | public List | findByAnd(String entityName, Map fields) | public List | findByAnd(String entityName, Map fields, List orderBy) | public List | findByAnd(ModelEntity modelEntity, Map fields, List orderBy) | public List | findByAnd(String entityName, List expressions) | public List | findByAnd(String entityName, List expressions, List orderBy) | public List | findByAndCache(String entityName, Map fields) | public List | findByAndCache(String entityName, Map fields, List orderBy) | public List | findByCondition(String entityName, EntityCondition entityCondition, Collection fieldsToSelect, List orderBy) Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details. | public List | findByLike(String entityName, Map fields) | public List | findByLike(String entityName, Map fields, List orderBy) | public List | findByOr(String entityName, Map fields) | public List | findByOr(String entityName, Map fields, List orderBy) | public List | findByOr(String entityName, List expressions) | public List | findByOr(String entityName, List expressions, List orderBy) | public GenericValue | findByPrimaryKey(GenericPK primaryKey) Find a Generic Entity by its Primary Key
Parameters: primaryKey - The primary key to find by. | public GenericValue | findByPrimaryKey(String entityName, Map fields) | public GenericValue | findByPrimaryKeyCache(GenericPK primaryKey) Find a CACHED Generic Entity by its Primary Key
Parameters: primaryKey - The primary key to find by. | public GenericValue | findByPrimaryKeyCache(String entityName, Map fields) | public GenericValue | findByPrimaryKeyPartial(GenericPK primaryKey, Set keys) | public long | findCountByAnd(String entityName, Map fields) | public long | findCountByCondition(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition) | public EntityListIterator | findListIteratorByCondition(String entityName, EntityCondition entityCondition, Collection fieldsToSelect, List orderBy) Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details. | public EntityListIterator | findListIteratorByCondition(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Collection fieldsToSelect, List orderBy, EntityFindOptions findOptions) Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details.
Parameters: entityName - The name of the Entity as defined in the entity XML file Parameters: whereEntityCondition - 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) Parameters: 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) Parameters: fieldsToSelect - The fields of the named entity to get from the database; if empty or null all fields will be retreived Parameters: orderBy - The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending Parameters: findOptions - An instance of EntityFindOptions that specifies advanced query options. | public EntityListIterator | findListIteratorByCondition(DynamicViewEntity dynamicViewEntity, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Collection fieldsToSelect, List orderBy, EntityFindOptions findOptions) Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details.
Parameters: dynamicViewEntity - The DynamicViewEntity to use for the entity model for this query; generally created on the fly for limited use Parameters: whereEntityCondition - 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) Parameters: 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) Parameters: fieldsToSelect - The fields of the named entity to get from the database; if empty or null all fields will be retreived Parameters: orderBy - The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending Parameters: findOptions - An instance of EntityFindOptions that specifies advanced query options. | public UtilCache | getAllCache() | public UtilCache | getAndCache() | protected EntityConfigUtil.DelegatorInfo | getDelegatorInfo() | public String | getDelegatorName() | protected Map | getEcaEntityEventMap(String entityName) | public ModelFieldType | getEntityFieldType(ModelEntity entity, String type) | public Collection | getEntityFieldTypeNames(ModelEntity entity) | public String | getEntityGroupName(String entityName) | public GenericHelper | getEntityHelper(String entityName) | public GenericHelper | getEntityHelper(ModelEntity entity) | public String | getEntityHelperName(String entityName) | public String | getEntityHelperName(ModelEntity entity) | public Set | getFieldNameSetsCopy(String entityName) | public List | getFromAllCache(String entityName) | public List | getFromAndCache(String entityName, Map fields) | public List | getFromAndCache(ModelEntity entity, Map fields) | public GenericValue | getFromPrimaryKeyCache(GenericPK primaryKey) | public static GenericDelegator | getGenericDelegator(String delegatorName) | public String | getGroupHelperName(String groupName) | public List | getModelEntitiesByGroup(String groupName) | public ModelEntity | getModelEntity(String entityName) | public Map | getModelEntityMapByGroup(String groupName) | public ModelGroupReader | getModelGroupReader() | public ModelReader | getModelReader() | public List | getMultiRelation(GenericValue value, String relationNameOne, String relationNameTwo, List orderBy) Get the named Related Entity for the GenericValue from the persistent store across another Relation. | public List | getMultiRelation(GenericValue value, String relationNameOne, String relationNameTwo) Get the named Related Entity for the GenericValue from the persistent store across another Relation. | public Long | getNextSeqId(String seqName) | public Long | getNextSeqId(String seqName, long staggerMax) | public UtilCache | getPrimaryKeyCache() | public List | getRelated(String relationName, GenericValue value) | public List | getRelated(String relationName, Map byAndFields, List orderBy, GenericValue value) | public List | getRelatedByAnd(String relationName, Map byAndFields, GenericValue value) | public List | getRelatedCache(String relationName, GenericValue value) | public GenericPK | getRelatedDummyPK(String relationName, Map byAndFields, GenericValue value) | public GenericValue | getRelatedOne(String relationName, GenericValue value) | public GenericValue | getRelatedOneCache(String relationName, GenericValue value) | public List | getRelatedOrderBy(String relationName, List orderBy, GenericValue value) | public GenericPK | makePK(String entityName, Map fields) | public GenericPK | makePK(Element element) | public GenericValue | makeValidValue(String entityName, Map fields) | public GenericValue | makeValue(String entityName, Map fields) | public GenericValue | makeValue(Element element) | public List | makeValues(Document document) | public void | putAllInPrimaryKeyCache(List values) | public void | putInAllCache(String entityName, List values) | public void | putInAllCache(ModelEntity entity, List values) | public void | putInAndCache(String entityName, Map fields, List values) | public void | putInAndCache(ModelEntity entity, Map fields, List values) | public void | putInPrimaryKeyCache(GenericPK primaryKey, GenericValue value) | public List | readXmlDocument(URL url) | public void | refresh(GenericValue value) | public void | refresh(GenericValue value, boolean doCacheClear) | public void | refreshSequencer() Refreshes the ID sequencer clearing all cached bank values. | public int | removeAll(List dummyPKs) Remove the Entities from the List from the persistent store. | public int | removeAll(List dummyPKs, boolean doCacheClear) Remove the Entities from the List from the persistent store. | public int | removeByAnd(String entityName, Map fields) | public int | removeByAnd(String entityName, Map fields, boolean doCacheClear) | public int | removeByPrimaryKey(GenericPK primaryKey) Remove a Generic Entity corresponding to the primaryKey
Parameters: primaryKey - The primary key of the entity to remove. | public int | removeByPrimaryKey(GenericPK primaryKey, boolean doCacheClear) | public int | removeRelated(String relationName, GenericValue value) | public int | removeRelated(String relationName, GenericValue value, boolean doCacheClear) | public int | removeValue(GenericValue value) Remove a Generic Value from the database
Parameters: value - The GenericValue object of the entity to remove. | public int | removeValue(GenericValue value, boolean doCacheClear) | protected void | saveEntitySyncRemoveInfo(GenericEntity dummyPK) | public 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. | public int | store(GenericValue value) | public int | store(GenericValue value, boolean doCacheClear) | public int | storeAll(List values) Store the Entities from the List GenericValue instances to the persistent store.
This is different than the normal store method in that the store method only does
an update, while the storeAll method checks to see if each entity exists, then
either does an insert or an update as appropriate.
These updates all happen in one transaction, so they will either all succeed or all fail,
if the data source supports transactions. | public int | storeAll(List values, boolean doCacheClear) Store the Entities from the List GenericValue instances to the persistent store.
This is different than the normal store method in that the store method only does
an update, while the storeAll method checks to see if each entity exists, then
either does an insert or an update as appropriate.
These updates all happen in one transaction, so they will either all succeed or all fail,
if the data source supports transactions. |
ECA_HANDLER_CLASS_NAME | final public static String ECA_HANDLER_CLASS_NAME(Code) | | |
andCacheFieldSets | protected Map andCacheFieldSets(Code) | | |
delegatorCache | protected static Map delegatorCache(Code) | | the delegatorCache will now be a HashMap, allowing reload of definitions,
but the delegator will always be the same object for the given name
|
keepLocalReaders | final public static boolean keepLocalReaders(Code) | | set this to true for better performance; set to false to be able to reload definitions at runtime throught the cache manager
|
GenericDelegator | protected GenericDelegator()(Code) | | Only allow creation through the factory method
|
absorbList | protected void absorbList(List lst)(Code) | | |
clearAllCacheLinesByDummyPK | public void clearAllCacheLinesByDummyPK(Collection dummyPKs)(Code) | | |
clearAllCacheLinesByValue | public void clearAllCacheLinesByValue(Collection values)(Code) | | |
clearAllCaches | public void clearAllCaches()(Code) | | This method is a shortcut to completely clear all entity engine caches.
For performance reasons this should not be called very often.
|
clearAllCaches | public void clearAllCaches(boolean distribute)(Code) | | |
clearCacheLine | public void clearCacheLine(String entityName, Map fields)(Code) | | Remove a CACHED Generic Entity (List) from the cache, either a PK, ByAnd, or All
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: fields - The fields of the named entity to query by with their corresponging values |
clearCacheLine | public void clearCacheLine(GenericPK primaryKey)(Code) | | 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.
Also tries to clear the corresponding all cache entry.
Parameters: primaryKey - The primary key to clear by. |
clearCacheLine | public void clearCacheLine(GenericPK primaryKey, boolean distribute)(Code) | | |
clearCacheLine | public void clearCacheLine(GenericValue value)(Code) | | Remove a CACHED GenericValue from as many caches as it can. Automatically
tries to remove entries from the all cache, the by primary key cache, and
the by and cache. This is the ONLY method that tries to clear automatically
from the by and cache.
Parameters: value - The GenericValue to clear by. |
clearCacheLineFlexible | public void clearCacheLineFlexible(GenericEntity dummyPK)(Code) | | Remove a CACHED Generic Entity from the cache by its primary key.
Checks to see if the passed GenericPK is a complete primary key, if
it is then the cache line will be removed from the primaryKeyCache; if it
is NOT a complete primary key it will remove the cache line from the andCache.
If the fields map is empty, then the allCache for the entity will be cleared.
Parameters: dummyPK - The dummy primary key to clear by. |
clearCacheLineFlexible | public void clearCacheLineFlexible(GenericEntity dummyPK, boolean distribute)(Code) | | |
create | public GenericValue create(GenericValue value) throws GenericEntityException(Code) | | Creates a Entity in the form of a GenericValue and write it to the datasource
Parameters: value - The GenericValue to create a value in the datasource from GenericValue instance containing the new instance |
create | public GenericValue create(GenericValue value, boolean doCacheClear) throws GenericEntityException(Code) | | Creates a Entity in the form of a GenericValue and write it to the datasource
Parameters: value - The GenericValue to create a value in the datasource from Parameters: doCacheClear - boolean that specifies whether or not to automatically clear cache entries related to this operation GenericValue instance containing the new instance |
create | public GenericValue create(GenericPK primaryKey) throws GenericEntityException(Code) | | Creates a Entity in the form of a GenericValue and write it to the datasource
Parameters: primaryKey - The GenericPK to create a value in the datasource from GenericValue instance containing the new instance |
create | public GenericValue create(GenericPK primaryKey, boolean doCacheClear) throws GenericEntityException(Code) | | Creates a Entity in the form of a GenericValue and write it to the datasource
Parameters: primaryKey - The GenericPK to create a value in the datasource from Parameters: doCacheClear - boolean that specifies whether to clear related cache entries for this primaryKey to be created GenericValue instance containing the new instance |
createOrStore | public GenericValue createOrStore(GenericValue value, boolean doCacheClear) throws GenericEntityException(Code) | | Creates or stores an Entity
Parameters: value - The GenericValue instance containing the new or existing instance Parameters: doCacheClear - boolean that specifies whether or not to automatically clear cache entries related to this operation GenericValue instance containing the new or updated instance |
createOrStore | public GenericValue createOrStore(GenericValue value) throws GenericEntityException(Code) | | Creates or stores an Entity
Parameters: value - The GenericValue instance containing the new or existing instance GenericValue instance containing the new or updated instance |
findAll | public List findAll(String entityName) throws GenericEntityException(Code) | | Finds all Generic entities
Parameters: entityName - The Name of the Entity as defined in the entity XML file List containing all Generic entities |
findAll | public List findAll(String entityName, List orderBy) throws GenericEntityException(Code) | | Finds all Generic entities
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: orderBy - The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending List containing all Generic entities |
findAllByPrimaryKeys | public List findAllByPrimaryKeys(Collection primaryKeys) throws GenericEntityException(Code) | | Find a number of Generic Value objects by their Primary Keys, all at once
Parameters: primaryKeys - A Collection of primary keys to find by. List of GenericValue objects corresponding to the passed primaryKey objects |
findAllByPrimaryKeysCache | public List findAllByPrimaryKeysCache(Collection primaryKeys) throws GenericEntityException(Code) | | 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.
Parameters: primaryKeys - A Collection of primary keys to find by. List of GenericValue objects corresponding to the passed primaryKey objects |
findAllCache | public List findAllCache(String entityName) throws GenericEntityException(Code) | | Finds all Generic entities, looking first in the cache
Parameters: entityName - The Name of the Entity as defined in the entity XML file List containing all Generic entities |
findAllCache | public List findAllCache(String entityName, List orderBy) throws GenericEntityException(Code) | | Finds all Generic entities, looking first in the cache; uses orderBy for lookup, but only keys results on the entityName and fields
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: orderBy - The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending List containing all Generic entities |
findByAnd | public List findByAnd(String entityName, Map fields) throws GenericEntityException(Code) | | Finds Generic Entity records by all of the specified fields (ie: combined using AND)
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: fields - The fields of the named entity to query by with their corresponging values List of GenericValue instances that match the query |
findByAnd | public List findByAnd(String entityName, Map fields, List orderBy) throws GenericEntityException(Code) | | Finds Generic Entity records by all of the specified fields (ie: combined using AND)
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: fields - The fields of the named entity to query by with their corresponging values Parameters: orderBy - The fields of the named entity to order the query by;optionally add a " ASC" for ascending or " DESC" for descending List of GenericValue instances that match the query |
findByAnd | public List findByAnd(String entityName, List expressions) throws GenericEntityException(Code) | | Finds Generic Entity records by all of the specified expressions (ie: combined using AND)
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: expressions - The expressions to use for the lookup, each consisting of at least a field name, an EntityOperator, and a value to compare to List of GenericValue instances that match the query |
findByAnd | public List findByAnd(String entityName, List expressions, List orderBy) throws GenericEntityException(Code) | | Finds Generic Entity records by all of the specified expressions (ie: combined using AND)
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: expressions - The expressions to use for the lookup, each consisting of at least a field name, an EntityOperator, and a value to compare to Parameters: orderBy - The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending List of GenericValue instances that match the query |
findByAndCache | public List findByAndCache(String entityName, Map fields) throws GenericEntityException(Code) | | Finds Generic Entity records by all of the specified fields (ie: combined using AND), looking first in the cache; uses orderBy for lookup, but only keys results on the entityName and fields
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: fields - The fields of the named entity to query by with their corresponging values List of GenericValue instances that match the query |
findByAndCache | public List findByAndCache(String entityName, Map fields, List orderBy) throws GenericEntityException(Code) | | Finds Generic Entity records by all of the specified fields (ie: combined using AND), looking first in the cache; uses orderBy for lookup, but only keys results on the entityName and fields
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: fields - The fields of the named entity to query by with their corresponging values Parameters: orderBy - The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending List of GenericValue instances that match the query |
findByCondition | public List findByCondition(String entityName, EntityCondition entityCondition, Collection fieldsToSelect, List orderBy) throws GenericEntityException(Code) | | Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details.
Parameters: entityName - The Name of the Entity as defined in the entity model XML file Parameters: entityCondition - The EntityCondition object that specifies how to constrain this query Parameters: fieldsToSelect - The fields of the named entity to get from the database; if empty or null all fields will be retreived Parameters: orderBy - The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending List of GenericValue objects representing the result |
findByOr | public List findByOr(String entityName, Map fields) throws GenericEntityException(Code) | | Finds Generic Entity records by all of the specified fields (ie: combined using OR)
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: fields - The fields of the named entity to query by with their corresponging values List of GenericValue instances that match the query |
findByOr | public List findByOr(String entityName, Map fields, List orderBy) throws GenericEntityException(Code) | | Finds Generic Entity records by all of the specified fields (ie: combined using OR)
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: fields - The fields of the named entity to query by with their corresponging values Parameters: orderBy - The fields of the named entity to order the query by;optionally add a " ASC" for ascending or " DESC" for descending List of GenericValue instances that match the query |
findByOr | public List findByOr(String entityName, List expressions) throws GenericEntityException(Code) | | Finds Generic Entity records by all of the specified expressions (ie: combined using OR)
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: expressions - The expressions to use for the lookup, each consisting of at least a field name, an EntityOperator, and a value to compare to List of GenericValue instances that match the query |
findByOr | public List findByOr(String entityName, List expressions, List orderBy) throws GenericEntityException(Code) | | Finds Generic Entity records by all of the specified expressions (ie: combined using OR)
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: expressions - The expressions to use for the lookup, each consisting of at least a field name, an EntityOperator, and a value to compare to Parameters: orderBy - The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending List of GenericValue instances that match the query |
findByPrimaryKey | public GenericValue findByPrimaryKey(GenericPK primaryKey) throws GenericEntityException(Code) | | Find a Generic Entity by its Primary Key
Parameters: primaryKey - The primary key to find by. The GenericValue corresponding to the primaryKey |
findByPrimaryKey | public GenericValue findByPrimaryKey(String entityName, Map fields) throws GenericEntityException(Code) | | Find a Generic Entity by its Primary Key
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: fields - The fields of the named entity to query by with their corresponging values The GenericValue corresponding to the primaryKey |
findByPrimaryKeyCache | public GenericValue findByPrimaryKeyCache(GenericPK primaryKey) throws GenericEntityException(Code) | | Find a CACHED Generic Entity by its Primary Key
Parameters: primaryKey - The primary key to find by. The GenericValue corresponding to the primaryKey |
findByPrimaryKeyCache | public GenericValue findByPrimaryKeyCache(String entityName, Map fields) throws GenericEntityException(Code) | | Find a CACHED Generic Entity by its Primary Key
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: fields - The fields of the named entity to query by with their corresponging values The GenericValue corresponding to the primaryKey |
findByPrimaryKeyPartial | public GenericValue findByPrimaryKeyPartial(GenericPK primaryKey, Set keys) throws GenericEntityException(Code) | | Find a Generic Entity by its Primary Key and only returns the values requested by the passed keys (names)
Parameters: primaryKey - The primary key to find by. Parameters: keys - The keys, or names, of the values to retrieve; only these values will be retrieved The GenericValue corresponding to the primaryKey |
findListIteratorByCondition | public EntityListIterator findListIteratorByCondition(String entityName, EntityCondition entityCondition, Collection fieldsToSelect, List orderBy) throws GenericEntityException(Code) | | Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details.
Parameters: entityName - The Name of the Entity as defined in the entity model XML file Parameters: entityCondition - 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) Parameters: fieldsToSelect - The fields of the named entity to get from the database; if empty or null all fields will be retreived Parameters: orderBy - The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending EntityListIterator representing the result of the query: NOTE THAT THIS MUST BE CLOSED WHEN YOU AREDONE WITH IT, AND DON'T LEAVE IT OPEN TOO LONG BEACUSE IT WILL MAINTAIN A DATABASE CONNECTION. |
findListIteratorByCondition | public EntityListIterator findListIteratorByCondition(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Collection fieldsToSelect, List orderBy, EntityFindOptions findOptions) throws GenericEntityException(Code) | | Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details.
Parameters: entityName - The name of the Entity as defined in the entity XML file Parameters: whereEntityCondition - 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) Parameters: 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) Parameters: fieldsToSelect - The fields of the named entity to get from the database; if empty or null all fields will be retreived Parameters: orderBy - The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending Parameters: findOptions - An instance of EntityFindOptions that specifies advanced query options. See the EntityFindOptions JavaDoc for more details. EntityListIterator representing the result of the query: NOTE THAT THIS MUST BE CLOSED WHEN YOU AREDONE WITH IT, AND DON'T LEAVE IT OPEN TOO LONG BEACUSE IT WILL MAINTAIN A DATABASE CONNECTION. |
findListIteratorByCondition | public EntityListIterator findListIteratorByCondition(DynamicViewEntity dynamicViewEntity, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Collection fieldsToSelect, List orderBy, EntityFindOptions findOptions) throws GenericEntityException(Code) | | Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details.
Parameters: dynamicViewEntity - The DynamicViewEntity to use for the entity model for this query; generally created on the fly for limited use Parameters: whereEntityCondition - 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) Parameters: 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) Parameters: fieldsToSelect - The fields of the named entity to get from the database; if empty or null all fields will be retreived Parameters: orderBy - The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending Parameters: findOptions - An instance of EntityFindOptions that specifies advanced query options. See the EntityFindOptions JavaDoc for more details. EntityListIterator representing the result of the query: NOTE THAT THIS MUST BE CLOSED WHEN YOU AREDONE WITH IT, AND DON'T LEAVE IT OPEN TOO LONG BEACUSE IT WILL MAINTAIN A DATABASE CONNECTION. |
getDelegatorName | public String getDelegatorName()(Code) | | Gets the name of the server configuration that corresponds to this delegator
server configuration name |
getEcaEntityEventMap | protected Map getEcaEntityEventMap(String entityName)(Code) | | |
getEntityFieldType | public ModelFieldType getEntityFieldType(ModelEntity entity, String type) throws GenericEntityException(Code) | | Gets a field type instance by name from the helper that corresponds to the specified entity
Parameters: entity - The entity Parameters: type - The name of the type ModelFieldType instance for the named type from the helper that corresponds to the specified entity |
getEntityFieldTypeNames | public Collection getEntityFieldTypeNames(ModelEntity entity) throws GenericEntityException(Code) | | Gets field type names from the helper that corresponds to the specified entity
Parameters: entity - The entity Collection of field type names from the helper that corresponds to the specified entity |
getEntityGroupName | public String getEntityGroupName(String entityName)(Code) | | Gets the helper name that corresponds to this delegator and the specified entityName
Parameters: entityName - The name of the entity to get the helper for String with the helper name that corresponds to this delegator and the specified entityName |
getEntityHelper | public GenericHelper getEntityHelper(String entityName) throws GenericEntityException(Code) | | Gets the an instance of helper that corresponds to this delegator and the specified entityName
Parameters: entityName - The name of the entity to get the helper for GenericHelper that corresponds to this delegator and the specified entityName |
getEntityHelper | public GenericHelper getEntityHelper(ModelEntity entity) throws GenericEntityException(Code) | | Gets the an instance of helper that corresponds to this delegator and the specified entity
Parameters: entity - The entity to get the helper for GenericHelper that corresponds to this delegator and the specified entity |
getEntityHelperName | public String getEntityHelperName(String entityName)(Code) | | Gets the helper name that corresponds to this delegator and the specified entityName
Parameters: entityName - The name of the entity to get the helper name for String with the helper name that corresponds to this delegator and the specified entityName |
getEntityHelperName | public String getEntityHelperName(ModelEntity entity)(Code) | | Gets the helper name that corresponds to this delegator and the specified entity
Parameters: entity - The entity to get the helper for String with the helper name that corresponds to this delegator and the specified entity |
getFieldNameSetsCopy | public Set getFieldNameSetsCopy(String entityName)(Code) | | Gets a Set of Sets of fieldNames used in the by and cache for the given entityName
|
getGroupHelperName | public String getGroupHelperName(String groupName)(Code) | | Gets the helper name that corresponds to this delegator and the specified entityName
Parameters: groupName - The name of the group to get the helper name for String with the helper name that corresponds to this delegator and the specified entityName |
getModelEntitiesByGroup | public List getModelEntitiesByGroup(String groupName)(Code) | | Gets a list of entity models that are in a group corresponding to the specified group name
Parameters: groupName - The name of the group List of ModelEntity instances |
getModelEntity | public ModelEntity getModelEntity(String entityName)(Code) | | Gets the instance of ModelEntity that corresponds to this delegator and the specified entityName
Parameters: entityName - The name of the entity to get ModelEntity that corresponds to this delegator and the specified entityName |
getModelEntityMapByGroup | public Map getModelEntityMapByGroup(String groupName)(Code) | | Gets a Map of entity name & entity model pairs that are in the named group
Parameters: groupName - The name of the group Map of entityName String keys and ModelEntity instance values |
getModelGroupReader | public ModelGroupReader getModelGroupReader()(Code) | | Gets the instance of ModelGroupReader that corresponds to this delegator
ModelGroupReader that corresponds to this delegator |
getModelReader | public ModelReader getModelReader()(Code) | | Gets the instance of ModelReader that corresponds to this delegator
ModelReader that corresponds to this delegator |
getMultiRelation | public List getMultiRelation(GenericValue value, String relationNameOne, String relationNameTwo, List orderBy) throws GenericEntityException(Code) | | Get the named Related Entity for the GenericValue from the persistent store across another Relation.
Helps to get related Values in a multi-to-multi relationship.
Parameters: relationNameOne - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file, for first relation Parameters: relationNameTwo - String containing the relation name for second relation Parameters: value - GenericValue instance containing the entity Parameters: orderBy - The fields of the named entity to order the query by; may be null;optionally add a " ASC" for ascending or " DESC" for descending List of GenericValue instances as specified in the relation definition |
getMultiRelation | public List getMultiRelation(GenericValue value, String relationNameOne, String relationNameTwo) throws GenericEntityException(Code) | | Get the named Related Entity for the GenericValue from the persistent store across another Relation.
Helps to get related Values in a multi-to-multi relationship.
Parameters: relationNameOne - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file, for first relation Parameters: relationNameTwo - String containing the relation name for second relation Parameters: value - GenericValue instance containing the entity List of GenericValue instances as specified in the relation definition |
getNextSeqId | public Long getNextSeqId(String seqName)(Code) | | 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
Parameters: seqName - The name of the sequence to get the next seq id from Long with the next seq id for the given sequence name |
getNextSeqId | public Long getNextSeqId(String seqName, long staggerMax)(Code) | | 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
Parameters: seqName - The name of the sequence to get the next seq id from Parameters: staggerMax - The maximum amount to stagger the sequenced ID, if 1 the sequence will be incremented by 1, otherwise the current sequence ID will be incremented by a value between 1 and staggerMax Long with the next seq id for the given sequence name |
getRelated | public List getRelated(String relationName, GenericValue value) throws GenericEntityException(Code) | | Get the named Related Entity for the GenericValue from the persistent store
Parameters: relationName - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file Parameters: value - GenericValue instance containing the entity List of GenericValue instances as specified in the relation definition |
getRelated | public List getRelated(String relationName, Map byAndFields, List orderBy, GenericValue value) throws GenericEntityException(Code) | | Get the named Related Entity for the GenericValue from the persistent store
Parameters: relationName - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file Parameters: byAndFields - the fields that must equal in order to keep; may be null Parameters: orderBy - The fields of the named entity to order the query by; may be null;optionally add a " ASC" for ascending or " DESC" for descending Parameters: value - GenericValue instance containing the entity List of GenericValue instances as specified in the relation definition |
getRelatedByAnd | public List getRelatedByAnd(String relationName, Map byAndFields, GenericValue value) throws GenericEntityException(Code) | | Get the named Related Entity for the GenericValue from the persistent store
Parameters: relationName - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file Parameters: byAndFields - the fields that must equal in order to keep; may be null Parameters: value - GenericValue instance containing the entity List of GenericValue instances as specified in the relation definition |
getRelatedCache | public List getRelatedCache(String relationName, GenericValue value) throws GenericEntityException(Code) | | 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
Parameters: relationName - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file Parameters: value - GenericValue instance containing the entity List of GenericValue instances as specified in the relation definition |
getRelatedDummyPK | public GenericPK getRelatedDummyPK(String relationName, Map byAndFields, GenericValue value) throws GenericEntityException(Code) | | Get a dummy primary key for the named Related Entity for the GenericValue
Parameters: relationName - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file Parameters: byAndFields - the fields that must equal in order to keep; may be null Parameters: value - GenericValue instance containing the entity GenericPK containing a possibly incomplete PrimaryKey object representing the related entity or entities |
getRelatedOrderBy | public List getRelatedOrderBy(String relationName, List orderBy, GenericValue value) throws GenericEntityException(Code) | | Get the named Related Entity for the GenericValue from the persistent store
Parameters: relationName - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file Parameters: orderBy - The fields of the named entity to order the query by; may be null;optionally add a " ASC" for ascending or " DESC" for descending Parameters: value - GenericValue instance containing the entity List of GenericValue instances as specified in the relation definition |
makePK | public GenericPK makePK(String entityName, Map fields)(Code) | | Creates a Primary Key in the form of a GenericPK without persisting it
|
makeValidValue | public GenericValue makeValidValue(String entityName, Map fields)(Code) | | Creates a Entity in the form of a GenericValue without persisting it; only valid fields will be pulled from the fields Map
|
makeValue | public GenericValue makeValue(String entityName, Map fields)(Code) | | Creates a Entity in the form of a GenericValue without persisting it
|
putAllInPrimaryKeyCache | public void putAllInPrimaryKeyCache(List values)(Code) | | |
refresh | public void refresh(GenericValue value) throws GenericEntityException(Code) | | Refresh the Entity for the GenericValue from the persistent store
Parameters: value - GenericValue instance containing the entity to refresh |
refresh | public void refresh(GenericValue value, boolean doCacheClear) throws GenericEntityException(Code) | | Refresh the Entity for the GenericValue from the persistent store
Parameters: value - GenericValue instance containing the entity to refresh Parameters: doCacheClear - boolean that specifies whether or not to automatically clear cache entries related to this operation |
refreshSequencer | public void refreshSequencer()(Code) | | Refreshes the ID sequencer clearing all cached bank values.
|
removeAll | public int removeAll(List dummyPKs) throws GenericEntityException(Code) | | Remove the Entities from the List from the persistent store.
The List contains GenericEntity objects, can be either GenericPK or GenericValue.
If a certain entity contains a complete primary key, the entity in the datasource corresponding
to that primary key will be removed, this is like a removeByPrimary Key.
On the other hand, if a certain entity is an incomplete or non primary key,
if will behave like the removeByAnd method.
These updates all happen in one transaction, so they will either all succeed or all fail,
if the data source supports transactions.
Parameters: dummyPKs - Collection of GenericEntity instances containing the entities or by and fields to remove int representing number of rows effected by this operation |
removeAll | public int removeAll(List dummyPKs, boolean doCacheClear) throws GenericEntityException(Code) | | Remove the Entities from the List from the persistent store.
The List contains GenericEntity objects, can be either GenericPK or GenericValue.
If a certain entity contains a complete primary key, the entity in the datasource corresponding
to that primary key will be removed, this is like a removeByPrimary Key.
On the other hand, if a certain entity is an incomplete or non primary key,
if will behave like the removeByAnd method.
These updates all happen in one transaction, so they will either all succeed or all fail,
if the data source supports transactions.
Parameters: dummyPKs - Collection of GenericEntity instances containing the entities or by and fields to remove Parameters: doCacheClear - boolean that specifies whether or not to automatically clear cache entries related to this operation int representing number of rows effected by this operation |
removeByAnd | public int removeByAnd(String entityName, Map fields) throws GenericEntityException(Code) | | Removes/deletes Generic Entity records found by all of the specified fields (ie: combined using AND)
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: fields - The fields of the named entity to query by with their corresponging values int representing number of rows effected by this operation |
removeByAnd | public int removeByAnd(String entityName, Map fields, boolean doCacheClear) throws GenericEntityException(Code) | | Removes/deletes Generic Entity records found by all of the specified fields (ie: combined using AND)
Parameters: entityName - The Name of the Entity as defined in the entity XML file Parameters: fields - The fields of the named entity to query by with their corresponging values Parameters: doCacheClear - boolean that specifies whether to clear cache entries for this value to be removed int representing number of rows effected by this operation |
removeByPrimaryKey | public int removeByPrimaryKey(GenericPK primaryKey) throws GenericEntityException(Code) | | Remove a Generic Entity corresponding to the primaryKey
Parameters: primaryKey - The primary key of the entity to remove. int representing number of rows effected by this operation |
removeByPrimaryKey | public int removeByPrimaryKey(GenericPK primaryKey, boolean doCacheClear) throws GenericEntityException(Code) | | Remove a Generic Entity corresponding to the primaryKey
Parameters: primaryKey - The primary key of the entity to remove. Parameters: doCacheClear - boolean that specifies whether to clear cache entries for this primaryKey to be removed int representing number of rows effected by this operation |
removeRelated | public int removeRelated(String relationName, GenericValue value) throws GenericEntityException(Code) | | Remove the named Related Entity for the GenericValue from the persistent store
Parameters: relationName - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file Parameters: value - GenericValue instance containing the entity int representing number of rows effected by this operation |
removeRelated | public int removeRelated(String relationName, GenericValue value, boolean doCacheClear) throws GenericEntityException(Code) | | Remove the named Related Entity for the GenericValue from the persistent store
Parameters: relationName - String containing the relation name which is thecombination of relation.title and relation.rel-entity-name asspecified in the entity XML definition file Parameters: value - GenericValue instance containing the entity Parameters: doCacheClear - boolean that specifies whether to clear cache entries for this value to be removed int representing number of rows effected by this operation |
removeValue | public int removeValue(GenericValue value) throws GenericEntityException(Code) | | Remove a Generic Value from the database
Parameters: value - The GenericValue object of the entity to remove. int representing number of rows effected by this operation |
removeValue | public int removeValue(GenericValue value, boolean doCacheClear) throws GenericEntityException(Code) | | Remove a Generic Value from the database
Parameters: value - The GenericValue object of the entity to remove. Parameters: doCacheClear - boolean that specifies whether to clear cache entries for this value to be removed int representing number of rows effected by this operation |
setSequencer | public void setSequencer(SequenceUtil sequencer)(Code) | | Allows you to pass a SequenceUtil class (possibly one that overrides the getNextSeqId method);
if null is passed will effectively refresh the sequencer.
|
store | public int store(GenericValue value) throws GenericEntityException(Code) | | Store the Entity from the GenericValue to the persistent store
Parameters: value - GenericValue instance containing the entity int representing number of rows effected by this operation |
store | public int store(GenericValue value, boolean doCacheClear) throws GenericEntityException(Code) | | Store the Entity from the GenericValue to the persistent store
Parameters: value - GenericValue instance containing the entity Parameters: doCacheClear - boolean that specifies whether or not to automatically clear cache entries related to this operation int representing number of rows effected by this operation |
storeAll | public int storeAll(List values) throws GenericEntityException(Code) | | Store the Entities from the List GenericValue instances to the persistent store.
This is different than the normal store method in that the store method only does
an update, while the storeAll method checks to see if each entity exists, then
either does an insert or an update as appropriate.
These updates all happen in one transaction, so they will either all succeed or all fail,
if the data source supports transactions. This is just like to othersToStore feature
of the GenericEntity on a create or store.
Parameters: values - List of GenericValue instances containing the entities to store int representing number of rows effected by this operation |
storeAll | public int storeAll(List values, boolean doCacheClear) throws GenericEntityException(Code) | | Store the Entities from the List GenericValue instances to the persistent store.
This is different than the normal store method in that the store method only does
an update, while the storeAll method checks to see if each entity exists, then
either does an insert or an update as appropriate.
These updates all happen in one transaction, so they will either all succeed or all fail,
if the data source supports transactions. This is just like to othersToStore feature
of the GenericEntity on a create or store.
Parameters: values - List of GenericValue instances containing the entities to store Parameters: doCacheClear - boolean that specifies whether or not to automatically clear cache entries related to this operation int representing number of rows effected by this operation |
|
|