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


java.lang.Object
   com.completex.objective.components.persistency.AbstractPersistentObject
      com.completex.objective.components.persistency.PersistentObject

All known Subclasses:   com.odal.petstore.persistence.gen.pos.BannerDataPO,  com.completex.objective.persistency.examples.ex003a.pos.TaxiCarPO,  com.completex.objective.persistency.examples.ex004.pos.CustomerPO,  com.odal.petstore.persistence.gen.pos.CategoryPO,  com.completex.objective.persistency.examples.ex003a.pos.CustomerOrderPO,  com.completex.objective.persistency.examples.ex004a.pos.CustomerPO,  com.odal.petstore.persistence.gen.pos.ItemPO,  com.completex.objective.persistency.examples.ex004.pos.ContactPO,  com.odal.petstore.persistence.gen.pos.InventoryPO,  com.completex.objective.persistency.examples.ex002.ExplPerson,  com.completex.objective.persistency.examples.ex003.pos.CustomerPO,  com.completex.objective.persistency.examples.ex003a.pos.OrderItemPO,  com.odal.petstore.persistence.gen.pos.AccountPO,  com.completex.objective.persistency.examples.ex004a.pos.ContactPO,  com.completex.objective.persistency.examples.ex003.pos.CustomerContactRelPO,  com.completex.objective.persistency.examples.ex003.pos.TaxiCarPO,  com.completex.objective.components.persistency.AdHocPersistentObject,  com.completex.objective.persistency.examples.ex005.pos.OrderItemPO,  com.odal.petstore.persistence.gen.pos.ProductPO,  com.odal.petstore.persistence.gen.pos.SupplierPO,  com.odal.petstore.persistence.gen.pos.ProfilePO,  com.completex.objective.persistency.examples.ex003a.pos.CustomerContactRelPO,  com.completex.objective.persistency.examples.ex003.pos.CustomerOrderPO,  com.completex.objective.persistency.examples.ex003a.pos.CustomerPO,  com.completex.objective.persistency.examples.ex003a.pos.ProductPO,  com.completex.objective.persistency.examples.ex003.pos.OrderItemPO,  com.odal.petstore.persistence.gen.pos.SignonPO,  com.odal.petstore.persistence.gen.pos.OrderPO,  com.completex.objective.persistency.examples.ex003.pos.PoliceCarPO,  com.odal.petstore.persistence.gen.pos.OrderStatusPO,  com.completex.objective.persistency.examples.ex005.pos.CustomerOrderPO,  com.odal.petstore.persistence.gen.pos.LineItemPO,  com.completex.objective.persistency.examples.ex003.pos.ProductPO,  com.completex.objective.persistency.examples.ex003a.pos.PoliceCarPO,  com.completex.objective.persistency.examples.ex003a.pos.ContactPO,  com.completex.objective.persistency.examples.ex003.pos.ContactPO,
PersistentObject
public class PersistentObject extends AbstractPersistentObject implements Compound(Code)
Ancestor of all generated persistent objects. Its descendants can be used as return type as well as in "queries by example". If no "singular result factory" is specified for Query or Call, the retrieved records will be placed into raw PersistentObject instances. In this case field values can be accessed through its Record by calling:

 persistentObject.record().getXXX();
 
methods.
author:
   Gennady Krizhevsky
See Also:   Record


Field Summary
final public static  StringBufferNULL_BUFFER
    

Constructor Summary
public  PersistentObject()
    
public  PersistentObject(Record record)
    

Method Summary
public  LinkaddAdHocChild(String name, Object data)
     Add child link with specific name as ad-hoc link. Ad-hoc links are not part of the Link Dependency Graph and hence the objcts they contain cannot be inserted/updated/deleted.
public  voidaddChild(Link link)
    
protected  voidaddToAssembly(String path, Link parent, LinkDependencyGraph linkDependencyGraph, QueryFactory queryFactory)
    
public  voidassemble()
    
public  voidautoPadChars(boolean autoPadChars)
     Sets autoPadChars flag.
public  BooleanbooleanValue(int index)
    
public  BooleanbooleanValue(String columnName)
    
public  Linkchild(String name)
    
protected  booleanclassInitialized(QueryFactory queryFactory)
     Return true if class is initialized.
protected  ObjectclassLock()
    
public  Objectclone()
    
public  booleancomplex()
    
protected  voidcompound(boolean compound)
     Sets this object as compound.
public  voidcopy(PersistentObject source, Set updateableFields, boolean dirtyFieldsOnly)
     Copies updateable fields from source persistent object to this persistent object.
public  voidcopy(PersistentObject source, Set updateableFields, boolean dirtyFieldsOnly, boolean preserveStates)
     Copies updateable fields from source persistent object to this persistent object.
public  voidcopy(PersistentObject source)
     Copies all fields from source record to this record.
public  voidcopyBasic(PersistentObject source, Set updateableFields, boolean dirtyFieldsOnly)
     Copies updateable fields from source basic persistent object to this basic persistent object.
public  voidcopyBasic(PersistentObject source)
     Copies all fields from source basic persistent object to this basic persistent object.
