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


001:        /*******************************************************************************
002:         * Licensed to the Apache Software Foundation (ASF) under one
003:         * or more contributor license agreements.  See the NOTICE file
004:         * distributed with this work for additional information
005:         * regarding copyright ownership.  The ASF licenses this file
006:         * to you under the Apache License, Version 2.0 (the
007:         * "License"); you may not use this file except in compliance
008:         * with the License.  You may obtain a copy of the License at
009:         * 
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         * 
012:         * Unless required by applicable law or agreed to in writing,
013:         * software distributed under the License is distributed on an
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         * KIND, either express or implied.  See the License for the
016:         * specific language governing permissions and limitations
017:         * under the License.
018:         *******************************************************************************/package org.ofbiz.entity.datasource;
019:
020:        import java.util.Collection;
021:        import java.util.List;
022:        import java.util.Map;
023:        import java.util.Set;
024:
025:        import org.ofbiz.entity.GenericEntityException;
026:        import org.ofbiz.entity.GenericPK;
027:        import org.ofbiz.entity.GenericValue;
028:        import org.ofbiz.entity.condition.EntityCondition;
029:        import org.ofbiz.entity.model.ModelEntity;
030:        import org.ofbiz.entity.model.ModelRelation;
031:        import org.ofbiz.entity.util.EntityFindOptions;
032:        import org.ofbiz.entity.util.EntityListIterator;
033:
034:        /**
035:         * Generic Entity Helper Class
036:         *
037:         */
038:        public interface GenericHelper {
039:
040:            /** Gets the name of the server configuration that corresponds to this helper
041:             *@return server configuration name
042:             */
043:            public String getHelperName();
044:
045:            /** Creates a Entity in the form of a GenericValue and write it to the database
046:             *@return GenericValue instance containing the new instance
047:             */
048:            public GenericValue create(GenericValue value)
049:                    throws GenericEntityException;
050:
051:            /** Find a Generic Entity by its Primary Key
052:             *@param primaryKey The primary key to find by.
053:             *@return The GenericValue corresponding to the primaryKey
054:             */
055:            public GenericValue findByPrimaryKey(GenericPK primaryKey)
056:                    throws GenericEntityException;
057:
058:            /** Find a Generic Entity by its Primary Key and only returns the values requested by the passed keys (names)
059:             *@param primaryKey The primary key to find by.
060:             *@param keys The keys, or names, of the values to retrieve; only these values will be retrieved
061:             *@return The GenericValue corresponding to the primaryKey
062:             */
063:            public GenericValue findByPrimaryKeyPartial(GenericPK primaryKey,
064:                    Set keys) throws GenericEntityException;
065:
066:            /** Find a number of Generic Value objects by their Primary Keys, all at once
067:             *@param primaryKeys A List of primary keys to find by.
068:             *@return List of GenericValue objects corresponding to the passed primaryKey objects
069:             */
070:            public List findAllByPrimaryKeys(List primaryKeys)
071:                    throws GenericEntityException;
072:
073:            /** Remove a Generic Entity corresponding to the primaryKey
074:             *@param  primaryKey  The primary key of the entity to remove.
075:             *@return int representing number of rows effected by this operation
076:             */
077:            public int removeByPrimaryKey(GenericPK primaryKey)
078:                    throws GenericEntityException;
079:
080:            public List findByMultiRelation(GenericValue value,
081:                    ModelRelation modelRelationOne, ModelEntity modelEntityOne,
082:                    ModelRelation modelRelationTwo, ModelEntity modelEntityTwo,
083:                    List orderBy) throws GenericEntityException;
084:
085:            /** Finds GenericValues by the conditions specified in the EntityCondition object, the the EntityCondition javadoc for more details.
086:             *@param modelEntity The ModelEntity of the Entity as defined in the entity XML file
087:             *@param 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)
088:             *@param 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)
089:             *@param fieldsToSelect The fields of the named entity to get from the database; if empty or null all fields will be retreived
090:             *@param orderBy The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending
091:             *@param findOptions An instance of EntityFindOptions that specifies advanced query options. See the EntityFindOptions JavaDoc for more details.
092:             *@return EntityListIterator representing the result of the query: NOTE THAT THIS MUST BE CLOSED WHEN YOU ARE
093:             *      DONE WITH IT, AND DON'T LEAVE IT OPEN TOO LONG BEACUSE IT WILL MAINTAIN A DATABASE CONNECTION.
094:             */
095:            public EntityListIterator findListIteratorByCondition(
096:                    ModelEntity modelEntity,
097:                    EntityCondition whereEntityCondition,
098:                    EntityCondition havingEntityCondition,
099:                    Collection fieldsToSelect, List orderBy,
100:                    EntityFindOptions findOptions)
101:                    throws GenericEntityException;
102:
103:            public long findCountByCondition(ModelEntity modelEntity,
104:                    EntityCondition whereEntityCondition,
105:                    EntityCondition havingEntityCondition,
106:                    EntityFindOptions findOptions)
107:                    throws GenericEntityException;
108:
109:            /** Removes/deletes Generic Entity records found by all the specified condition
110:             *@param modelEntity The ModelEntity of the Entity as defined in the entity XML file
111:             *@param condition The condition that restricts the list of removed values
112:             *@return int representing number of rows effected by this operation
113:             */
114:            public int removeByCondition(ModelEntity modelEntity,
115:                    EntityCondition condition) throws GenericEntityException;
116:
117:            /** Stores a group of values in a single query
118:             *@param modelEntity The ModelEntity of the Entity as defined in the entity XML file
119:             *@param fieldsToSet The fields of the named entity to set in the database
120:             *@param condition The condition that restricts the list of updated values
121:             *@return int representing number of rows effected by this operation
122:             *@throws GenericEntityException
123:             */
124:            public int storeByCondition(ModelEntity modelEntity,
125:                    Map fieldsToSet, EntityCondition condition)
126:                    throws GenericEntityException;
127:
128:            /** Store the Entity from the GenericValue to the persistent store
129:             *@param value GenericValue instance containing the entity
130:             *@return int representing number of rows effected by this operation
131:             */
132:            public int store(GenericValue value) throws GenericEntityException;
133:
134:            /** Check the datasource to make sure the entity definitions are correct, optionally adding missing entities or fields on the server
135:             *@param modelEntities Map of entityName names and ModelEntity values
136:             *@param messages List to put any result messages in
137:             *@param addMissing Flag indicating whether or not to add missing entities and fields on the server
138:             */
139:            public void checkDataSource(Map modelEntities, List messages,
140:                    boolean addMissing) throws GenericEntityException;
141:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.