Namespaces

Types

Type TypeFactory

Namespace NHibernate.Type

Methods

Public instance methods

bool Equals(object obj)

Parameters
return bool
object obj

int GetHashCode()

Parameters
return int

Type GetType()

Parameters
return Type

string ToString()

Parameters
return string

Public static methods

CollectionType Array(string role, string propertyRef, Type elementClass)

Creates a new CollectionType for an Array .
Parameters
return CollectionType An ArrayType for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}
Type elementClass The Type to use to create the array.

Object[] Assemble(Object[] row, ICacheAssembler[] types, ISessionImplementor session, object owner)

Parameters
return Object[]
Object[] row
ICacheAssembler[] types
ISessionImplementor session
object owner

CollectionType Bag(string role, string propertyRef)

Creates a new CollectionType for an IList with bag semantics.
Parameters
return CollectionType A BagType for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}

IType Basic(string name)

Given the name of a Hibernate type such as Decimal, Decimal(19,0) , Int32, or even NHibernate.Type.DecimalType, NHibernate.Type.DecimalType(19,0), NHibernate.Type.Int32Type, then return an instance of NHibernate.Type.IType
This method will return null if the name is not found in the basicNameMap.
Parameters
return IType The instance of the IType that the string represents.
string name The name of the type.

CollectionType CustomCollection(string typeName, string role, string referencedPropertyName)

Parameters
return CollectionType
string typeName
string role
string referencedPropertyName

void DeepCopy(Object[] values, IType[] types, Boolean[] copy, Object[] target)

Parameters
Object[] values
IType[] types
Boolean[] copy
Object[] target

Object[] Disassemble(Object[] row, ICacheAssembler[] types, ISessionImplementor session)

Parameters
return Object[]
Object[] row
ICacheAssembler[] types
ISessionImplementor session

Int32[] FindDirty(StandardProperty[] properties, Object[] x, Object[] y, Boolean[][] includeColumns, bool anyUninitializedProperties, ISessionImplementor session)

Parameters
return Int32[]
StandardProperty[] properties
Object[] x
Object[] y
Boolean[][] includeColumns
bool anyUninitializedProperties
ISessionImplementor session

Int32[] FindModified(StandardProperty[] properties, Object[] x, Object[] y, Boolean[][] includeColumns, bool anyUninitializedProperties, ISessionImplementor session)

Parameters
return Int32[]
StandardProperty[] properties
Object[] x
Object[] y
Boolean[][] includeColumns
bool anyUninitializedProperties
ISessionImplementor session

CollectionType GenericBag(string role, string propertyRef, Type elementClass)

Creates a new CollectionType for an IList`1 with bag semantics.
Parameters
return CollectionType A GenericBagType`1 for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}
Type elementClass The Type to use to create the IList`1 with.

CollectionType GenericIdBag(string role, string propertyRef, Type elementClass)

Creates a new CollectionType for an IList`1 with identifier bag semantics.
Parameters
return CollectionType A GenericIdentifierBagType`1 for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}
Type elementClass The Type to use to create the IList`1 with.

CollectionType GenericList(string role, string propertyRef, Type elementClass)

Creates a new CollectionType for an IList`1 with list semantics.
Parameters
return CollectionType A ListType for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}
Type elementClass The Type to use to create the IList`1 with.

CollectionType GenericMap(string role, string propertyRef, Type indexClass, Type elementClass)

Creates a new CollectionType for an IDictionary`2 .
Parameters
return CollectionType A MapType for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}
Type indexClass The Type to use as the TKey to create the IDictionary`2 with.
Type elementClass The Type to use as the TValue to create the IDictionary`2 with.

CollectionType GenericSet(string role, string propertyRef, Type elementClass)

Creates a new CollectionType for an ISet`1 .
Parameters
return CollectionType A GenericSetType`1 for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}
Type elementClass The type of the set elements.

CollectionType GenericSortedDictionary(string role, string propertyRef, object comparer, Type indexClass, Type elementClass)

Parameters
return CollectionType
string role
string propertyRef
object comparer
Type indexClass
Type elementClass

CollectionType GenericSortedList(string role, string propertyRef, object comparer, Type indexClass, Type elementClass)

Parameters
return CollectionType
string role
string propertyRef
object comparer
Type indexClass
Type elementClass

CollectionType GenericSortedSet(string role, string propertyRef, object comparer, Type elementType)

Creates a new CollectionType for a sorted ISet`1 .
Parameters
return CollectionType A GenericSetType`1 for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}
object comparer The IComparer`1 to use for the set.
Type elementType The type of the elements in the set.

NullableType GetAnsiStringType(int length)

Parameters
return NullableType
int length