public static  voidcopyBasic(PersistentObject source, PersistentObject target, Set updateableFields, boolean dirtyFieldsOnly, boolean preserveStates)
     Copies updateable fields from source basic persistent object to this basic persistent object.
public  voidcopyBasicDirty(PersistentObject source, Set updateableFields)
     Copies updateable fields from source basic persistent object to this basic persistent object.
public  voidcopyDirty(PersistentObject source)
     Copies updateable fields from source record to this record.
public  voidcopyDirty(PersistentObject source, Set updateableFields)
     Copies updateable fields from source record to this record.
public  voidcopyPreserveStates(PersistentObject source)
     Copies all fields from source persistent object to this persistent object.
public  DatedateValue(int index)
    
public  DatedateValue(String columnName)
    
protected  voiddoFlatten()
    
protected  voiddoPreFlatten()
    
protected  voiddoUnflatten()
    
protected  PersistentObjectFactoryfactory()
    
protected static  PersistentObjectflatten(PersistentObject persistentObject)
    
protected static  voidflatten(Collection slaves)
    
protected  voidflatten0()
    
public  booleanflattened()
    
public  voidfromBeanFields()
    
public  voidfromBeanFields(PersistentObject sourcePersistentObject)
    
protected  voidfromBeanFields(PersistentObject persistentObject, State state)
    
protected  voidfromBeanFieldsDataSaved(PersistentObject persistentObject)
    
public  ObjectgetChildObject(String name)
    
protected  ObjectgetChildObject(String name, Object value)
    
public  ObjectgetChildObjectStraight(String name)
    
protected  ObjectgetChildObjectStraight(String name, Object value)
    
public  ObjectgetFirstChildObject(String name)
     Gets child link result object.
protected  ObjectgetFirstChildObject(String name, Object value)
     If this object is flattened returns value passed as parameter.
Otherwise:
If this object is not flattened gets child link result object.
public  ObjectgetFirstChildObjectStraight(String name)
     Gets child link result object w/o causing lazy retrieval to fire.
protected  ObjectgetFirstChildObjectStraight(String name, Object value)
     If this object is flattened returns value passed as parameter.
Otherwise:
If this object is not flattened gets child link result object w/o causing lazy retrieval to fire.
protected  voidhandleAddCollection(Collection collection)
     This method will be called in descendants on lazy collection instanciation.
public  booleanhasChildren()
    
public  PersistentObjectinitializeComplex(QueryFactory queryFactory)
     Initializes complex PersistentObject.
public  booleaninitializedComplex()
    
public  Link[]inlineLinks()
    
protected  voidinstantiateRegisteredMasters()
     Instantiates Registered Masters (Map) in thread safe manner.
protected  voidinvalidateOnFlattened()
    
public  LinkIteratorlinkIterator()
    
protected  Link[]links(QueryFactory queryFactory)
    
public  voidmarkAllFieldsDirty()
    
public  voidmarkFieldDirty(int index)
    
public  voidmarkInitializedComplex()
    
protected  PersistentObjectmaster()
    
protected  PersistentObjectmaster(QueryFactory queryFactory)
    
public  AbstractPersistentObjectnewPersistentInstance()
    
public  PersistentObjectnewPersistentObject()
    
protected static  voidnewPersistentObjectPreSetup(PersistentObject to, PersistentObject from)
     Performs pre-setup of "to" object based on properties of "from" object.
protected static  voidnewPersistentObjectSetup(PersistentObject to, PersistentObject from)
     Performs setup of "to" object based on properties of "from" object.
public  ObjectobjectValue(int index)
    
public  ObjectobjectValue(String columnName)
    
protected  voidpostInitializeRecord()
     Performs Record post initialization activities.
protected  PersistentObjectpreinitializeComplex()
     Preinitializes complex PersistentObject.
public  voidreadExternal(ObjectInput in)
    
public  voidreadExternalDescendant(ObjectInput in)
    
public  Recordrecord()
    
protected  voidrecord(Record record)
    
public  Recordrecord2()
    
protected  voidregisterDependent(QueryFactory queryFactory, PersistentObject master)
     Adds child links to the master object.
protected  voidregisterMaster(String registrationKey)
     Registers this object as a master.
protected  MapregisteredMasters()
     Return registeredMasters Map.
protected  StringregistrationKey(QueryFactory queryFactory)
    
static  StringregistrationKey(Class clazz, QueryFactory queryFactory)
    
protected  voidreregisterMaster(String oldRegistrationKey, String newRegistrationKey)
     Re-registers master object under different registration key.
public  Link[]retrieveLinks(QueryFactory queryFactory)
    
protected  voidselfReference()
    
public  booleanselfReferencing()
     Returns true.
public  voidsetChildObject(String name, Object value)
    
protected  ObjectsetChildObjectSafe(String name, Object newValue)
     Sets child object value if this PersistentObject is not flattened.
public  StringstringValue(int index)
    
public  StringstringValue(String columnName)
    
public  voidtoBeanFields()
    
public  voidtoBeanFields(PersistentObject sourcePersistentObject)
    
public static  StringtoGenericString(PersistentObject persistentObject)
    
public  ObjecttoKey()
     Return objects key.
public  LinktoLink()
    
