Namespaces

Types

Type AbstractType

Namespace NHibernate.Type

Interfaces IType

Methods

Properties

Public instance methods

object Assemble(object cached, ISessionImplementor session, object owner)

Reconstructs the object from its cached "disassembled" state.
This method calls DeepCopy if the value is not null.
Parameters
return object The assembled object.
object cached The disassembled state from the cache
ISessionImplementor session The ISessionImplementor is not used by this method.
object owner The parent Entity object is not used by this method

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

object Disassemble(object value, ISessionImplementor session)

Disassembles the object into a cacheable representation.
This method calls DeepCopy if the value is not null.
Parameters
return object The disassembled, deep cloned state of the object
object value The value to disassemble.
ISessionImplementor session The ISessionImplementor is not used by this method.

bool Equals(object obj)

Parameters
return bool
object obj

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)

Parameters
return int
object x
ISessionFactoryImplementor factory

int GetHashCode()

Parameters
return int

Type GetType()

Parameters
return Type

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)

Should the parent be considered dirty, given both the old and current field or element value?
This method uses IType.Equals(object, object) to determine the value of IsDirty.
Parameters
return bool true if the field is dirty
object old The old value
object current The current value
ISessionImplementor session The ISessionImplementor is not used by this method.

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

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

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

Parameters
return object
IDataReader rs
string name
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 current, ISessionImplementor session, object owner, IDictionary copiedAlready)

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

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

Maps identifiers to Entities or Collections.
There is nothing done in this method other than return the value parameter passed in.
Parameters
return object The value.
object value An identifier or value returned by Hydrate()
ISessionImplementor session The ISessionImplementor is not used by this method.
object owner The parent Entity is not used by this method.

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

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

string ToString()

Parameters
return string

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;

Gets a value indicating if the implementation is an "object" type
return bool

bool IsAssociationType get;

Gets a value indicating if the AbstractType is an IAssociationType .
return bool

bool IsCollectionType get;

Gets a value indicating if the AbstractType is a CollectionType .
return bool

bool IsComponentType get;

Gets a value indicating if the AbstractType is an IAbstractComponentType .
return bool

bool IsEntityType get;

Gets a value indicating if the AbstractType is a 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