Namespaces

Types

Type NullableType

Namespace NHibernate.Type

Parent AbstractType

Methods

Properties

Public instance methods

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

Parameters
return object
object cached
ISessionImplementor session
object owner

object DeepCopy(object val)

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

object DeepCopyNotNull(object val)

When implemented by a class, returns a deep copy of the persistent state.
Most of the built in NullableTypes will just return the same object passed into it.
Parameters
return object A deep copy of the object.
object val The value to deep copy.

object Disassemble(object value, ISessionImplementor session)

Parameters
return object
object value
ISessionImplementor session

bool Equals(object obj)

Determines whether the specified Object is equal to this NullableType .
Parameters
return bool true if the SqlType and Name properties are the same.
object obj The Object to compare with this NullableType.

bool Equals(object x, object y)

Parameters
return bool
object x
object y

object FromString(string xml)

Parse the XML representation of an instance
Docu.Documentation.Comments.Paragraph Docu.Documentation.Comments.Paragraph
Parameters
return object an instance of the type
string xml

object FromStringValue(string xml)

Parse the XML representation of an instance
Parameters
return object
string xml XML string to parse, guaranteed to be non-empty

object Get(IDataReader rs, string name)

When implemented by a class, gets the object in the IDataReader for the Property.
Most implementors just call the Get overload of this method.
Parameters
return object An object with the value from the database.
IDataReader rs The IDataReader that contains the value.
string name The name of the field to get the value from.

object Get(IDataReader rs, int index)

When implemented by a class, gets the object in the IDataReader for the Property.
Parameters
return object An object with the value from the database.
IDataReader rs The IDataReader that contains the value.
int index The index of the field to get the value from.

int GetColumnSpan(IMapping session)

Returns the number of columns spanned by this NullableType
This has the hard coding of 1 in there because, by definition of this class, a NullableType can only map to one column in a table.
Parameters
return int A NullableType always returns 1.
IMapping session

int GetHashCode()

Serves as a hash function for the NullableType , suitable for use in hashing algorithms and data structures like a hash table.
Parameters
return int A hash code that is based on the SqlType 's hash code and the Name 's hash code.

int GetHashCode(object x, ISessionFactoryImplementor factory)

Parameters
return int
object x
ISessionFactoryImplementor factory

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)

Parameters
return bool
object value

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)

Parameters
return bool
object old
object current
ISessionImplementor session

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)

Gets the value of the field from the IDataReader .
Docu.Documentation.Comments.Paragraph Docu.Documentation.Comments.Paragraph
Parameters
return object The value of the field.
IDataReader rs The IDataReader positioned on the correct record.
string name The name of the field to get the value from.

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

object NullSafeGet(IDataReader rs, String[] names)

Parameters
return object
IDataReader rs
String[] names

void NullSafeSet(IDbCommand cmd, object value, int index)

Puts the value from the mapped class into the IDbCommand .
Docu.Documentation.Comments.Paragraph Docu.Documentation.Comments.Paragraph
Parameters
IDbCommand cmd The IDbCommand to put the values into.
object value The object that contains the values.
int index The index of the IDbDataParameter to write the value to.

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)

Parameters
return object
object value
ISessionImplementor session
object owner

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

Parameters
return object
object value
ISessionImplementor session
object owner

void Set(IDbCommand cmd, object value, int index)

When implemented by a class, put the value from the mapped Property into to the IDbCommand .
Implementors do not need to handle possibility of null values because this will only be called from NullSafeSet after it has checked for nulls.
Parameters
IDbCommand cmd The IDbCommand to put the value into.
object value The object that contains the value.
int index The index of the IDbDataParameter to start writing the values to.

SqlType[] SqlTypes(IMapping mapping)

When implemented by a class, returns the SqlTypes for the columns mapped by this IType.
Docu.Documentation.Comments.Paragraph Docu.Documentation.Comments.Paragraph
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
Docu.Documentation.Comments.Paragraph Docu.Documentation.Comments.Paragraph
Parameters
return string An Xml formatted string.
object value The object that contains the values.
ISessionFactoryImplementor factory

string ToString(object val)

A representation of the value to be embedded in an XML element
Parameters
return string An Xml formatted string.
object val The object that contains the values.

string ToString()

Parameters
return string

Public properties

bool HasNiceEquals get;

return bool

bool IsAnyType get;

return bool

bool IsAssociationType get;

return bool

bool IsCollectionType get;

return bool

bool IsComponentType get;

return bool

bool IsEntityType get;

return bool

bool IsMutable get;

return bool

string Name get;

return string

Type ReturnedClass get;

return Type

SqlType SqlType get;

Gets the underlying SqlType for the column mapped by this NullableType .
This implementation should be suitable for all subclasses unless they need to do some special things to get the value. There are no built in NullableType s that override this Property.
return SqlType