Source Code Cross Referenced for TransactionExt.java in  » Database-ORM » db-ojb » org » apache » ojb » odmg » 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 » db ojb » org.apache.ojb.odmg 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.apache.ojb.odmg;
002:
003:        /* Copyright 2003-2005 The Apache Software Foundation
004:         *
005:         * Licensed under the Apache License, Version 2.0 (the "License");
006:         * you may not use this file except in compliance with the License.
007:         * You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        import org.odmg.Transaction;
019:        import org.apache.ojb.broker.Identity;
020:
021:        /**
022:         * Offers useful none odmg-standard methods of the odmg {@link org.odmg.Transaction} interface.
023:         * <p>
024:         * Note: All listed methods are <strong>not</strong> part of the standard ODMG-api -
025:         * they are special (proprietary) OJB extensions.
026:         * </p>
027:         *
028:         * @version $Id: TransactionExt.java,v 1.4.2.8 2005/12/21 22:29:21 tomdz Exp $
029:         */
030:        public interface TransactionExt extends Transaction, HasBroker {
031:            /**
032:             * Marks an object for deletion without
033:             * locking the object. If the object wasn't locked before,
034:             * OJB will ask for a WRITE lock at commit.
035:             *
036:             * @param  anObject Object to be marked
037:             */
038:            public void markDelete(Object anObject);
039:
040:            /**
041:             * Marks an object as dirty without
042:             * locking the object. If the object wasn't locked before,
043:             * OJB will ask for a WRITE lock at commit.
044:             *
045:             * @param  anObject Object to be marked
046:             */
047:            public void markDirty(Object anObject);
048:
049:            /**
050:             * <p>
051:             * Calling <code>flush</code> flushes persistent object modifications
052:             * made within the ODMG transaction since the last checkpoint to the underlying
053:             * database transaction, but does <b<not</b> commit the database transaction.
054:             * The ODMG transaction retains all locks it held on those objects at the time the flush
055:             * was invoked.
056:             * <p/>
057:             * This method is very similair to {@link org.odmg.Transaction#checkpoint}.
058:             */
059:            public void flush();
060:
061:            /**
062:             * This method can be used to activate or deactivate the implicit
063:             * locking mechanism for the current transaction.
064:             * <br/>
065:             * If set <em>true</em> OJB implicitly locks objects to ODMG transactions
066:             * after performing OQL queries. Also if implicit locking is used
067:             * locking objects is recursive, that is associated objects are also
068:             * locked. If ImplicitLocking is set to 'false', no locks are obtained
069:             * in OQL queries, lookup objects and there is also no recursive locking.
070:             * <p/>
071:             * Turning off implicit locking may improve performance but requires
072:             * additional care to make sure all changed objects are properly
073:             * registered to the transaction.
074:             *
075:             * @param value If set <em>true</em> implicit locking is enabled,
076:             *        if <em>false</em>, implicit locking is disabled.
077:             * @see ImplementationExt#setImplicitLocking(boolean)
078:             **/
079:            public void setImplicitLocking(boolean value);
080:
081:            /**
082:             * Returns <em>true</em> if implicite locking is enabled.
083:             * @see #setImplicitLocking(boolean)
084:             */
085:            public boolean isImplicitLocking();
086:
087:            /**
088:             * Allows to change the <em>cascading delete</em> behavior of the target class's
089:             * reference field while this transaction is in use.
090:             *
091:             * @param target The class to change cascading delete behavior of the references.
092:             * @param referenceField The field name of the 1:1, 1:n or m:n reference.
093:             * @param doCascade If <em>true</em> cascading delete is enabled, <em>false</em> disabled.
094:             */
095:            public void setCascadingDelete(Class target, String referenceField,
096:                    boolean doCascade);
097:
098:            /**
099:             * Allows to change the <em>cascading delete</em> behavior of all references of the
100:             * specified class while this transaction is in use.
101:             *
102:             * @param target The class to change cascading delete behavior of all references.
103:             * @param doCascade If <em>true</em> cascading delete is enabled, <em>false</em> disabled.
104:             */
105:            public void setCascadingDelete(Class target, boolean doCascade);
106:
107:            /**
108:             * Return <em>true</em> if the OJB ordering algorithm is enabled.
109:             * @see #setOrdering(boolean)
110:             */
111:            public boolean isOrdering();
112:
113:            /**
114:             * Allows to enable/disable the OJB persistent object ordering algorithm. If
115:             * <em>true</em> OJB try to order the modified/new/deleted objects in a correct order
116:             * (based on a algorithm) before the objects are written to the persistent storage.
117:             * <br/>
118:             * If the used databases support 'deferred checks' it's recommended to
119:             * use this feature and to disable OJB's object ordering.
120:             * <p/>
121:             * If <em>false</em> the order of the objects rely on the order specified by
122:             * the user and on settings like {@link #setImplicitLocking(boolean)}.
123:             *
124:             * @param ordering Set <em>true</em> to enable object ordering on commit.
125:             * @see ImplementationExt#setOrdering(boolean)
126:             */
127:            public void setOrdering(boolean ordering);
128:
129:            //    /**
130:            //     * Returns whether or not the persistent method calls determine
131:            //     * the persistent object order on commit.
132:            //     *
133:            //     * @see #setNoteUserOrder(boolean)
134:            //     */
135:            //    public boolean isNoteUserOrder();
136:            //
137:            //    /**
138:            //     * If <em>true</em> the order of persisting method calls like
139:            //     * <br/> - {@link org.odmg.Transaction#lock(Object, int)}).
140:            //     * <br/> - {@link org.odmg.Database#deletePersistent(Object)}).
141:            //     * <br/> - {@link org.odmg.Database#makePersistent(Object)})
142:            //     * determine the order of objects before commit.
143:            //     * <br/>
144:            //     * If <em>false</em> the ordering was determined by OJB's internal
145:            //     * method calls and user calls.
146:            //     * <br/>
147:            //     * However it's possible to set this value as a global property
148:            //     * for all transactions using {@link ImplementationExt#setNoteUserOrder(boolean)}.
149:            //     * <p/>
150:            //     * <strong>NOTE:</strong> If OJB's ordering algorithm (see
151:            //     * {@link #setOrdering(boolean)}) is enabled, the
152:            //     * order of objects may change on commit.
153:            //     *
154:            //     * @param noteUserOrder If <em>true</em> the order of persisting
155:            //     * method calls determine the order of objects.
156:            //     * @see ImplementationExt#setNoteUserOrder(boolean)
157:            //     */
158:            //    public void setNoteUserOrder(boolean noteUserOrder);
159:
160:            /**
161:             * Checks if the object with the given {@link org.apache.ojb.broker.Identity}
162:             * has been deleted within the transaction using
163:             * {@link org.odmg.Database#deletePersistent(Object)} or {@link #markDelete(Object)}.
164:             *
165:             * @param id The identity of the object.
166:             * @return <em>true</em> if the object has been deleted within the transaction.
167:             */
168:            public boolean isDeleted(Identity id);
169:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.