public  ParameterstoNotNullParameters(boolean primaryKeyOnly)
     Returns Parameters object based on values and column types of the record.
public  ParameterstoNotNullParameters()
     Returns Parameters object based on values and column types of the record.
public  ParameterstoParameters(int[] indeces)
     Returns Parameters object based on values and column types of the record for columns with indeces specified with "indeces" parameter.
public  ParameterstoParameters(boolean primaryKeyOnly)
     Returns Parameters object based on values and column types of the record.
public  ParameterstoParameters()
     Returns Parameters object based on values and column types of the record.
public  StringtoString()
    
public  PersistentObjecttraceOff()
     Indicates that all newly created child Tracing Collections have to be forced to "trace off" mode.
public  PersistentObjecttraceOffAll()
     Immediately forces all child Tracing Collections have to be forced to "trace off" mode.
public  PersistentObjecttraceOn()
     Indicates that all newly created child Tracing Collections have to be forced to "trace on" mode.
public  PersistentObjecttraceOnAll()
     Immediately forces all child Tracing Collections have to be forced to "trace on" mode.
public static  CollectiontraceOnAll(Collection collection)
     Immediately forces all Tracing Collections passed as paramater have to "trace on" mode, meaning that all object tree collections will trace al the changes to them after.
public  Booleantraced()
     Returns Boolean.TRUE if all newly created child Tracing Collections have to be forced to "trace on" mode, Boolean.FALSE if all newly created child Tracing Collections have to be forced to "trace off" mode, null if all newly created child Tracing Collections have to be left in default trace mode.
protected static  PersistentObjectunflatten(Link parentLink, String childName, PersistentObject childPersistent)
     Unflattens link.
protected static  voidunflatten(Link parentLink, String childName, Collection slaves)
     Unflattens link.
protected  voidunflatten0()
    
public  voidunmarkAllFieldsDirty()
    
public  voidunmarkFieldDirty(int index)
    
public  voidunmarkInitializedComplex()
     Unmarks this object as "InitializedComplex".
public  Stringv2c(int index, String value)
     Right pads character fields to column length with spaces.
public  voidwriteExternal(ObjectOutput out)
    
public  voidwriteExternalDescendant(ObjectOutput out)
    

Field Detail
NULL_BUFFER
final public static StringBuffer NULL_BUFFER(Code)




Constructor Detail
PersistentObject
public PersistentObject()(Code)



PersistentObject
public PersistentObject(Record record)(Code)




Method Detail
addAdHocChild
public Link addAdHocChild(String name, Object data)(Code)
Add child link with specific name as ad-hoc link. Ad-hoc links are not part of the Link Dependency Graph and hence the objcts they contain cannot be inserted/updated/deleted. It is dynamically added read only data.
Parameters:
  name -
Parameters:
  data - newly added link



addChild
public void addChild(Link link)(Code)
Add child link with specific name
Parameters:
  link -
throws:
  NullPointerException - if link has no name set
See Also:   Link



addToAssembly
protected void addToAssembly(String path, Link parent, LinkDependencyGraph linkDependencyGraph, QueryFactory queryFactory)(Code)
To traverse the graph follow the pattern:
 record.toLink
 |-> result
 |-> record.toLink / collection -> record.toLink
 |-> children <-| (meta-data)
 

Parameters:
  path - link path
Parameters:
  parent - parent link
Parameters:
  linkDependencyGraph - LinkDependencyGraph
Parameters:
  queryFactory - QueryFactory



assemble
public void assemble()(Code)
Assembles LinkDependencyGraph associated with this PersistentObject



autoPadChars
public void autoPadChars(boolean autoPadChars)(Code)
Sets autoPadChars flag. If set to true, character fields will be right padded with spaces to column length
Parameters:
  autoPadChars - if true char fields will be right padded with spaces to column length



booleanValue
public Boolean booleanValue(int index)(Code)
Returns field value as Boolean
Parameters:
  index - field value as Boolean



booleanValue
public Boolean booleanValue(String columnName)(Code)
Returns field value as Boolean
Parameters:
  columnName - field value as Boolean



child
public Link child(String name)(Code)
Returns child link by name child link by name



classInitialized
protected boolean classInitialized(QueryFactory queryFactory)(Code)
Return true if class is initialized.
Parameters:
  queryFactory - QueryFactory true if class is initialized



classLock
protected Object classLock()(Code)
Returns class lock for objects of this class class lock



clone
public Object clone()(Code)
Returns deep copy of this object deep copy of this object



complex
public boolean complex()(Code)
Returns true if this is complex object true if this is complex object



compound
protected void compound(boolean compound)(Code)
Sets this object as compound.
Parameters:
  compound -



copy
public void copy(PersistentObject source, Set updateableFields, boolean dirtyFieldsOnly)(Code)
Copies updateable fields from source persistent object to this persistent object. If the persistent objects are compound then all the entries will be copied. If updateableFields Set is null then all dirty fields will be copied. If dirtyFieldsOnly flag is true then only dirty fields are copied
Parameters:
  source - source PersistentObject
Parameters:
  updateableFields - set of updateable column names
Parameters:
  dirtyFieldsOnly - if true only dirty fields are copied



