| |
|
| 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 |
Method Summary | |
public Link | addAdHocChild(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 void | addChild(Link link) | protected void | addToAssembly(String path, Link parent, LinkDependencyGraph linkDependencyGraph, QueryFactory queryFactory) | public void | assemble() | public void | autoPadChars(boolean autoPadChars) Sets autoPadChars flag. | public Boolean | booleanValue(int index) | public Boolean | booleanValue(String columnName) | public Link | child(String name) | protected boolean | classInitialized(QueryFactory queryFactory) Return true if class is initialized. | protected Object | classLock() | public Object | clone() | public boolean | complex() | protected void | compound(boolean compound) Sets this object as compound. | public void | copy(PersistentObject source, Set updateableFields, boolean dirtyFieldsOnly) Copies updateable fields from source persistent object to this persistent object. | public void | copy(PersistentObject source, Set updateableFields, boolean dirtyFieldsOnly, boolean preserveStates) Copies updateable fields from source persistent object to this persistent object. | public void | copy(PersistentObject source) Copies all fields from source record to this record. | public void | copyBasic(PersistentObject source, Set updateableFields, boolean dirtyFieldsOnly) Copies updateable fields from source basic persistent object to this basic persistent object. | public void | copyBasic(PersistentObject source) Copies all fields from source basic persistent object to this basic persistent object. | public static void | copyBasic(PersistentObject source, PersistentObject target, Set updateableFields, boolean dirtyFieldsOnly, boolean preserveStates) Copies updateable fields from source basic persistent object to this basic persistent object. | public void | copyBasicDirty(PersistentObject source, Set updateableFields) Copies updateable fields from source basic persistent object to this basic persistent object. | public void | copyDirty(PersistentObject source) Copies updateable fields from source record to this record. | public void | copyDirty(PersistentObject source, Set updateableFields) Copies updateable fields from source record to this record. | public void | copyPreserveStates(PersistentObject source) Copies all fields from source persistent object to this persistent object. | public Date | dateValue(int index) | public Date | dateValue(String columnName) | protected void | doFlatten() | protected void | doPreFlatten() | protected void | doUnflatten() | protected PersistentObjectFactory | factory() | protected static PersistentObject | flatten(PersistentObject persistentObject) | protected static void | flatten(Collection slaves) | protected void | flatten0() | public boolean | flattened() | public void | fromBeanFields() | public void | fromBeanFields(PersistentObject sourcePersistentObject) | protected void | fromBeanFields(PersistentObject persistentObject, State state) | protected void | fromBeanFieldsDataSaved(PersistentObject persistentObject) | public Object | getChildObject(String name) | protected Object | getChildObject(String name, Object value) | public Object | getChildObjectStraight(String name) | protected Object | getChildObjectStraight(String name, Object value) | public Object | getFirstChildObject(String name) Gets child link result object. | protected Object | getFirstChildObject(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 Object | getFirstChildObjectStraight(String name) Gets child link result object w/o
causing lazy retrieval to fire. | protected Object | getFirstChildObjectStraight(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 void | handleAddCollection(Collection collection) This method will be called in descendants on lazy collection instanciation. | public boolean | hasChildren() | public PersistentObject | initializeComplex(QueryFactory queryFactory) Initializes complex PersistentObject. | public boolean | initializedComplex() | public Link[] | inlineLinks() | protected void | instantiateRegisteredMasters() Instantiates Registered Masters (Map) in thread safe manner. | protected void | invalidateOnFlattened() | public LinkIterator | linkIterator() | protected Link[] | links(QueryFactory queryFactory) | public void | markAllFieldsDirty() | public void | markFieldDirty(int index) | public void | markInitializedComplex() | protected PersistentObject | master() | protected PersistentObject | master(QueryFactory queryFactory) | public AbstractPersistentObject | newPersistentInstance() | public PersistentObject | newPersistentObject() | protected static void | newPersistentObjectPreSetup(PersistentObject to, PersistentObject from) Performs pre-setup of "to" object based on properties of "from" object. | protected static void | newPersistentObjectSetup(PersistentObject to, PersistentObject from) Performs setup of "to" object based on properties of "from" object. | public Object | objectValue(int index) | public Object | objectValue(String columnName) | protected void | postInitializeRecord() Performs Record post initialization activities. | protected PersistentObject | preinitializeComplex() Preinitializes complex PersistentObject. | public void | readExternal(ObjectInput in) | public void | readExternalDescendant(ObjectInput in) | public Record | record() | protected void | record(Record record) | public Record | record2() | protected void | registerDependent(QueryFactory queryFactory, PersistentObject master) Adds child links to the master object. | protected void | registerMaster(String registrationKey) Registers this object as a master. | protected Map | registeredMasters() Return registeredMasters Map. | protected String | registrationKey(QueryFactory queryFactory) | static String | registrationKey(Class clazz, QueryFactory queryFactory) | protected void | reregisterMaster(String oldRegistrationKey, String newRegistrationKey) Re-registers master object under different registration key. | public Link[] | retrieveLinks(QueryFactory queryFactory) | protected void | selfReference() | public boolean | selfReferencing() Returns true. | public void | setChildObject(String name, Object value) | protected Object | setChildObjectSafe(String name, Object newValue) Sets child object value if this PersistentObject is not flattened. | public String | stringValue(int index) | public String | stringValue(String columnName) | public void | toBeanFields() | public void | toBeanFields(PersistentObject sourcePersistentObject) | public static String | toGenericString(PersistentObject persistentObject) | public Object | toKey() Return objects key. | public Link | toLink() | public Parameters | toNotNullParameters(boolean primaryKeyOnly) Returns Parameters object based on values and column types of the record. | public Parameters | toNotNullParameters() Returns Parameters object based on values and column types of the record. | public Parameters | toParameters(int[] indeces) Returns Parameters object based on values and column types of the record for columns with indeces
specified with "indeces" parameter. | public Parameters | toParameters(boolean primaryKeyOnly) Returns Parameters object based on values and column types of the record. | public Parameters | toParameters() Returns Parameters object based on values and column types of the record. | public String | toString() | public PersistentObject | traceOff() Indicates that all newly created child Tracing Collections have to be forced to "trace off" mode. | public PersistentObject | traceOffAll() Immediately forces all child Tracing Collections have to be forced to "trace off" mode. | public PersistentObject | traceOn() Indicates that all newly created child Tracing Collections have to be forced to "trace on" mode. | public PersistentObject | traceOnAll() Immediately forces all child Tracing Collections have to be forced to "trace on" mode. | public static Collection | traceOnAll(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 Boolean | traced() 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 PersistentObject | unflatten(Link parentLink, String childName, PersistentObject childPersistent) Unflattens link. | protected static void | unflatten(Link parentLink, String childName, Collection slaves) Unflattens link. | protected void | unflatten0() | public void | unmarkAllFieldsDirty() | public void | unmarkFieldDirty(int index) | public void | unmarkInitializedComplex() Unmarks this object as "InitializedComplex". | public String | v2c(int index, String value) Right pads character fields to column length with spaces. | public void | writeExternal(ObjectOutput out) | public void | writeExternalDescendant(ObjectOutput out) |
PersistentObject | public PersistentObject()(Code) | | |
PersistentObject | public PersistentObject(Record record)(Code) | | |
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 |
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"
|
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 | 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 |
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 |
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 |
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
|
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
|
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 |
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 |
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 |
|
|
|