Java Doc 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 Reference  Class Diagram Java Document (Java Doc) 


org.apache.ojb.odmg.TransactionExt

All known Subclasses:   org.apache.ojb.odmg.TransactionImpl,  org.apache.ojb.odmg.NarrowTransaction,
TransactionExt
public interface TransactionExt extends Transaction,HasBroker(Code)
Offers useful none odmg-standard methods of the odmg org.odmg.Transaction interface.

Note: All listed methods are not part of the standard ODMG-api - they are special (proprietary) OJB extensions.


version:
   $Id: TransactionExt.java,v 1.4.2.8 2005/12/21 22:29:21 tomdz Exp $




Method Summary
public  voidflush()
    

Calling flush flushes persistent object modifications made within the ODMG transaction since the last checkpoint to the underlying database transaction, but does commit the database transaction.

public  booleanisDeleted(Identity id)
     Checks if the object with the given org.apache.ojb.broker.Identity has been deleted within the transaction using org.odmg.Database.deletePersistent(Object) or TransactionExt.markDelete(Object) .
Parameters:
  id - The identity of the object.
public  booleanisImplicitLocking()
     Returns true if implicite locking is enabled.
public  booleanisOrdering()
     Return true if the OJB ordering algorithm is enabled.
public  voidmarkDelete(Object anObject)
     Marks an object for deletion without locking the object.
public  voidmarkDirty(Object anObject)
     Marks an object as dirty without locking the object.
public  voidsetCascadingDelete(Class target, String referenceField, boolean doCascade)
     Allows to change the cascading delete behavior of the target class's reference field while this transaction is in use.
public  voidsetCascadingDelete(Class target, boolean doCascade)
     Allows to change the cascading delete behavior of all references of the specified class while this transaction is in use.
public  voidsetImplicitLocking(boolean value)
     This method can be used to activate or deactivate the implicit locking mechanism for the current transaction.
If set true OJB implicitly locks objects to ODMG transactions after performing OQL queries.
public  voidsetOrdering(boolean ordering)
     Allows to enable/disable the OJB persistent object ordering algorithm.



Method Detail
flush
public void flush()(Code)

Calling flush flushes persistent object modifications made within the ODMG transaction since the last checkpoint to the underlying database transaction, but does commit the database transaction. The ODMG transaction retains all locks it held on those objects at the time the flush was invoked.

This method is very similair to org.odmg.Transaction.checkpoint .




isDeleted
public boolean isDeleted(Identity id)(Code)
Checks if the object with the given org.apache.ojb.broker.Identity has been deleted within the transaction using org.odmg.Database.deletePersistent(Object) or TransactionExt.markDelete(Object) .
Parameters:
  id - The identity of the object. true if the object has been deleted within the transaction.



isImplicitLocking
public boolean isImplicitLocking()(Code)
Returns true if implicite locking is enabled.
See Also:   TransactionExt.setImplicitLocking(boolean)



isOrdering
public boolean isOrdering()(Code)
Return true if the OJB ordering algorithm is enabled.
See Also:   TransactionExt.setOrdering(boolean)



markDelete
public void markDelete(Object anObject)(Code)
Marks an object for deletion without locking the object. If the object wasn't locked before, OJB will ask for a WRITE lock at commit.
Parameters:
  anObject - Object to be marked



markDirty
public void markDirty(Object anObject)(Code)
Marks an object as dirty without locking the object. If the object wasn't locked before, OJB will ask for a WRITE lock at commit.
Parameters:
  anObject - Object to be marked



setCascadingDelete
public void setCascadingDelete(Class target, String referenceField, boolean doCascade)(Code)
Allows to change the cascading delete behavior of the target class's reference field while this transaction is in use.
Parameters:
  target - The class to change cascading delete behavior of the references.
Parameters:
  referenceField - The field name of the 1:1, 1:n or m:n reference.
Parameters:
  doCascade - If true cascading delete is enabled, false disabled.



setCascadingDelete
public void setCascadingDelete(Class target, boolean doCascade)(Code)
Allows to change the cascading delete behavior of all references of the specified class while this transaction is in use.
Parameters:
  target - The class to change cascading delete behavior of all references.
Parameters:
  doCascade - If true cascading delete is enabled, false disabled.



setImplicitLocking
public void setImplicitLocking(boolean value)(Code)
This method can be used to activate or deactivate the implicit locking mechanism for the current transaction.
If set true OJB implicitly locks objects to ODMG transactions after performing OQL queries. Also if implicit locking is used locking objects is recursive, that is associated objects are also locked. If ImplicitLocking is set to 'false', no locks are obtained in OQL queries, lookup objects and there is also no recursive locking.

Turning off implicit locking may improve performance but requires additional care to make sure all changed objects are properly registered to the transaction.
Parameters:
  value - If set true implicit locking is enabled,if false, implicit locking is disabled.
See Also:   ImplementationExt.setImplicitLocking(boolean)




setOrdering
public void setOrdering(boolean ordering)(Code)
Allows to enable/disable the OJB persistent object ordering algorithm. If true OJB try to order the modified/new/deleted objects in a correct order (based on a algorithm) before the objects are written to the persistent storage.
If the used databases support 'deferred checks' it's recommended to use this feature and to disable OJB's object ordering.

If false the order of the objects rely on the order specified by the user and on settings like TransactionExt.setImplicitLocking(boolean) .
Parameters:
  ordering - Set true to enable object ordering on commit.
See Also:   ImplementationExt.setOrdering(boolean)




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