| org.jpox.sco.SCO
All known Subclasses: org.jpox.sco.BitSet, org.jpox.sco.Point, org.jpox.sco.Date, org.jpox.sco.SqlTimestamp, org.jpox.sco.SqlTime, org.jpox.sco.SqlDate, org.jpox.sco.GregorianCalendar,
SCO | public interface SCO (Code) | | Representation of a wrapper/proxy for a mutable SCO type supported by JPOX.
An implementation of this interface must have a constructor with the arguments
org.jpox.StateManager ownerSM, String fieldName.
The constructor must be capable of taking nulls for these arguments to create a non-managed wrapper
which effectively just acts like an unwrapped object.
version: $Revision: 1.24 $ |
Method Summary | |
void | attachCopy(Object value) Method to return an attached copy of this object. | Object | clone() Mutable second class objects are required to provide a public clone() method so that copying
of persistable objects can take place. | Object | detachCopy(FetchPlanState state) Method to return a detached copy of this object. | String | getFieldName() Accessor for the field name. | Object | getOwner() Accessor for the owner object of the SCO instance. | Object | getValue() Method to return the value of the unwrapped type. | void | initialise(Object value, boolean forInsert, boolean forUpdate) Method to initialise the SCO for use using an existing object of the same or compatible type. | void | initialise() Method to initialise the SCO for use. | void | unsetOwner() Nullifies references to the owner Object and field. |
attachCopy | void attachCopy(Object value)(Code) | | Method to return an attached copy of this object.
Attaches all components of this object that are also
javax.jdo.spi.PersistenceCapable .
Parameters: value - The object value from the detached instance |
clone | Object clone()(Code) | | Mutable second class objects are required to provide a public clone() method so that copying
of persistable objects can take place. This mustn't throw a
CloneNotSupportedException .
A clone of the object |
detachCopy | Object detachCopy(FetchPlanState state)(Code) | | Method to return a detached copy of this object.
Detaches all components of this object that are also PersistenceCapable.
Parameters: state - State of the detachment process The detached copy |
getFieldName | String getFieldName()(Code) | | Accessor for the field name.
field name, or null if no longer associated with an object |
getOwner | Object getOwner()(Code) | | Accessor for the owner object of the SCO instance.
Usually it's an instance of
javax.jdo.spi.PersistenceCapable .
owner object, or null if no longer associated with an object |
getValue | Object getValue()(Code) | | Method to return the value of the unwrapped type.
The value that is wrapped by this object. |
initialise | void initialise(Object value, boolean forInsert, boolean forUpdate) throws ClassCastException(Code) | | Method to initialise the SCO for use using an existing object of the same or compatible type.
Parameters: value - the object from which to copy the value. Parameters: forInsert - Whether the object needs inserting in the datastore with this value Parameters: forUpdate - Whether the object needs updating in the datastore with this value throws: ClassCastException - Thrown if the given object is not of a type that's compatible with thissecond-class wrapper object. |
initialise | void initialise()(Code) | | Method to initialise the SCO for use.
This can be utilised to perform any eager loading of information from the datastore.
|
unsetOwner | void unsetOwner()(Code) | | Nullifies references to the owner Object and field. Thereafter the SCO is no longer associated with the
owner and thus should not issue any request to the datastore.
|
|
|