The ICompositeUserType type exposes the following members.

Methods

  NameDescription
Public methodAssemble
Reconstruct an object from the cacheable representation. At the very least this method should perform a deep copy. (optional operation)
Public methodDeepCopy
Return a deep copy of the persistent state, stopping at entities and at collections.
Public methodDisassemble
Transform the object into its cacheable representation. At the very least this method should perform a deep copy. That may not be enough for some implementations, method should perform a deep copy. That may not be enough for some implementations, however; for example, associations must be cached as identifier values. (optional operation)
Public methodEquals
Compare two instances of the class mapped by this type for persistence "equality", ie. equality of persistent state.
Public methodGetHashCode
Get a hashcode for the instance, consistent with persistence "equality"
Public methodGetPropertyValue
Get the value of a property
Public methodNullSafeGet
Retrieve an instance of the mapped class from a IDataReader. Implementors should handle possibility of null values.
Public methodNullSafeSet
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. If a property is not settable, skip it and don't increment the index.
Public methodReplace
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. However, since composite user types often define component values, it might make sense to recursively replace component values in the target object.
Public methodSetPropertyValue
Set the value of a property

Properties

  NameDescription
Public propertyIsMutable
Are objects of this type mutable?
Public propertyPropertyNames
Get the "property names" that may be used in a query.
Public propertyPropertyTypes
Get the corresponding "property types"
Public propertyReturnedClass
The class returned by NullSafeGet().

See Also