Java Doc for GenericHelper.java in  » ERP-CRM-Financial » SourceTap-CRM » org » ofbiz » entity » datasource » 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 » SourceTap CRM » org.ofbiz.entity.datasource 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.ofbiz.entity.datasource.GenericHelper

All known Subclasses:   org.ofbiz.entity.datasource.MemoryHelper,  org.ofbiz.entity.datasource.GenericHelperDAO,
GenericHelper
public interface GenericHelper (Code)
Generic Entity Helper Class
author:
   David E. Jones
author:
   Chris Maurer
version:
   $ revision: $
since:
   1.0




Method Summary
public  voidcheckDataSource(Map modelEntities, List messages, boolean addMissing)
    
public  GenericValuecreate(GenericValue value)
    
public  ListfindAllByPrimaryKeys(List primaryKeys)
     Find a number of Generic Value objects by their Primary Keys, all at once
Parameters:
  primaryKeys - A List of primary keys to find by.
public  ListfindByAnd(ModelEntity modelEntity, Map fields, List orderBy)
    
public  ListfindByCondition(ModelEntity modelEntity, EntityCondition entityCondition, Collection fieldsToSelect, List orderBy)
     Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details.
public  ListfindByMultiRelation(GenericValue value, ModelRelation modelRelationOne, ModelEntity modelEntityOne, ModelRelation modelRelationTwo, ModelEntity modelEntityTwo, List orderBy)
    
public  ListfindByOr(ModelEntity modelEntity, Map fields, List orderBy)
    
public  GenericValuefindByPrimaryKey(GenericPK primaryKey)
     Find a Generic Entity by its Primary Key
Parameters:
  primaryKey - The primary key to find by.
public  GenericValuefindByPrimaryKeyPartial(GenericPK primaryKey, Set keys)
    
public  longfindCountByCondition(ModelEntity modelEntity, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition)
    
public  EntityListIteratorfindListIteratorByCondition(ModelEntity modelEntity, 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:
  modelEntity - The ModelEntity 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  StringgetHelperName()
    
public  intremoveAll(List dummyPKs)
     Remove the Entities from the List from the persistent store.
public  intremoveByAnd(ModelEntity modelEntity, Map fields)
    
public  intremoveByPrimaryKey(GenericPK primaryKey)
     Remove a Generic Entity corresponding to the primaryKey
Parameters:
  primaryKey - The primary key of the entity to remove.
public  intstore(GenericValue value)
    
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.



Method Detail
checkDataSource
public void checkDataSource(Map modelEntities, List messages, boolean addMissing) throws GenericEntityException(Code)
Check the datasource to make sure the entity definitions are correct, optionally adding missing entities or fields on the server
Parameters:
  modelEntities - Map of entityName names and ModelEntity values
Parameters:
  messages - List to put any result messages in
Parameters:
  addMissing - Flag indicating whether or not to add missing entities and fields on the server



create
public GenericValue create(GenericValue value) throws GenericEntityException(Code)
Creates a Entity in the form of a GenericValue and write it to the database GenericValue instance containing the new instance



findAllByPrimaryKeys
public List findAllByPrimaryKeys(List primaryKeys) throws GenericEntityException(Code)
Find a number of Generic Value objects by their Primary Keys, all at once
Parameters:
  primaryKeys - A List of primary keys to find by. List of GenericValue objects corresponding to the passed primaryKey objects



findByAnd
public List findByAnd(ModelEntity modelEntity, Map fields, List orderBy) throws GenericEntityException(Code)
Finds Generic Entity records by all of the specified fields (ie: combined using AND)
Parameters:
  modelEntity - The ModelEntity 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(ModelEntity modelEntity, 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:
  modelEntity - The ModelEntity of the Entity as defined in the entity 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



findByMultiRelation
public List findByMultiRelation(GenericValue value, ModelRelation modelRelationOne, ModelEntity modelEntityOne, ModelRelation modelRelationTwo, ModelEntity modelEntityTwo, List orderBy) throws GenericEntityException(Code)



findByOr
public List findByOr(ModelEntity modelEntity, Map fields, List orderBy) throws GenericEntityException(Code)
Finds Generic Entity records by all of the specified fields (ie: combined using OR)
Parameters:
  modelEntity - The ModelEntity 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



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



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



findCountByCondition
public long findCountByCondition(ModelEntity modelEntity, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition) throws GenericEntityException(Code)



findListIteratorByCondition
public EntityListIterator findListIteratorByCondition(ModelEntity modelEntity, 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:
  modelEntity - The ModelEntity 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.



getHelperName
public String getHelperName()(Code)
Gets the name of the server configuration that corresponds to this helper server configuration name



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 - List of GenericEntity instances containing the entities or by and fields to remove int representing number of rows effected by this operation



removeByAnd
public int removeByAnd(ModelEntity modelEntity, Map fields) throws GenericEntityException(Code)
Removes/deletes Generic Entity records found by all of the specified fields (ie: combined using AND)
Parameters:
  modelEntity - The ModelEntity 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



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



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



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



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