Namespaces

Types

Type IType

Namespace NHibernate.Type

Interfaces ICacheAssembler

Methods

Properties

Public instance methods

object DeepCopy(object val)

When implemented by a class, returns a deep copy of the persistent state, stopping at entities and at collections.
Parameters
return object A deep copy of the object.
object val A Collection element or Entity field

bool Equals(object x, object y)

When implemented by a class, compare two instances of the class mapped by this IType for persistence "equality" - ie. Equality of persistent state.
Parameters
return bool True if the two objects contain the same values.
object x The left hand side object.
object y The right hand side object.

object FromString(string xml)

Parse the XML representation of an instance
Parameters
return object an instance of the type
string xml

int GetColumnSpan(IMapping mapping)

When implemented by a class, returns how many columns are used to persist this type.
Parameters
return int The number of columns this IType spans.
IMapping mapping The IMapping that uses this IType.

int GetHashCode(object x, ISessionFactoryImplementor factory)

Get a hashcode, consistent with persistence "equality"
Parameters
return int
object x
ISessionFactoryImplementor factory

object Hydrate(IDataReader rs, String[] names, ISessionImplementor session, object owner)

Parameters
return object
IDataReader rs
String[] names
ISessionImplementor session
object owner

bool IsDatabaseNull(object value)

${WriteSummary(content)}
Parameters
return bool ${WriteSummary(content)}
object value ${WriteSummary(content)}

bool IsDirty(object old, object current, Boolean[] checkable, ISessionImplementor session)

Parameters
return bool
object old
object current
Boolean[] checkable
ISessionImplementor session

bool IsDirty(object old, object current, ISessionImplementor session)

When implemented by a class, should the parent be considered dirty, given both the old and current field or element value?
Parameters
return bool true if the field is dirty
object old The old value
object current The current value
ISessionImplementor session The ISessionImplementor

bool IsModified(object oldHydratedState, object currentState, Boolean[] checkable, ISessionImplementor session)

Parameters
return bool
object oldHydratedState
object currentState
Boolean[] checkable
ISessionImplementor session

object NullSafeGet(IDataReader rs, string name, ISessionImplementor session, object owner)

When implemented by a class, gets an instance of the object mapped by this IType from the IDataReader .
Implementations should handle possibility of null values. This method might be called if the IType is known to be a single-column type.
Parameters
return object The object mapped by this IType.
IDataReader rs The IDataReader that contains the values
string name The name of the column in the IDataReader that contains the value to populate the IType with.
ISessionImplementor session
object owner

object NullSafeGet(IDataReader rs, String[] names, ISessionImplementor session, object owner)

Parameters
return object
IDataReader rs
String[] names
ISessionImplementor session
object owner

void NullSafeSet(IDbCommand st, object value, int index, ISessionImplementor session)

When implemented by a class, puts the value/values from the mapped class into the IDbCommand .
Implementors should handle possibility of null values. A multi-column type should be written to parameters starting from .
Parameters
IDbCommand st The IDbCommand to put the values into.
object value The object that contains the values.
int index The index of the IDbDataParameter to start writing the values to.
ISessionImplementor session

void NullSafeSet(IDbCommand st, object value, int index, Boolean[] settable, ISessionImplementor session)

Parameters
IDbCommand st
object value
int index
Boolean[] settable
ISessionImplementor session

object Replace(object original, object target, ISessionImplementor session, object owner, IDictionary copiedAlready)

Parameters
return object
object original
object target
ISessionImplementor session
object owner
IDictionary copiedAlready

object ResolveIdentifier(object value, ISessionImplementor session, object owner)

When implemented by a class, maps identifiers to Entities or Collections.
This is the second phase of 2-phase property initialization.
Parameters
return object The Entity or Collection referenced by this Identifier.
object value An identifier or value returned by Hydrate()
ISessionImplementor session The session
object owner The parent Entity

object SemiResolve(object value, ISessionImplementor session, object owner)

Given a hydrated, but unresolved value, return a value that may be used to reconstruct property-ref associations.
Parameters
return object
object value
ISessionImplementor session
object owner

SqlType[] SqlTypes(IMapping mapping)

When implemented by a class, returns the SqlTypes for the columns mapped by this IType.
Parameters
return SqlType[] An array of SqlType s.
IMapping mapping The IMapping that uses this IType.

string ToLoggableString(object value, ISessionFactoryImplementor factory)

When implemented by a class, a representation of the value to be embedded in an XML element
Parameters
return string An Xml formatted string.
object value The object that contains the values.
ISessionFactoryImplementor factory

Public properties

bool HasNiceEquals get;

When implemented by a class, gets whether or not this IType contains Type s that implement well-behaived Equals() method.
Docu.Documentation.Comments.Paragraph Docu.Documentation.Comments.Paragraph Docu.Documentation.Comments.Paragraph
return bool

bool IsAnyType get;

return bool

bool IsAssociationType get;

When implemented by a class, gets a value indicating if the implementor is castable to an an IAssociationType
This does not necessarily imply that the type actually represents an association.
return bool

bool IsCollectionType get;

When implemented by a class, gets a value indicating if the implementor is a collection type
return bool

bool IsComponentType get;

When implemented by a class, gets a value indicating if the implementor is an IAbstractComponentType .
If true, the implementation must be castable to IAbstractComponentType . A component type may own collections or associations and hence must provide certain extra functionality.
return bool

bool IsEntityType get;

When implemented by a class, gets a value indicating if the implementor extends EntityType
return bool

bool IsMutable get;

When implemented by a class, gets the value indicating if the objects of this IType are mutable.
With respect to the referencing object... Entities and Collections are considered immutable because they manage their own internal state.
return bool

string Name get;

When implemented by a class, gets the abbreviated name of the type.
return string

Type ReturnedClass get;

When implemented by a class, gets the Type returned by the NullSafeGet() methods.
This is used to establish the class of an array of this Itype
return Type