copy
public void copy(PersistentObject source, Set updateableFields, boolean dirtyFieldsOnly, boolean preserveStates)(Code)
Copies updateable fields from source persistent object to this persistent object. If the persistent objects are compound then all the entries will be copied. If updateableFields Set is null then all dirty fields will be copied. If dirtyFieldsOnly flag is true then only dirty fields are copied
Parameters:
  source - source PersistentObject
Parameters:
  updateableFields - set of updateable column names
Parameters:
  dirtyFieldsOnly - if true only dirty fields are copied
Parameters:
  preserveStates - if true target record "dirty" states are set the same as the source record fields "dirty" stateseven if the values are the same



copy
public void copy(PersistentObject source)(Code)
Copies all fields from source record to this record.
Parameters:
  source - source PersistentObjectfrom source record to this record even if the values are the same



copyBasic
public void copyBasic(PersistentObject source, Set updateableFields, boolean dirtyFieldsOnly)(Code)
Copies updateable fields from source basic persistent object to this basic persistent object. If updateableFields Set is null then all dirty fields will be copied. If dirtyFieldsOnly flag is true then only dirty fields are copied
Parameters:
  source - source PersistentObject
Parameters:
  updateableFields - set of updateable column names
Parameters:
  dirtyFieldsOnly - if true only dirty fields are copied



copyBasic
public void copyBasic(PersistentObject source)(Code)
Copies all fields from source basic persistent object to this basic persistent object.
Parameters:
  source - source PersistentObjectfrom source record to this record even if the values are the same



copyBasic
public static void copyBasic(PersistentObject source, PersistentObject target, Set updateableFields, boolean dirtyFieldsOnly, boolean preserveStates)(Code)
Copies updateable fields from source basic persistent object to this basic persistent object. If updateableFields Set is null then all dirty fields will be copied. If dirtyFieldsOnly flag is true then only dirty fields are copied
Parameters:
  source - source PersistentObject
Parameters:
  target - target PersistentObject
Parameters:
  updateableFields - set of updateable column names
Parameters:
  dirtyFieldsOnly - if true only dirty fields are copied
Parameters:
  preserveStates - if true target record "dirty" states are set the same as the source record fields "dirty" stateseven if the values are the same



copyBasicDirty
public void copyBasicDirty(PersistentObject source, Set updateableFields)(Code)
Copies updateable fields from source basic persistent object to this basic persistent object. Only "dirty" fields are copied
Parameters:
  source - source PersistentObject
Parameters:
  updateableFields - set of updateable column names



copyDirty
public void copyDirty(PersistentObject source)(Code)
Copies updateable fields from source record to this record. Only "dirty" fields are copied
Parameters:
  source - source PersistentObject



copyDirty
public void copyDirty(PersistentObject source, Set updateableFields)(Code)
Copies updateable fields from source record to this record. Only "dirty" fields are copied
Parameters:
  source - source PersistentObject
Parameters:
  updateableFields - set of updateable column names



copyPreserveStates
public void copyPreserveStates(PersistentObject source)(Code)
Copies all fields from source persistent object to this persistent object. Target record "dirty" states are set the same as the source record fields "dirty" states even if the values are the same
Parameters:
  source - source PersistentObjectfrom source record to this record even if the values are the same



dateValue
public Date dateValue(int index)(Code)
Returns field value as Date
Parameters:
  index - field value as Date



dateValue
public Date dateValue(String columnName)(Code)
Returns field value as Date
Parameters:
  columnName - field value as Date



doFlatten
protected void doFlatten()(Code)
Override it in descendants to perform children "flattening"



doPreFlatten
protected void doPreFlatten()(Code)
Override it in descendants to perform children "pre-flattening"



doUnflatten
protected void doUnflatten()(Code)
Override it in descendants to perform children "unflattening"



factory
protected PersistentObjectFactory factory()(Code)
Returns PersistentObjectFactory of this object PersistentObjectFactory of this object



flatten
protected static PersistentObject flatten(PersistentObject persistentObject)(Code)
Flattens PersistentObject passed as parameter
Parameters:
  persistentObject - PersistentObject to be flattened PersistentObject passed as parameter



flatten
protected static void flatten(Collection slaves)(Code)
Flattens collection of persistent objects
Parameters:
  slaves - Collection to be flattened



flatten0
protected void flatten0()(Code)



flattened
public boolean flattened()(Code)
Return true if object is flattened (its record == null) true if object is flattened



fromBeanFields
public void fromBeanFields()(Code)



fromBeanFields
public void fromBeanFields(PersistentObject sourcePersistentObject)(Code)
Populates Record fields of this PersistentObject from POJO fields of sourcePersistentObject passed as parameter
Parameters:
  sourcePersistentObject -



fromBeanFields
protected void fromBeanFields(PersistentObject persistentObject, State state)(Code)
Sets State to PersistentObject passed as parameter
Parameters:
  persistentObject - PersistentObject which state is to be set
Parameters:
  state - State to set



fromBeanFieldsDataSaved
protected void fromBeanFieldsDataSaved(PersistentObject persistentObject)(Code)
Sets State.DATA_SAVED to PersistentObject passed as parameter
Parameters:
  persistentObject - PersistentObject which state is to be set



