Source Code Cross Referenced for LightPersistency.java in  » Database-ORM » ODAL » com » completex » objective » components » persistency » 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 » Database ORM » ODAL » com.completex.objective.components.persistency 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.completex.objective.components.persistency;
002:
003:        import com.completex.objective.components.persistency.type.TracingCollection;
004:
005:        import java.util.Collection;
006:
007:        /**
008:         * @author Gennady Krizhevsky
009:         */
010:        public interface LightPersistency extends Persistency0,
011:                InsertPersistency, SelectPersistency {
012:
013:            /**
014:             * Update persistent object. Key values are the ones of primary key and "optimistic lock" fields.
015:             *
016:             * @param persistentObject object to update
017:             * @return number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects
018:             * @throws OdalPersistencyException
019:             *
020:             */
021:            int update(PersistentObject persistentObject)
022:                    throws OdalPersistencyException;
023:
024:            /**
025:             * Update persistent object. Key values are the ones of primary key and "optimistic lock" fields.
026:             *
027:             * @param persistentObject object to update
028:             * @return number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects
029:             * @throws OdalPersistencyException
030:             *
031:             */
032:            int update(PersistentObject persistentObject, String extraWhere,
033:                    Parameters extraParameters) throws OdalPersistencyException;
034:
035:            /**
036:             * Update persistent object. Key values are the ones of primary key and "optimistic lock" fields.
037:             *
038:             * @param persistentObject object to update
039:             * @param controller
040:             * @return number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects
041:             * @throws OdalPersistencyException
042:             *
043:             */
044:            int update(PersistentObject persistentObject,
045:                    LifeCycleController controller)
046:                    throws OdalPersistencyException;
047:
048:            /**
049:             * Update persistent object. Key values are the ones of primary key and "optimistic lock" fields.
050:             *
051:             * @param persistentObject object to update
052:             * @param extraWhere       sql fragment
053:             * @param extraParameters  optional parameters for extraWhere sql fragment
054:             * @param controller       LifeCycleController
055:             * @return number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects
056:             * @throws OdalPersistencyException
057:             *
058:             */
059:            int update(PersistentObject persistentObject, String extraWhere,
060:                    Object[] extraParameters, LifeCycleController controller)
061:                    throws OdalPersistencyException;
062:
063:            /**
064:             * Update persistent object. Key values are the ones of primary key and "optimistic lock" fields.
065:             *
066:             * @param persistentObject object to update
067:             * @param extraWhere       sql fragment
068:             * @param extraParameters  optional parameters for extraWhere sql fragment
069:             * @param controller       LifeCycleController
070:             * @return number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects
071:             * @throws OdalPersistencyException
072:             *
073:             */
074:            int update(PersistentObject persistentObject, String extraWhere,
075:                    Parameters extraParameters, LifeCycleController controller)
076:                    throws OdalPersistencyException;
077:
078:            /**
079:             * Execute ad-hoc data modifying sql.
080:             *
081:             * @param sql        SQL statement to execute
082:             * @param parameters parameters
083:             * @return number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects
084:             * @throws OdalPersistencyException
085:             *
086:             */
087:            int executeUpdate(String sql, Parameters parameters)
088:                    throws OdalPersistencyException;
089:
090:            /**
091:             * Execute ad-hoc data modifying sql.
092:             *
093:             * @param sql SQL statement to execute
094:             * @return number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects
095:             * @throws OdalPersistencyException
096:             *
097:             */
098:            int executeUpdate(String sql) throws OdalPersistencyException;
099:
100:            /**
101:             * Execute ad-hoc data modifying sql.
102:             *
103:             * @param sql    SQL statement to execute
104:             * @param values values to use as SQL parameters. The parameter types will be extrapolated
105:             * @return number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects
106:             * @throws OdalPersistencyException
107:             *
108:             */
109:            int executeUpdate(String sql, Object[] values)
110:                    throws OdalPersistencyException;
111:
112:            /**
113:             * Execute truncate table sql.
114:             *
115:             * @param tableName
116:             * @return number of row affected.
117:             * @throws OdalPersistencyException
118:             *
119:             */
120:            int truncate(String tableName) throws OdalPersistencyException;
121:
122:            /**
123:             * Delete persistent object by primary key
124:             *
125:             * @param persistentObject
126:             * @return number of row affected. Should not be used for batch updates or complex/compound objects
127:             * @throws OdalPersistencyException
128:             *
129:             */
130:            int delete(PersistentObject persistentObject)
131:                    throws OdalPersistencyException;
132:
133:            /**
134:             * Delete persistent object by primary key
135:             *
136:             * @param persistentObject
137:             * @param controller
138:             * @return number of row affected. Should not be used for batch updates or complex/compound objects
139:             * @throws OdalPersistencyException
140:             *
141:             */
142:            int delete(PersistentObject persistentObject,
143:                    LifeCycleController controller)
144:                    throws OdalPersistencyException;
145:
146:            /**
147:             * Deletes persistent object "by example" PersistentObject.  The fields and their values that are set on the object are then joined by "and" into sql where clause.
148:             *
149:             * @param persistentObject
150:             * @return number of row affected. Should not be used for batch updates or complex/compound objects
151:             * @throws OdalPersistencyException
152:             *
153:             */
154:            int deleteByExample(PersistentObject persistentObject)
155:                    throws OdalPersistencyException;
156:
157:            /**
158:             * Deletes persistent object "by example" PersistentObject.  The fields and their values that are set on the object are then joined by "and" into sql where clause.
159:             *
160:             * @param persistentObject
161:             * @param controller       LifeCycleController
162:             * @return number of row affected. Should not be used for batch updates or complex/compound objects
163:             * @throws OdalPersistencyException
164:             *
165:             */
166:            int deleteByExample(PersistentObject persistentObject,
167:                    LifeCycleController controller)
168:                    throws OdalPersistencyException;
169:
170:            /**
171:             * Deletes persistent object "by example" PersistentObject.  The fields and their values that are set on the object are then joined by "and" into sql where clause.
172:             *
173:             * @param persistentObject
174:             * @param limit            max number of rows to delete (limit must be supported by the database)
175:             * @return number of row affected. Should not be used for batch updates or complex/compound objects
176:             * @throws OdalPersistencyException
177:             *
178:             */
179:            int deleteByExample(PersistentObject persistentObject, int limit)
180:                    throws OdalPersistencyException;
181:
182:            /**
183:             * Deletes persistent object "by example" PersistentObject.  The fields and their values that are set on the object are then joined by "and" into sql where clause.
184:             *
185:             * @param persistentObject
186:             * @param controller       LifeCycleController
187:             * @param limit            max number of rows to delete (limit must be supported by the database)
188:             * @return number of row affected. Should not be used for batch updates or complex/compound objects
189:             * @throws OdalPersistencyException
190:             *
191:             */
192:            int deleteByExample(PersistentObject persistentObject,
193:                    LifeCycleController controller, int limit)
194:                    throws OdalPersistencyException;
195:
196:            /**
197:             * Insert collection of persistent objects
198:             *
199:             * @param persistentObjects
200:             * @return array of return codes - one per collection entry
201:             * @throws OdalPersistencyException
202:             *
203:             */
204:            int[] insert(Collection persistentObjects)
205:                    throws OdalPersistencyException;
206:
207:            /**
208:             * Delete collection of persistent objects
209:             *
210:             * @param persistentObjects
211:             * @return array of return codes - one per collection entry
212:             * @throws OdalPersistencyException
213:             *
214:             */
215:            int[] delete(Collection persistentObjects)
216:                    throws OdalPersistencyException;
217:
218:            /**
219:             * Update collection of persistent objects
220:             *
221:             * @param persistentObjects
222:             * @return array of return codes - one per collection entry
223:             * @throws OdalPersistencyException
224:             *
225:             */
226:            int[] update(Collection persistentObjects)
227:                    throws OdalPersistencyException;
228:
229:            /**
230:             * Update collection of persistent objects
231:             *
232:             * @param collection
233:             * @param lifeCycleController
234:             * @return array of return codes - one per collection entry
235:             * @throws OdalPersistencyException
236:             *
237:             */
238:            int[] update(Collection collection,
239:                    LifeCycleController lifeCycleController)
240:                    throws OdalPersistencyException;
241:
242:            /**
243:             * Update collection of persistent objects.
244:             * TracingCollection collection will be matched with the source one and "trced".
245:             * That is objects that are in collection but not in source will be deleted,
246:             * that are not in collection but are in source will be inserted, objects that are in
247:             * both but "dirty" will be updated
248:             *
249:             * @param collection
250:             * @param source
251:             * @param lifeCycleController
252:             * @return array of return codes - one per collection entry
253:             * @throws OdalPersistencyException
254:             *
255:             */
256:            int[] update(TracingCollection collection, Collection source,
257:                    LifeCycleController lifeCycleController)
258:                    throws OdalPersistencyException;
259:
260:            /**
261:             * Update collection of persistent objects.
262:             * TracingCollection collection will be matched with the source one and "trced".
263:             * That is objects that are in collection but not in source will be deleted,
264:             * that are not in collection but are in source will be inserted, objects that are in
265:             * both but "dirty" will be updated
266:             *
267:             * @param collection
268:             * @param source
269:             * @return array of return codes - one per collection entry
270:             * @throws OdalPersistencyException
271:             *
272:             */
273:            int[] update(TracingCollection collection, Collection source)
274:                    throws OdalPersistencyException;
275:
276:            /**
277:             * Forces insert on object that is already saved in the database. This method is
278:             * designed to work with piping from one database to another
279:             * 
280:             * @param persistentObject
281:             * @param controller
282:             * @return
283:             * @throws OdalPersistencyException
284:             */
285:            int pipeInsert(PersistentObject persistentObject,
286:                    LifeCycleController controller)
287:                    throws OdalPersistencyException;
288:
289:            /**
290:             * Forces insert on object that is already saved in the database. This method is
291:             * designed to work with piping from one database to another
292:             * 
293:             * @param persistentObject
294:             * @return
295:             * @throws OdalPersistencyException
296:             */
297:            int pipeInsert(PersistentObject persistentObject)
298:                    throws OdalPersistencyException;
299:
300:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.