Java Doc for GenericDelegator.java in  » ERP-CRM-Financial » ofbiz » org » ofbiz » entity » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » ofbiz » org.ofbiz.entity 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.ofbiz.entity.GenericDelegator

GenericDelegator
public class GenericDelegator implements DelegatorInterface(Code)
Generic Data Source Delegator Class


Field Summary
final public static  booleanalwaysUseTransaction
    
protected  MapandCacheFieldSets
    
protected  Cachecache
    
protected  EntityCryptocrypto
    
protected static  MapdelegatorCache
    
protected  DelegatorInfodelegatorInfo
    
protected  StringdelegatorName
    
protected  DistributedCacheCleardistributedCacheClear
    
protected  EntityEcaHandlerentityEcaHandler
    
final public static  booleankeepLocalReaders
    
protected  ModelGroupReadermodelGroupReader
    
protected  ModelReadermodelReader
    
final public static  Stringmodule
    
protected  SequenceUtilsequencer
    

Constructor Summary
protected  GenericDelegator()
    
protected  GenericDelegator(String delegatorName)
    

Method Summary
protected  voidabsorbList(List lst)
    
public  voidclearAllCacheLinesByDummyPK(Collection dummyPKs)
    
public  voidclearAllCacheLinesByValue(Collection values)
    
public  voidclearAllCaches()
     This method is a shortcut to completely clear all entity engine caches.
public  voidclearAllCaches(boolean distribute)
    
public  voidclearCacheLine(String entityName, Map fields)
    