getChildObject
public Object getChildObject(String name)(Code)
Get child link result object
Parameters:
  name - child link result object
throws:
  OdalRuntimePersistencyException - if child retrieval from database failed



getChildObject
protected Object getChildObject(String name, Object value)(Code)
If object is flattened then returns value specified by 'value' parameter else retrieves value by getChildObject(name) method
Parameters:
  name - child name
Parameters:
  value - default value if object flattened If object is flattened - value specified by 'value' parameter elseretrieves value by getChildObject(name) method



getChildObjectStraight
public Object getChildObjectStraight(String name)(Code)
Get child link result w/o causing lazy retrieval to fire
Parameters:
  name - Object



getChildObjectStraight
protected Object getChildObjectStraight(String name, Object value)(Code)
If object is flattened then returns value specified by 'value' parameter else retrieves value by getChildObject(name) method w/o causing lazy retrieval to fire
Parameters:
  name - child name
Parameters:
  value - default value if object flattened Object If object is flattened then - value specified by 'value' parameter elseretrieves value by getChildObject(name) method w/ocausing lazy retrieval to fire



getFirstChildObject
public Object getFirstChildObject(String name)(Code)
Gets child link result object. If result object is instance of Collection and collection size is greater than zero the 1st collection element is returned. If result object is instance of Collection and collection size is zero then null is returned.
Parameters:
  name - child link result object. If result object is instance of Collection andcollection size is greater than zero the 1st collection element is returned.If result object is instance of Collection and collection size is zero then nullis returned.
throws:
  OdalRuntimePersistencyException - if child retrieval from database failed



getFirstChildObject
protected Object getFirstChildObject(String name, Object value)(Code)
If this object is flattened returns value passed as parameter.
Otherwise:
If this object is not flattened gets child link result object. If result object is instance of Collection and collection size is greater than zero the 1st collection element is returned. If result object is instance of Collection and collection size is zero then null is returned.
Parameters:
  name - If this object is flattened - value passed as parameter.
Otherwise:
If child link result object. If result object is instance of Collection andcollection size is greater than zero the 1st collection element is returned.If result object is instance of Collection and collection size is zero then nullis returned.



getFirstChildObjectStraight
public Object getFirstChildObjectStraight(String name)(Code)
Gets child link result object w/o causing lazy retrieval to fire. If result object is instance of Collection and collection size is greater than zero the 1st collection element is returned. If result object is instance of Collection and collection size is zero then null is returned.
Parameters:
  name - child link result object. If result object is instance of Collection andcollection size is greater than zero the 1st collection element is returned.If result object is instance of Collection and collection size is zero then nullis returned.



getFirstChildObjectStraight
protected Object getFirstChildObjectStraight(String name, Object value)(Code)
If this object is flattened returns value passed as parameter.
Otherwise:
If this object is not flattened gets child link result object w/o causing lazy retrieval to fire. If result object is instance of Collection and collection size is greater than zero the 1st collection element is returned. If result object is instance of Collection and collection size is zero then null is returned.
Parameters:
  name - If this object is flattened - value passed as parameter.
Otherwise:
If child link result object. If result object is instance of Collection andcollection size is greater than zero the 1st collection element is returned.If result object is instance of Collection and collection size is zero then nullis returned.



handleAddCollection
protected void handleAddCollection(Collection collection)(Code)
This method will be called in descendants on lazy collection instanciation. It will set proper tracing mode if needed
Parameters:
  collection -



hasChildren
public boolean hasChildren()(Code)
Returns true if this record has child links true if this record has child links



initializeComplex
public PersistentObject initializeComplex(QueryFactory queryFactory)(Code)
Initializes complex PersistentObject. Uses the master object as a template to assemble new instance. Does nothing if the object is not complex.
Parameters:
  queryFactory - itself



initializedComplex
public boolean initializedComplex()(Code)
Returns true if this object passed "initialization for complex" stage true if this object passed "initialization for complex" stage



inlineLinks
public Link[] inlineLinks()(Code)
Experimental



instantiateRegisteredMasters
protected void instantiateRegisteredMasters()(Code)
Instantiates Registered Masters (Map) in thread safe manner. Has to be overridden by descendants.
throws:
  UnsupportedOperationException - if it is not overridden by descendant



invalidateOnFlattened
protected void invalidateOnFlattened()(Code)

throws:
  OdalRuntimePersistencyException - if this object is flattened



linkIterator
public LinkIterator linkIterator()(Code)
Returns record LinkIterator LinkIterator



links
protected Link[] links(QueryFactory queryFactory)(Code)
Returns links that define children of this PersistentObject
Parameters:
  queryFactory - Link[] - links that define children of this PersistentObject



markAllFieldsDirty
public void markAllFieldsDirty()(Code)
Marks all fields as dirty



markFieldDirty
public void markFieldDirty(int index)(Code)
Marks field as dirty
Parameters:
  index -



markInitializedComplex
public void markInitializedComplex()(Code)
Marks this object as "InitializedComplex"



master
protected PersistentObject master()(Code)
Returns master (template) object assuming it was already set for this instance which is done in preinitializeComplex() method master object



