Java Doc for PersistentObject.java in  » Web-Framework » jWebApp » jpersist » 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 » Web Framework » jWebApp » jpersist 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   jpersist.PersistentObject

All known Subclasses:   jpersist.Entity,
PersistentObject
public class PersistentObject (Code)
This class is extended by classes that wish to be persistent.


Field Summary
final static  intMISSING_ROW_ID
    
final static  intNO_TABLE_INFO
    
final static  intOBJECT_CAN_PERSIST
    


Method Summary
protected  voidaddIgnoreAssociation(Class objectClass)
     Adds the class to the set of ignored associations.
protected  booleancanPersist()
     Returns true if the object can be persistent.
 booleanclassInIgnoreAssociation(Class objectClass)
    
protected  intdelete(Database database)
     Deletes the object from a matching database table using the jpersist.Database instance.
protected  intdelete(DatabaseManager databaseManager)
     Deletes the object from a matching database table using the jpersist.DatabaseManager instance.
protected  intdelete(TransactionManager transactionManager)
     Deletes the object from a matching database table using the jpersist.TransactionManager instance.
protected  booleangetIgnoreAssociations()
     Returns true is associations are being ignored and not loaded or saved, false otherwise.
 longgetObjectChecksum()
    
protected  ObjectgetObjectKeyValue(Object key)
     Returns the key value that was originally loaded with the object.
 MapgetObjectKeyValues()
    
protected  intgetObjectPersistence()
     Returns whether an object can be persistent, and the reason why or why not.
protected  booleangetReloadAfterSave()
     Returns true if the object is to be reloaded following a save.
protected  booleanisPersistent()
    
protected  voidmakeObjectTransient()
     Make object transient/new.
protected  booleanobjectHasChanged()
     Returns true if the object has changed in some way and needs to be saved.
protected  voidremoveIgnoreAssociation(Class objectClass)
     Removes the class from the set of ignored associations.
public  intsave(Database database)
     Saves the object to a matching database table using the jpersist.Database instance.
public  intsave(DatabaseManager databaseManager)
     Saves the object to a matching database table using the jpersist.DatabaseManager instance.
public  intsave(TransactionManager transactionManager)
     Saves the object to a matching database table using the jpersist.TransactionManager instance.
protected  voidsetIgnoreAssociations(boolean ignoreAssociations)
     Set whether loads/saves ignore associations.
 voidsetObjectChecksum(long objectChecksum)
    
protected  voidsetObjectHasChanged(boolean objectHasChanged)
     Set the state of the object to has changed which will cause it to be saved.
 voidsetObjectPersistence(int reason)
    
protected  voidsetReloadAfterSave(boolean reloadAfterSave)
     Set whether objects are reloaded after saves.

Field Detail
MISSING_ROW_ID
final static int MISSING_ROW_ID(Code)



NO_TABLE_INFO
final static int NO_TABLE_INFO(Code)



OBJECT_CAN_PERSIST
final static int OBJECT_CAN_PERSIST(Code)





Method Detail
addIgnoreAssociation
protected void addIgnoreAssociation(Class objectClass)(Code)
Adds the class to the set of ignored associations.
Parameters:
  objectClass - the class to ignore



canPersist
protected boolean canPersist()(Code)
Returns true if the object can be persistent. If an object doesn't have table information or row id information, it can not be persistent. true if the object can be persistent.



classInIgnoreAssociation
boolean classInIgnoreAssociation(Class objectClass)(Code)



delete
protected int delete(Database database) throws JPersistException(Code)
Deletes the object from a matching database table using the jpersist.Database instance.
Parameters:
  database - a database instance
throws:
  JPersistException -



delete
protected int delete(DatabaseManager databaseManager) throws JPersistException(Code)
Deletes the object from a matching database table using the jpersist.DatabaseManager instance.
Parameters:
  databaseManager - a database manager instance
throws:
  JPersistException -



delete
protected int delete(TransactionManager transactionManager) throws JPersistException(Code)
Deletes the object from a matching database table using the jpersist.TransactionManager instance.
Parameters:
  transactionManager - a jpersist.TransactionManager instance
throws:
  JPersistException -



getIgnoreAssociations
protected boolean getIgnoreAssociations()(Code)
Returns true is associations are being ignored and not loaded or saved, false otherwise. true is associations are being ignored and not loaded or saved, false otherwise.



getObjectChecksum
long getObjectChecksum()(Code)



getObjectKeyValue
protected Object getObjectKeyValue(Object key)(Code)
Returns the key value that was originally loaded with the object. Even if the field in the object changes the original key's value remains for updates and deletes.
Parameters:
  key - a key field defined in the object the key value that was originally loaded with the object



getObjectKeyValues
Map getObjectKeyValues()(Code)



getObjectPersistence
protected int getObjectPersistence()(Code)
Returns whether an object can be persistent, and the reason why or why not. Objects are checked during loading to see if they can be made persistent. If they can OBJECT_CAN_PERSIST will be returned. If the object can't persist, then the reason why, usually MISSING_ROW_ID, will be returned. whether an object can be persistent, and the reason why or why not



getReloadAfterSave
protected boolean getReloadAfterSave()(Code)
Returns true if the object is to be reloaded following a save. true if the object is to be reloaded following a save.



isPersistent
protected boolean isPersistent()(Code)
Returns true if object is in the persistent state (has been saved/loaded and will be updated) true if object is in the persistent state (has been saved/loaded and will be updated)



makeObjectTransient
protected void makeObjectTransient()(Code)
Make object transient/new. Will insert instead of update.



objectHasChanged
protected boolean objectHasChanged()(Code)
Returns true if the object has changed in some way and needs to be saved. true if the object has changed in some way and needs to be saved.



removeIgnoreAssociation
protected void removeIgnoreAssociation(Class objectClass)(Code)
Removes the class from the set of ignored associations.
Parameters:
  objectClass - the class to remove



save
public int save(Database database) throws JPersistException(Code)
Saves the object to a matching database table using the jpersist.Database instance.
Parameters:
  database - a database instance
throws:
  JPersistException -



save
public int save(DatabaseManager databaseManager) throws JPersistException(Code)
Saves the object to a matching database table using the jpersist.DatabaseManager instance.
Parameters:
  databaseManager - a database manager instance
throws:
  JPersistException -



save
public int save(TransactionManager transactionManager) throws JPersistException(Code)
Saves the object to a matching database table using the jpersist.TransactionManager instance.
Parameters:
  transactionManager - a jpersist.TransactionManager instance
throws:
  JPersistException -



setIgnoreAssociations
protected void setIgnoreAssociations(boolean ignoreAssociations)(Code)
Set whether loads/saves ignore associations.
Parameters:
  ignoreAssociations - true to ignore saving/loading associations, false otherwise.



setObjectChecksum
void setObjectChecksum(long objectChecksum)(Code)



setObjectHasChanged
protected void setObjectHasChanged(boolean objectHasChanged)(Code)
Set the state of the object to has changed which will cause it to be saved.
Parameters:
  objectHasChanged - true if the object has changed and needs to be saved



setObjectPersistence
void setObjectPersistence(int reason)(Code)



setReloadAfterSave
protected void setReloadAfterSave(boolean reloadAfterSave)(Code)
Set whether objects are reloaded after saves. If the database changes any of the columns associated with an object, it should be reloaded.
Parameters:
  reloadAfterSave - true if the object is to be reloaded following a save



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.