Java Doc for ObjectEnvelope.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) 


java.lang.Object
   org.apache.ojb.odmg.ObjectEnvelope

ObjectEnvelope
public class ObjectEnvelope implements ObjectModification,Image.ImageListener(Code)
ObjectEnvelope is used during ODMG transactions as a wrapper for a persistent objects declaration


Field Summary
final static  intIS_MATERIALIZED_OBJECT
    
final static  intIS_MATERIALIZED_PROXY
    
final static  intIS_UNMATERIALIZED_PROXY
    
final static  longserialVersionUID
    

Constructor Summary
public  ObjectEnvelope(ObjectEnvelopeTable buffer, Identity oid, Object obj, boolean isNewObject)
     Create a wrapper by providing an Object.

Method Summary
 voidaddLinkOneToN(CollectionDescriptor col, Object source, boolean unlink)
    
 voidaddLinkOneToOne(ObjectReferenceDescriptor ord, boolean unlink)
    
public  voidaddedOneToOne(ObjectReferenceDescriptor ord, Object refObjOrProxy, Identity oid)
    
public  voidaddedXToN(CollectionDescriptor cod, Object refObjOrProxy, Identity oid)
    
public  voidafterAbort()
    
public  voidafterCommit()
    
public  voidbeforeAbort()
    
public  voidbeforeCommit()
     We need to implement the Two-Phase Commit protocol. beginCommit is where we say if we can or cannot commit the transaction.
public  voidcleanup(boolean reuse, boolean wasInsert)
     This method should be called before transaction ends to allow cleanup of used resources, e.g.
public  voiddeletedOneToOne(ObjectReferenceDescriptor ord, Object refObjOrProxy, Identity oid, boolean needsUnlink)
    
public  voiddeletedXToN(CollectionDescriptor cod, Object refObjOrProxy, Identity oid)
    
public  voiddoDelete()
    
public  voiddoEvictFromCache()
    
public  voiddoInsert()
    
public  voiddoUpdate()
    
public  MapgetBeforeImage()
    
public  PersistenceBrokerInternalgetBroker()
    
 ClassDescriptorgetClassDescriptor()
    
public  MapgetCurrentImage()
    
 ObjectEnvelopeTablegetEnvelopeTable()
    
public  IdentitygetIdentity()
    
public  ModificationStategetModificationState()
     Returns the Modification-state.
public  ObjectgetObject()
     Returns the managed materialized object.
public  ObjectgetRealObject()
    
 TransactionImplgetTx()
    
public  booleanhasChanged(PersistenceBroker broker)
     For internal use only! Only call immediately before commit to guarantee that all changes can be detected (because this method cache the detected "change state" thus on eager call changes could be ignored).
public  booleanisDeleted(Identity id)
     Checks if the object with the given identity has been deleted within the transaction.
public  booleanisWriteLocked()
    
 voidmarkReferenceElements(PersistenceBroker broker)
    
public  booleanneedsDelete()
     Returns true if the underlying Object needs an UPDATE statement, else returns false.
public  booleanneedsInsert()
     Returns true if the underlying Object needs an INSERT statement, else returns false.
public  booleanneedsUpdate()
     Returns true if the underlying Object needs an UPDATE statement, else returns false.
public  IdentityrefreshIdentity()
     Replace the current with a new generated identity object and returns the old one.
public  voidrefreshObjectIfNeeded(Object obj)
    
public  voidsetModificationState(ModificationState newModificationState)
     set the Modification state to a new value.
public  voidsetWriteLocked(boolean writeLocked)
    
public  StringtoString()
     returns a String representation.

Field Detail
IS_MATERIALIZED_OBJECT
final static int IS_MATERIALIZED_OBJECT(Code)



IS_MATERIALIZED_PROXY
final static int IS_MATERIALIZED_PROXY(Code)



IS_UNMATERIALIZED_PROXY
final static int IS_UNMATERIALIZED_PROXY(Code)



serialVersionUID
final static long serialVersionUID(Code)




Constructor Detail
ObjectEnvelope
public ObjectEnvelope(ObjectEnvelopeTable buffer, Identity oid, Object obj, boolean isNewObject)(Code)
Create a wrapper by providing an Object.