master
protected PersistentObject master(QueryFactory queryFactory)(Code)
Retrieves master object from the registry using QueryFactory to build registration key
Parameters:
  queryFactory - QueryFactory master PersistentObject



newPersistentInstance
public AbstractPersistentObject newPersistentInstance()(Code)
new instance of this object preserving tracing mode
See Also:   PersistentObject.traceOn
See Also:   PersistentObject.traceOff



newPersistentObject
public PersistentObject newPersistentObject()(Code)
Factory mathod new PersistentObject



newPersistentObjectPreSetup
protected static void newPersistentObjectPreSetup(PersistentObject to, PersistentObject from)(Code)
Performs pre-setup of "to" object based on properties of "from" object. Namely, all results are copied from "from" to "to" excluding those of child objects. Newly created "to" record is linked to "to" PersistentObject.
Parameters:
  to - target PersistentObject
Parameters:
  from - PersistentObject used as a template



newPersistentObjectSetup
protected static void newPersistentObjectSetup(PersistentObject to, PersistentObject from)(Code)
Performs setup of "to" object based on properties of "from" object. Namely, links structure, served as meta-data, is copied from "from" PersistentObject to "to" one.
Parameters:
  to - target PersistentObject
Parameters:
  from - PersistentObject used as a template



objectValue
public Object objectValue(int index)(Code)
Returns field value as Object
Parameters:
  index - field value as Object



objectValue
public Object objectValue(String columnName)(Code)
Returns field value as Object
Parameters:
  columnName - field value as Object



postInitializeRecord
protected void postInitializeRecord()(Code)
Performs Record post initialization activities.



preinitializeComplex
protected PersistentObject preinitializeComplex()(Code)
Preinitializes complex PersistentObject. Creates master PersistentObject of this class and assembles it populating its LinkDependencyGraph. The master is used down the road as a template object to assemble new instances of this class. Creating and assembling of the master is done once for every specific Persistency instance it is used with. Does nothing if the object is not complex. itself



readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)
Implementation of Externalizable interface
Parameters:
  in - ObjectInput
throws:
  IOException -
throws:
  ClassNotFoundException -
See Also:   java.io.Externalizable



readExternalDescendant
public void readExternalDescendant(ObjectInput in) throws IOException, ClassNotFoundException(Code)
Auxilliary deserialization
Parameters:
  in - ObjectInput
throws:
  IOException -
throws:
  ClassNotFoundException -



record
public Record record()(Code)
Returns Record associated with this PersistentObject Record associated with this PersistentObject



record
protected void record(Record record)(Code)
Sets Record associated with this PersistentObject



record2
public Record record2()(Code)
Returns Record associated with this PersistentObject Record associated with this PersistentObject
throws:
  OdalRuntimePersistencyException - if this object is flattened



registerDependent
protected void registerDependent(QueryFactory queryFactory, PersistentObject master)(Code)
Adds child links to the master object.
Parameters:
  queryFactory -
Parameters:
  master -



registerMaster
protected void registerMaster(String registrationKey)(Code)
Registers this object as a master.
Parameters:
  registrationKey -



registeredMasters
protected Map registeredMasters()(Code)
Return registeredMasters Map. Has to be overriden in descendants. registeredMasters Map
throws:
  UnsupportedOperationException - if it is not overridden by descendant



registrationKey
protected String registrationKey(QueryFactory queryFactory)(Code)
Builds master object registration key based on class name and QueryFactory
Parameters:
  queryFactory - master object registration key



registrationKey
static String registrationKey(Class clazz, QueryFactory queryFactory)(Code)
Builds master object registration key based on class name and QueryFactory
Parameters:
  clazz - Class
Parameters:
  queryFactory - QueryFactory master object registration key



reregisterMaster
protected void reregisterMaster(String oldRegistrationKey, String newRegistrationKey)(Code)
Re-registers master object under different registration key. Re-registration is done once per 1st usage of object of this class with specific Persistency.
Parameters:
  oldRegistrationKey -
Parameters:
  newRegistrationKey -



retrieveLinks
public Link[] retrieveLinks(QueryFactory queryFactory)(Code)
Returns links that define children of this PersistentObject
Parameters:
  queryFactory - Link[] - links that define children of this PersistentObject



selfReference
protected void selfReference()(Code)
Makes this object the 1st object in PersistentObject[] of compound PersistentObject



selfReferencing
public boolean selfReferencing()(Code)
Returns true. true
See Also:   AbstractPersistentObject.selfReferencing



setChildObject
public void setChildObject(String name, Object value)(Code)
Sets result value to link with specific name name
Parameters:
  name - name of child link
Parameters:
  value -
See Also:   Link.setResult(Object)
See Also:   Link.getName



setChildObjectSafe
protected Object setChildObjectSafe(String name, Object newValue)(Code)
Sets child object value if this PersistentObject is not flattened. Always returns newValue passed as parameter
Parameters:
  name -
Parameters:
  newValue - Object newValue parameter



stringValue
public String stringValue(int index)(Code)
Returns field value as String
Parameters:
  index - field value as String



stringValue
public String stringValue(String columnName)(Code)
Returns field value as String
Parameters:
  columnName - field value as String



