Method | Description | |
---|---|---|
Assemble ( object cached, object owner ) : object |
Reconstruct an object from the cacheable representation. At the very least this method should perform a deep copy if the type is mutable. (optional operation)
|
|
DeepCopy ( object value ) : object |
Return a deep copy of the persistent state, stopping at entities and at collections.
|
|
Disassemble ( object value ) : object |
Transform the object into its cacheable representation. At the very least this method should perform a deep copy if the type is mutable. That may not be enough for some implementations, however; for example, associations must be cached as identifier values. (optional operation)
|
|
Equals ( object x, object y ) : bool |
Compare two instances of the class mapped by this type for persistent "equality" ie. equality of persistent state
|
|
GetHashCode ( object x ) : int |
Get a hashcode for the instance, consistent with persistence "equality"
|
|
NullSafeGet ( IDataReader rs, string names, object owner ) : object |
Retrieve an instance of the mapped class from a JDBC resultset. Implementors should handle possibility of null values.
|
|
NullSafeSet ( IDbCommand cmd, object value, int index ) : void |
Write an instance of the mapped class to a prepared statement. Implementors should handle possibility of null values. A multi-column type should be written to parameters starting from index.
|
|
Replace ( object original, object target, object owner ) : object |
During merge, replace the existing (target) value in the entity we are merging to with a new (original) value from the detached entity we are merging. For immutable objects, or null values, it is safe to simply return the first parameter. For mutable objects, it is safe to return a copy of the first parameter. For objects with component values, it might make sense to recursively replace component values.
|
public Assemble ( object cached, object owner ) : object | ||
cached | object | the object to be cached |
owner | object | the owner of the cached object |
return | object |
public DeepCopy ( object value ) : object | ||
value | object | generally a collection element or entity field |
return | object |
public Disassemble ( object value ) : object | ||
value | object | the object to be cached |
return | object |
public abstract NullSafeGet ( IDataReader rs, string names, object owner ) : object | ||
rs | IDataReader | a IDataReader |
names | string | column names |
owner | object | the containing entity |
return | object |
public abstract NullSafeSet ( IDbCommand cmd, object value, int index ) : void | ||
cmd | IDbCommand | a IDbCommand |
value | object | the object to write |
index | int | command parameter index |
return | void |
public Replace ( object original, object target, object owner ) : object | ||
original | object | the value from the detached entity being merged |
target | object | the value in the managed entity |
owner | object | the managed entity |
return | object |