Method Detail
addLinkOneToN
void addLinkOneToN(CollectionDescriptor col, Object source, boolean unlink)(Code)



addLinkOneToOne
void addLinkOneToOne(ObjectReferenceDescriptor ord, boolean unlink)(Code)



addedOneToOne
public void addedOneToOne(ObjectReferenceDescriptor ord, Object refObjOrProxy, Identity oid)(Code)



addedXToN
public void addedXToN(CollectionDescriptor cod, Object refObjOrProxy, Identity oid)(Code)



afterAbort
public void afterAbort()(Code)
Method declaration



afterCommit
public void afterCommit()(Code)
Method declaration



beforeAbort
public void beforeAbort()(Code)
Method declaration



beforeCommit
public void beforeCommit()(Code)
We need to implement the Two-Phase Commit protocol. beginCommit is where we say if we can or cannot commit the transaction. At the begining however, we need to attain the after image so we can isolate everything. We should issue the call against the database at this point. If we get a SQL Exception, we should throw the org.odmg.TransactionAbortedException. We should also check to see if the object is TransactionAware. If so, we should give it a chance to kill the transaction before we toss it to the database.



cleanup
public void cleanup(boolean reuse, boolean wasInsert)(Code)
This method should be called before transaction ends to allow cleanup of used resources, e.g. remove proxy listener objects to avoid invoke of registered objects after tx end.



deletedOneToOne
public void deletedOneToOne(ObjectReferenceDescriptor ord, Object refObjOrProxy, Identity oid, boolean needsUnlink)(Code)



deletedXToN
public void deletedXToN(CollectionDescriptor cod, Object refObjOrProxy, Identity oid)(Code)



doDelete
public void doDelete()(Code)



doEvictFromCache
public void doEvictFromCache()(Code)



doInsert
public void doInsert()(Code)



doUpdate
public void doUpdate()(Code)



getBeforeImage
public Map getBeforeImage()(Code)



getBroker
public PersistenceBrokerInternal getBroker()(Code)



getClassDescriptor
ClassDescriptor getClassDescriptor()(Code)



getCurrentImage
public Map getCurrentImage()(Code)



getEnvelopeTable
ObjectEnvelopeTable getEnvelopeTable()(Code)



getIdentity
public Identity getIdentity()(Code)



getModificationState
public ModificationState getModificationState()(Code)
Returns the Modification-state. org.apache.ojb.server.states.ModificationState



getObject
public Object getObject()(Code)
Returns the managed materialized object.



getRealObject
public Object getRealObject()(Code)



getTx
TransactionImpl getTx()(Code)



hasChanged
public boolean hasChanged(PersistenceBroker broker)(Code)
For internal use only! Only call immediately before commit to guarantee that all changes can be detected (because this method cache the detected "change state" thus on eager call changes could be ignored). Checks whether object and internal clone differ and returns true if so, returns false else. boolean The result.



isDeleted
public boolean isDeleted(Identity id)(Code)
Checks if the object with the given identity has been deleted within the transaction.
Parameters:
  id - The identity true if the object has been deleted
throws:
  PersistenceBrokerException -



isWriteLocked
public boolean isWriteLocked()(Code)



markReferenceElements
void markReferenceElements(PersistenceBroker broker)(Code)
Mark new or deleted reference elements
Parameters:
  broker -



needsDelete
public boolean needsDelete()(Code)
Returns true if the underlying Object needs an UPDATE statement, else returns false.



needsInsert
public boolean needsInsert()(Code)
Returns true if the underlying Object needs an INSERT statement, else returns false.



needsUpdate
public boolean needsUpdate()(Code)
Returns true if the underlying Object needs an UPDATE statement, else returns false.



refreshIdentity
public Identity refreshIdentity()(Code)
Replace the current with a new generated identity object and returns the old one.



refreshObjectIfNeeded
public void refreshObjectIfNeeded(Object obj)(Code)



setModificationState
public void setModificationState(ModificationState newModificationState)(Code)
set the Modification state to a new value. Used during state transitions.
Parameters:
  newModificationState - org.apache.ojb.server.states.ModificationState



setWriteLocked
public void setWriteLocked(boolean writeLocked)(Code)



toString
public String toString()(Code)
returns a String representation. java.lang.String



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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