toBeanFields
public void toBeanFields()(Code)
Populates POJO fields



toBeanFields
public void toBeanFields(PersistentObject sourcePersistentObject)(Code)
Populates POJO fields of this PersistentObject from Record fields of sourcePersistentObject passed as parameter
Parameters:
  sourcePersistentObject -



toGenericString
public static String toGenericString(PersistentObject persistentObject)(Code)
Returns "deep" string reperesentation of this object
Parameters:
  persistentObject - "deep" string reperesentation of this object



toKey
public Object toKey()(Code)
Return objects key. Its value will be used to identify object in TracingCollection updates. objects key
See Also:   AbstractPersistentObject.toKey



toLink
public Link toLink()(Code)
Returns Link reperesentation of this PersistentObject Link reperesentation of this Record



toNotNullParameters
public Parameters toNotNullParameters(boolean primaryKeyOnly)(Code)
Returns Parameters object based on values and column types of the record. This method will populate parameters only if corresponding fields are "dirty" and not nulls
Parameters:
  primaryKeyOnly - if true only primary key columns are considered Parameters object based on values and column types of the record



toNotNullParameters
public Parameters toNotNullParameters()(Code)
Returns Parameters object based on values and column types of the record. This method will populate parameters only if corresponding fields are "dirty" and not nulls Parameters object based on values and column types of the record



toParameters
public Parameters toParameters(int[] indeces)(Code)
Returns Parameters object based on values and column types of the record for columns with indeces specified with "indeces" parameter. This method will populate parameters regardless of whether they are "dirty" flags or nulls
Parameters:
  indeces - Parameters object based on values and column types of the record for columns with indecesspecified with "indeces" parameter



toParameters
public Parameters toParameters(boolean primaryKeyOnly)(Code)
Returns Parameters object based on values and column types of the record. This method will populate parameters only if corresponding fields are "dirty"
Parameters:
  primaryKeyOnly - if true only primary key columns are considered Parameters object based on values and column types of the record



toParameters
public Parameters toParameters()(Code)
Returns Parameters object based on values and column types of the record. This method will populate parameters only if corresponding fields are "dirty" Parameters object based on values and column types of the record



toString
public String toString()(Code)



traceOff
public PersistentObject traceOff()(Code)
Indicates that all newly created child Tracing Collections have to be forced to "trace off" mode. It makes sense to do it when your child objects are from the database and you do not want them to be saved again. itself



traceOffAll
public PersistentObject traceOffAll()(Code)
Immediately forces all child Tracing Collections have to be forced to "trace off" mode. itself



traceOn
public PersistentObject traceOn()(Code)
Indicates that all newly created child Tracing Collections have to be forced to "trace on" mode. itself



traceOnAll
public PersistentObject traceOnAll()(Code)
Immediately forces all child Tracing Collections have to be forced to "trace on" mode. itself



traceOnAll
public static Collection traceOnAll(Collection collection)(Code)
Immediately forces all Tracing Collections passed as paramater have to "trace on" mode, meaning that all object tree collections will trace al the changes to them after.
Parameters:
  collection - Collection itself



traced
public Boolean traced()(Code)
Returns Boolean.TRUE if all newly created child Tracing Collections have to be forced to "trace on" mode, Boolean.FALSE if all newly created child Tracing Collections have to be forced to "trace off" mode, null if all newly created child Tracing Collections have to be left in default trace mode. Boolean.TRUE if all newly created child Tracing Collections have to be forced to "trace on" mode,Boolean.FALSE if all newly created child Tracing Collections have to be forced to "trace off" mode,null if all newly created child Tracing Collections have to be left in default trace mode.



unflatten
protected static PersistentObject unflatten(Link parentLink, String childName, PersistentObject childPersistent)(Code)
Unflattens link.
Parameters:
  parentLink - Link object to be unflattened
Parameters:
  childName - name of child object to be unflattened and set
Parameters:
  childPersistent - PersistentObject to be unflatten and set to this PersistentObjectunder name specified by childName parameter



unflatten
protected static void unflatten(Link parentLink, String childName, Collection slaves)(Code)
Unflattens link.
Parameters:
  parentLink - Link object to be unflattened
Parameters:
  childName - name of child object to be unflattened and set
Parameters:
  slaves - Collection to be unflatten and set to this PersistentObjectunder name specified by childName parameter



unflatten0
protected void unflatten0()(Code)



unmarkAllFieldsDirty
public void unmarkAllFieldsDirty()(Code)
Resets dirty flags



unmarkFieldDirty
public void unmarkFieldDirty(int index)(Code)
Resets dirty flag
Parameters:
  index -



unmarkInitializedComplex
public void unmarkInitializedComplex()(Code)
Unmarks this object as "InitializedComplex". Also resets LinkDependencyGraph.



v2c
public String v2c(int index, String value)(Code)
Right pads character fields to column length with spaces.
Parameters:
  index -
Parameters:
  value - Object



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)
Implementation of Externalizable interface
Parameters:
  out - ObjectOutput
throws:
  IOException -
See Also:   java.io.Externalizable