public  voidclearCacheLine(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  voidclearCacheLine(GenericPK primaryKey, boolean distribute)
    
public  voidclearCacheLine(GenericValue value)
     Remove a CACHED GenericValue from as many caches as it can.
public  voidclearCacheLine(GenericValue value, boolean distribute)
    
public  voidclearCacheLineByCondition(String entityName, EntityCondition condition)
    
public  voidclearCacheLineByCondition(String entityName, EntityCondition condition, boolean distribute)
    
public  voidclearCacheLineFlexible(GenericEntity dummyPK)
     Remove a CACHED Generic Entity from the cache by its primary key.
public  voidclearCacheLineFlexible(GenericEntity dummyPK, boolean distribute)
    
protected  voidclearCacheValues(UtilCache cache, String entityName, EntityCondition condition)
    
public  GenericDelegatorcloneDelegator(String delegatorName)
    
public  GenericDelegatorcloneDelegator()
    
public  GenericValuecreate(GenericPK primaryKey)
    
public  GenericValuecreate(GenericPK primaryKey, boolean doCacheClear)
    
public  GenericValuecreate(String entityName, Map fields)
    
public  GenericValuecreate(GenericValue value)
    
public  GenericValuecreate(GenericValue value, boolean doCacheClear)
    
public  GenericValuecreateOrStore(GenericValue value, boolean doCacheClear)
    
public  GenericValuecreateOrStore(GenericValue value)
    
public  voiddecryptFields(List entities)
    
public  voiddecryptFields(GenericEntity entity)
    
public  ObjectencryptFieldValue(String entityName, Object fieldValue)
    
public  voidencryptFields(List entities)
    
public  voidencryptFields(GenericEntity entity)
    
protected  voidevalEcaRules(String event, String currentOperation, GenericEntity value, Map eventMap, boolean noEventMapFound, boolean isError)
    
public  ListfindAll(String entityName)
    
public  ListfindAll(String entityName, List orderBy)
    
public  ListfindAllByPrimaryKeys(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  ListfindAllByPrimaryKeysCache(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  ListfindAllCache(String entityName)
    
public  ListfindAllCache(String entityName, List orderBy)
    
public  ListfindByAnd(String entityName, Map fields)
    
public  ListfindByAnd(String entityName, Map fields, List orderBy)
    
public  ListfindByAnd(String entityName, List expressions)
    
public  ListfindByAnd(String entityName, List expressions, List orderBy)
    
public  ListfindByAndCache(String entityName, Map fields)
    
public  ListfindByAndCache(String entityName, Map fields, List orderBy)
    
public  ListfindByCondition(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  ListfindByCondition(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  ListfindByConditionCache(String entityName, EntityCondition entityCondition, Collection fieldsToSelect, List orderBy)
     Finds GenericValues by the conditions specified in the EntityCondition object, looking first in the cache, see the EntityCondition javadoc for more details.
public  ListfindByLike(String entityName, Map fields)
    
public  ListfindByLike(String entityName, Map fields, List orderBy)
    
public  ListfindByOr(String entityName, Map fields)
    
public  ListfindByOr(String entityName, Map fields, List orderBy)
    
public  ListfindByOr(String entityName, List expressions)
    
public  ListfindByOr(String entityName, List expressions, List orderBy)
    
public  GenericValuefindByPrimaryKey(GenericPK primaryKey)
     Find a Generic Entity by its Primary Key
Parameters:
  primaryKey - The primary key to find by.
public  GenericValuefindByPrimaryKey(String entityName, Map fields)
    
public  GenericValuefindByPrimaryKeyCache(GenericPK primaryKey)
     Find a CACHED Generic Entity by its Primary Key
Parameters:
  primaryKey - The primary key to find by.
public  GenericValuefindByPrimaryKeyCache(String entityName, Map fields)
    
public  GenericValuefindByPrimaryKeyPartial(GenericPK primaryKey, Set keys)
    
public  longfindCountByAnd(String entityName, Map fields)
    
public  longfindCountByCondition(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition)
    
public  longfindCountByCondition(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, EntityFindOptions findOptions)
    
public  EntityListIteratorfindListIteratorByCondition(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  EntityListIteratorfindListIteratorByCondition(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  EntityListIteratorfindListIteratorByCondition(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  CachegetCache()
    
protected  DelegatorInfogetDelegatorInfo()
    
public  StringgetDelegatorName()
    
protected  MapgetEcaEntityEventMap(String entityName)
    
public  EntityEcaHandlergetEntityEcaHandler()
    
public  ModelFieldTypegetEntityFieldType(ModelEntity entity, String type)
    
public  CollectiongetEntityFieldTypeNames(ModelEntity entity)
    
public  StringgetEntityGroupName(String entityName)
    
public  GenericHelpergetEntityHelper(String entityName)
    
public  GenericHelpergetEntityHelper(ModelEntity entity)
    
public  StringgetEntityHelperName(String entityName)
    
public  StringgetEntityHelperName(ModelEntity entity)
    
public  GenericValuegetFromPrimaryKeyCache(GenericPK primaryKey)
    
public static  GenericDelegatorgetGenericDelegator(String delegatorName)
    
public  StringgetGroupHelperName(String groupName)
    
public  ListgetModelEntitiesByGroup(String groupName)
    
public  ModelEntitygetModelEntity(String entityName)
    
public  MapgetModelEntityMapByGroup(String groupName)
    
public  ModelGroupReadergetModelGroupReader()
    
public  ModelReadergetModelReader()
    
public  ListgetMultiRelation(GenericValue value, String relationNameOne, String relationNameTwo, List orderBy)
     Get the named Related Entity for the GenericValue from the persistent store across another Relation.
public  ListgetMultiRelation(GenericValue value, String relationNameOne, String relationNameTwo)
     Get the named Related Entity for the GenericValue from the persistent store across another Relation.
public  StringgetNextSeqId(String seqName)
    
public  StringgetNextSeqId(String seqName, long staggerMax)
    
public  LonggetNextSeqIdLong(String seqName)
    
public  LonggetNextSeqIdLong(String seqName, long staggerMax)
    
public  ListgetRelated(String relationName, GenericValue value)
    
public  ListgetRelated(String relationName, Map byAndFields, List orderBy, GenericValue value)
    
public  ListgetRelatedByAnd(String relationName, Map byAndFields, GenericValue value)
    
public  ListgetRelatedCache(String relationName, GenericValue value)
    
public  GenericPKgetRelatedDummyPK(String relationName, Map byAndFields, GenericValue value)
    
public  GenericValuegetRelatedOne(String relationName, GenericValue value)
    
public  GenericValuegetRelatedOneCache(String relationName, GenericValue value)
    
public  ListgetRelatedOrderBy(String relationName, List orderBy, GenericValue value)
    
public  GenericPKmakePK(String entityName, Map fields)
    
public  GenericPKmakePK(Element element)
    
public  GenericValuemakeValidValue(String entityName, Map fields)
    
public  GenericValuemakeValue(String entityName, Map fields)
    
public  GenericValuemakeValue(Element element)
    
public  ListmakeValues(Document document)
    
public  voidputAllInPrimaryKeyCache(List values)
    
public  voidputInPrimaryKeyCache(GenericPK primaryKey, GenericValue value)
    
public  ListreadXmlDocument(URL url)
    
public  voidrefresh(GenericValue value)
    
public  voidrefresh(GenericValue value, boolean doCacheClear)
    
public  voidrefreshFromCache(GenericValue value)
    
public  voidrefreshSequencer()
     Refreshes the ID sequencer clearing all cached bank values.
public  intremoveAll(List dummyPKs)
     Remove the Entities from the List from the persistent store.
public  intremoveAll(List dummyPKs, boolean doCacheClear)
     Remove the Entities from the List from the persistent store.
public  intremoveByAnd(String entityName, Map fields)
    
public  intremoveByAnd(String entityName, Map fields, boolean doCacheClear)
    
public  intremoveByCondition(String entityName, EntityCondition condition)
    
public  intremoveByCondition(String entityName, EntityCondition condition, boolean doCacheClear)
    
public  intremoveByPrimaryKey(GenericPK primaryKey)
     Remove a Generic Entity corresponding to the primaryKey
Parameters:
  primaryKey - The primary key of the entity to remove.
public  intremoveByPrimaryKey(GenericPK primaryKey, boolean doCacheClear)
    
public  intremoveRelated(String relationName, GenericValue value)
    
public  intremoveRelated(String relationName, GenericValue value, boolean doCacheClear)
    
public  intremoveValue(GenericValue value)
     Remove a Generic Value from the database
Parameters:
  value - The GenericValue object of the entity to remove.
public  intremoveValue(GenericValue value, boolean doCacheClear)
    
protected  voidsaveEntitySyncRemoveInfo(GenericEntity dummyPK)
    
public  voidsetDistributedCacheClear(DistributedCacheClear distributedCacheClear)
    
public  voidsetEntityCrypto(EntityCrypto crypto)
    
public  voidsetEntityEcaHandler(EntityEcaHandler entityEcaHandler)
    
public  voidsetNextSubSeqId(GenericValue value, String seqFieldName, int numericPadding, int incrementBy)
    
public  voidsetSequencer(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  intstore(GenericValue value)
    
public  intstore(GenericValue value, boolean doCacheClear)
    
public  intstoreAll(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  intstoreAll(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.
public  intstoreAll(List values, boolean doCacheClear, boolean createDummyFks)
     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  intstoreByCondition(String entityName, Map fieldsToSet, EntityCondition condition)
    
public  intstoreByCondition(String entityName, Map fieldsToSet, EntityCondition condition, boolean doCacheClear)
    

Field Detail
alwaysUseTransaction
final public static boolean alwaysUseTransaction(Code)
This flag is only here for lower level technical testing, it shouldn't be user configurable (or at least I don't think so yet); when true all operations without a transaction will be wrapped in one; seems to be necessary for some (all?) XA aware connection pools, and should improve overall stability and consistency



andCacheFieldSets
protected Map andCacheFieldSets(Code)



cache
protected Cache cache(Code)



crypto
protected EntityCrypto crypto(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



delegatorInfo
protected DelegatorInfo delegatorInfo(Code)



delegatorName
protected String delegatorName(Code)



distributedCacheClear
protected DistributedCacheClear distributedCacheClear(Code)



entityEcaHandler
protected EntityEcaHandler entityEcaHandler(Code)



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



modelGroupReader
protected ModelGroupReader modelGroupReader(Code)



modelReader
protected ModelReader modelReader(Code)



module
final public static String module(Code)



sequencer
protected SequenceUtil sequencer(Code)




Constructor Detail
GenericDelegator
protected GenericDelegator()(Code)
Only allow creation through the factory method



GenericDelegator
protected GenericDelegator(String delegatorName) throws GenericEntityException(Code)
Only allow creation through the factory method




Method Detail
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.



clearCacheLine
public void clearCacheLine(GenericValue value, boolean distribute)(Code)



clearCacheLineByCondition
public void clearCacheLineByCondition(String entityName, EntityCondition condition)(Code)



clearCacheLineByCondition
public void clearCacheLineByCondition(String entityName, EntityCondition condition, boolean distribute)(Code)



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)



clearCacheValues
protected void clearCacheValues(UtilCache cache, String entityName, EntityCondition condition)(Code)



cloneDelegator
public GenericDelegator cloneDelegator(String delegatorName)(Code)



cloneDelegator
public GenericDelegator cloneDelegator()(Code)



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



create
public GenericValue create(String entityName, Map fields) throws GenericEntityException(Code)
Creates a Entity in the form of a GenericValue and write it to the database GenericValue instance containing the new instance



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



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



decryptFields
public void decryptFields(List entities) throws GenericEntityException(Code)



decryptFields
public void decryptFields(GenericEntity entity) throws GenericEntityException(Code)



encryptFieldValue
public Object encryptFieldValue(String entityName, Object fieldValue) throws EntityCryptoException(Code)



encryptFields
public void encryptFields(List entities) throws GenericEntityException(Code)



encryptFields
public void encryptFields(GenericEntity entity) throws GenericEntityException(Code)



evalEcaRules
protected void evalEcaRules(String event, String currentOperation, GenericEntity value, Map eventMap, boolean noEventMapFound, boolean isError) throws GenericEntityException(Code)



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



findByCondition
public List findByCondition(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. List of GenericValue objects representing the result



findByConditionCache
public List findByConditionCache(String entityName, EntityCondition entityCondition, Collection fieldsToSelect, List orderBy) throws GenericEntityException(Code)
Finds GenericValues by the conditions specified in the EntityCondition object, looking first in the cache, see 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



findByLike
public List findByLike(String entityName, Map fields) throws GenericEntityException(Code)



findByLike
public List findByLike(String entityName, Map fields, List orderBy) throws GenericEntityException(Code)



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



findCountByAnd
public long findCountByAnd(String entityName, Map fields) throws GenericEntityException(Code)



findCountByCondition
public long findCountByCondition(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition) throws GenericEntityException(Code)



findCountByCondition
public long findCountByCondition(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, EntityFindOptions findOptions) throws GenericEntityException(Code)



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.



getCache
public Cache getCache()(Code)



getDelegatorInfo
protected DelegatorInfo getDelegatorInfo()(Code)



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)



getEntityEcaHandler
public EntityEcaHandler getEntityEcaHandler()(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



getFromPrimaryKeyCache
public GenericValue getFromPrimaryKeyCache(GenericPK primaryKey)(Code)



getGenericDelegator
public static GenericDelegator getGenericDelegator(String delegatorName)(Code)



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 String 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 String with the next sequenced id for the given sequence name



getNextSeqId
public String 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



getNextSeqIdLong
public Long getNextSeqIdLong(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 sequenced id for the given sequence name



getNextSeqIdLong
public Long getNextSeqIdLong(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



getRelatedOne
public GenericValue getRelatedOne(String relationName, GenericValue value) throws GenericEntityException(Code)
Get related entity where relation is of type one, uses findByPrimaryKey
throws:
  IllegalArgumentException - if the list found has more than one item



getRelatedOneCache
public GenericValue getRelatedOneCache(String relationName, GenericValue value) throws GenericEntityException(Code)
Get related entity where relation is of type one, uses findByPrimaryKey, checking first in the cache to see if the desired value is there
throws:
  IllegalArgumentException - if the list found has more than one item



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



makePK
public GenericPK makePK(Element element)(Code)



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



makeValue
public GenericValue makeValue(Element element)(Code)



makeValues
public List makeValues(Document document)(Code)



putAllInPrimaryKeyCache
public void putAllInPrimaryKeyCache(List values)(Code)



putInPrimaryKeyCache
public void putInPrimaryKeyCache(GenericPK primaryKey, GenericValue value)(Code)



readXmlDocument
public List readXmlDocument(URL url) throws SAXException, ParserConfigurationException, java.io.IOException(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



refreshFromCache
public void refreshFromCache(GenericValue value) throws GenericEntityException(Code)
Refresh the Entity for the GenericValue from the cache
Parameters:
  value - GenericValue instance containing the entity to refresh



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



removeByCondition
public int removeByCondition(String entityName, EntityCondition condition) throws GenericEntityException(Code)
Removes/deletes Generic Entity records found by the condition
Parameters:
  entityName - The Name of the Entity as defined in the entity XML file
Parameters:
  condition - The condition used to restrict the removing int representing number of rows effected by this operation



removeByCondition
public int removeByCondition(String entityName, EntityCondition condition, boolean doCacheClear) throws GenericEntityException(Code)
Removes/deletes Generic Entity records found by the condition
Parameters:
  entityName - The Name of the Entity as defined in the entity XML file
Parameters:
  condition - The condition used to restrict the removing
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



saveEntitySyncRemoveInfo
protected void saveEntitySyncRemoveInfo(GenericEntity dummyPK) throws GenericEntityException(Code)



setDistributedCacheClear
public void setDistributedCacheClear(DistributedCacheClear distributedCacheClear)(Code)



setEntityCrypto
public void setEntityCrypto(EntityCrypto crypto)(Code)



setEntityEcaHandler
public void setEntityEcaHandler(EntityEcaHandler entityEcaHandler)(Code)



setNextSubSeqId
public void setNextSubSeqId(GenericValue value, String seqFieldName, int numericPadding, int incrementBy)(Code)
Look at existing values for a sub-entity with a sequenced secondary ID, and get the highest plus 1



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



storeAll
public int storeAll(List values, boolean doCacheClear, boolean createDummyFks) 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
Parameters:
  createDummyFks - boolean that specifies whether or not to automatically create "dummy" place holder FKs int representing number of rows effected by this operation



storeByCondition
public int storeByCondition(String entityName, Map fieldsToSet, EntityCondition condition) throws GenericEntityException(Code)
Store a group of values
Parameters:
  entityName - The name of the Entity as defined in the entity XML file
Parameters:
  fieldsToSet - The fields of the named entity to set in the database
Parameters:
  condition - The condition that restricts the list of stored values int representing number of rows effected by this operation
throws:
  GenericEntityException -



storeByCondition
public int storeByCondition(String entityName, Map fieldsToSet, EntityCondition condition, boolean doCacheClear) throws GenericEntityException(Code)
Store a group of values
Parameters:
  entityName - The name of the Entity as defined in the entity XML file
Parameters:
  fieldsToSet - The fields of the named entity to set in the database
Parameters:
  condition - The condition that restricts the list of stored values
Parameters:
  doCacheClear - boolean that specifies whether to clear cache entries for these values int representing number of rows effected by this operation
throws:
  GenericEntityException -



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.