NullableType GetBinaryType(int length)

Gets the BinaryType with the specified length.
In addition to returning the BinaryType it will also ensure that it has been added to the basicNameMap with the keys Byte[](length) and NHibernate.Type.BinaryType(length) .
Parameters
return NullableType A BinaryType
int length The length of the data to store in the database.

NullableType GetDecimalType(Byte precision, Byte scale)

Parameters
return NullableType
Byte precision
Byte scale

NullableType GetSerializableType(int length)

Parameters
return NullableType
int length

NullableType GetSerializableType(Type serializableType, int length)

Parameters
return NullableType
Type serializableType
int length

NullableType GetSerializableType(Type serializableType)

Gets the SerializableType for the specified Type
Docu.Documentation.Comments.Paragraph Docu.Documentation.Comments.Paragraph
Parameters
return NullableType A SerializableType
Type serializableType The Type that will be Serialized to the database.

NullableType GetStringType(int length)

Parameters
return NullableType
int length

NullableType GetTypeType(int length)

Parameters
return NullableType
int length

IType HeuristicType(string typeName, IDictionary parameters)

Uses heuristics to deduce a NHibernate type given a string naming the type.
Parameters
return IType An instance of NHibernate.Type.IType
string typeName the type name
IDictionary parameters parameters for the type

IType HeuristicType(string typeName)

Uses heuristics to deduce a NHibernate type given a string naming the type.
When looking for the NHibernate type it will look in the cache of the Basic types first. If it doesn't find it in the cache then it uses the typeName to get a reference to the Class (Type in .NET). Once we get the reference to the .NET class we check to see if it implements IType, ICompositeUserType, IUserType, ILifecycle (Association), or IPersistentEnum. If none of those are implemented then we will serialize the Type to the database using NHibernate.Type.SerializableType(typeName)
Parameters
return IType An instance of NHibernate.Type.IType
string typeName

CollectionType IdBag(string role, string propertyRef)

Creates a new CollectionType for an IList with id-bag semantics.
Parameters
return CollectionType A IdentifierBagType for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}

void InjectParameters(object type, IDictionary parameters)

Parameters
object type
IDictionary parameters

CollectionType List(string role, string propertyRef)

Creates a new CollectionType for an IList .
Parameters
return CollectionType A ListType for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}

EntityType ManyToOne(Type persistentClass, bool lazy)

A many-to-one association type for the given class and cascade style.
Parameters
return EntityType
Type persistentClass
bool lazy

EntityType ManyToOne(Type persistentClass, string uniqueKeyPropertyName, bool lazy, bool ignoreNotFound)

A many-to-one association type for the given class and cascade style.
Parameters
return EntityType
Type persistentClass
string uniqueKeyPropertyName
bool lazy
bool ignoreNotFound

EntityType ManyToOne(Type persistentClass)

A many-to-one association type for the given class and cascade style.
Parameters
return EntityType
Type persistentClass

CollectionType Map(string role, string propertyRef)

Creates a new CollectionType for an IDictionary .
Parameters
return CollectionType A MapType for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}

IType OneToOne(Type persistentClass, ForeignKeyDirection foreignKeyDirection, string uniqueKeyPropertyName, bool lazy)

A one-to-one association type for the given class and cascade style.
Parameters
return IType
Type persistentClass
ForeignKeyDirection foreignKeyDirection
string uniqueKeyPropertyName
bool lazy

CollectionType OrderedMap(string role, string propertyRef)

Creates a new CollectionType for an IDictionary that maintains insertion order of elements.
Parameters
return CollectionType A OrderedMapType for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}

CollectionType OrderedSet(string role, string propertyRef)

Parameters
return CollectionType
string role
string propertyRef

Object[] Replace(Object[] original, Object[] target, IType[] types, ISessionImplementor session, object owner, IDictionary copiedAlready)

Parameters
return Object[]
Object[] original
Object[] target
IType[] types
ISessionImplementor session
object owner
IDictionary copiedAlready

CollectionType Set(string role, string propertyRef)

Creates a new CollectionType for an ISet .
Parameters
return CollectionType A SetType for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}

CollectionType SortedMap(string role, string propertyRef, IComparer comparer)

Creates a new CollectionType for an IDictionary that is sorted by an IComparer .
Parameters
return CollectionType A SortedMapType for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}
IComparer comparer The IComparer that does the sorting.

CollectionType SortedSet(string role, string propertyRef, IComparer comparer)

Creates a new CollectionType for an ISet that is sorted by an IComparer .
Parameters
return CollectionType A SortedSetType for the specified role.
string role The role the collection is in.
string propertyRef ${WriteSummary(content)}
IComparer comparer The IComparer that does the sorting.