writeExternalDescendant
public void writeExternalDescendant(ObjectOutput out) throws IOException(Code)
Auxilliary serialization
Parameters:
  out - ObjectOutput
throws:
  IOException -



Fields inherited from com.completex.objective.components.persistency.AbstractPersistentObject
final public static String KEY_SEP(Code)(Java Doc)
protected transient DelegatePersistentObjectFactory delegateFactory(Code)(Java Doc)
protected transient PersistentObject[] persistentObjects(Code)(Java Doc)
final static long serialVersionUID(Code)(Java Doc)

Methods inherited from com.completex.objective.components.persistency.AbstractPersistentObject
public static boolean Boolean2boolean(Boolean value)(Code)(Java Doc)
public static double Number2double(Number number)(Code)(Java Doc)
public static long Number2long(Number number)(Code)(Java Doc)
protected Join addJoin()(Code)(Java Doc)
abstract public void assemble()(Code)(Java Doc)
public static Boolean boolean2Boolean(boolean value)(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
public boolean compound()(Code)(Java Doc)
protected void compound(int size)(Code)(Java Doc)
protected void compoundAttrSetup()(Code)(Java Doc)
public void compoundCascadeAll(int index)(Code)(Java Doc)
public boolean compoundCascadeDelete(int index)(Code)(Java Doc)
public void compoundCascadeDelete(int index, boolean compoundCascadeDelete)(Code)(Java Doc)
public boolean compoundCascadeDelete()(Code)(Java Doc)
protected void compoundCascadeDelete(boolean compoundCascadeDelete)(Code)(Java Doc)
public boolean compoundCascadeInsert(int index)(Code)(Java Doc)
public void compoundCascadeInsert(int index, boolean compoundCascadeInsert)(Code)(Java Doc)
public boolean compoundCascadeInsert()(Code)(Java Doc)
protected void compoundCascadeInsert(boolean compoundCascadeInsert)(Code)(Java Doc)
public PersistentObject[] compoundEntries()(Code)(Java Doc)
public void compoundEntry(int index, PersistentObject persistentObject)(Code)(Java Doc)
public PersistentObject compoundEntry(int index)(Code)(Java Doc)
public int compoundSize()(Code)(Java Doc)
public void compoundUncascadeAll(int index)(Code)(Java Doc)
public DelegatePersistentObjectFactory delegateFactory()(Code)(Java Doc)
public boolean dirty()(Code)(Java Doc)
protected void doSetupCompound()(Code)(Java Doc)
public static Double double2Number(double value)(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public boolean equalsBasic(Object value)(Code)(Java Doc)
public boolean equalsCompound(Object value)(Code)(Java Doc)
final public AbstractPersistentObject flatten()(Code)(Java Doc)
abstract protected void flatten0()(Code)(Java Doc)
public boolean fromCache()(Code)(Java Doc)
public int hashCodeBasic()(Code)(Java Doc)
public Compound.ImplicitJoinMode implicitJoinMode()(Code)(Java Doc)
public void implicitJoinMode(Compound.ImplicitJoinMode implicitJoinMode)(Code)(Java Doc)
public static boolean isEmptyEntry(PersistentObject entry)(Code)(Java Doc)
public Join join()(Code)(Java Doc)
public Join join(Compound.ImplicitJoinMode implicitJoinMode)(Code)(Java Doc)
public Join joinImplicitely(Compound.ImplicitJoinMode implicitJoinMode)(Code)(Java Doc)
public Join joinImplicitely(Join.Type[] joinTypes)(Code)(Java Doc)
public Join joinMinusOne()(Code)(Java Doc)
public static Long long2Number(long value)(Code)(Java Doc)
public static void main(String[] args)(Code)(Java Doc)
public String mappingType()(Code)(Java Doc)
public void mappingType(String mappingType)(Code)(Java Doc)
public void markFromCache(boolean fromCache)(Code)(Java Doc)
abstract public AbstractPersistentObject newPersistentInstance()(Code)(Java Doc)
protected int nextCompoundIndex()(Code)(Java Doc)
public void populateCompoundEntries()(Code)(Java Doc)
public void populateCompoundEntries(int slaveIdx)(Code)(Java Doc)
public void populateCompoundEntryByJoin(int indexFrom, int indexTo)(Code)(Java Doc)
public void registerDelegateFactory(DelegatePersistentObjectFactory delegateFactory)(Code)(Java Doc)
abstract protected void selfReference()(Code)(Java Doc)
abstract public boolean selfReferencing()(Code)(Java Doc)
final protected void setupCompound()(Code)(Java Doc)
public Object toKey()(Code)(Java Doc)
abstract public Link toLink()(Code)(Java Doc)
abstract public Parameters toParameters(int[] indeces)(Code)(Java Doc)
final public AbstractPersistentObject unflatten()(Code)(Java Doc)
abstract protected void unflatten0()(Code)(Java Doc)
public void unmarkInitializedComplex()(Code)(Java Doc)
public void unuseStarAndColumnNames()(Code)(Java Doc)
public void useStarAndColumnNames()(Code)(Java Doc)
public boolean usingColumnNames()(Code)(Java Doc)
public boolean usingSelectStar()(Code)(Java Doc)

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.