C# Class NSoft.NFramework.Data.NHibernateEx.Domain.UserTypes.CultureUserType

NHibernate가 지원하는 CultureInfo에 대한 저장 공간의 기본 크기가 5로 제한되어 있다. 중화권의 경우 5자가 넘는 경우가 있어서 128자 이상으로 저장공간을 늘렸습니다.
Inheritance: IUserType
ファイルを表示 Open project: debop/NFramework

Public Methods

Method Description
Assemble ( object cached, object owner ) : object

Reconstruct an object from the cacheable representation. At the very least this method should perform a deep copy if the type is mutable. (optional operation)

DeepCopy ( object value ) : object

Return a deep copy of the persistent state, stopping at entities and at collections.

Disassemble ( object value ) : object

Transform the object into its cacheable representation. At the very least this method should perform a deep copy if the type is mutable. That may not be enough for some implementations, however; for example, associations must be cached as identifier values. (optional operation)

Equals ( object x, object y ) : bool

Compare two instances of the class mapped by this type for persistent "equality" ie. equality of persistent state

GetHashCode ( object x ) : int

Get a hashcode for the instance, consistent with persistence "equality"

NullSafeGet ( IDataReader rs, string names, object owner ) : object

Retrieve an instance of the mapped class from a JDBC resultset. Implementors should handle possibility of null values.

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

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.

Replace ( object original, object target, object owner ) : object

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. For objects with component values, it might make sense to recursively replace component values.

Method Details

Assemble() public method

Reconstruct an object from the cacheable representation. At the very least this method should perform a deep copy if the type is mutable. (optional operation)
public Assemble ( object cached, object owner ) : object
cached object the object to be cached
owner object the owner of the cached object
return object

DeepCopy() public method

Return a deep copy of the persistent state, stopping at entities and at collections.
public DeepCopy ( object value ) : object
value object generally a collection element or entity field
return object

Disassemble() public method

Transform the object into its cacheable representation. At the very least this method should perform a deep copy if the type is mutable. That may not be enough for some implementations, however; for example, associations must be cached as identifier values. (optional operation)
public Disassemble ( object value ) : object
value object the object to be cached
return object

Equals() public method

Compare two instances of the class mapped by this type for persistent "equality" ie. equality of persistent state
public Equals ( object x, object y ) : bool
x object
y object
return bool

GetHashCode() public method

Get a hashcode for the instance, consistent with persistence "equality"
public GetHashCode ( object x ) : int
x object
return int

NullSafeGet() public method

Retrieve an instance of the mapped class from a JDBC resultset. Implementors should handle possibility of null values.
HibernateException
public NullSafeGet ( IDataReader rs, string names, object owner ) : object
rs IDataReader a IDataReader
names string column names
owner object the containing entity
return object

NullSafeSet() public method

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.
HibernateException
public NullSafeSet ( IDbCommand cmd, object value, int index ) : void
cmd IDbCommand a IDbCommand
value object the object to write
index int command parameter index
return void

Replace() public method

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. For objects with component values, it might make sense to recursively replace component values.
public Replace ( object original, object target, object owner ) : object
original object the value from the detached entity being merged
target object the value in the managed entity
owner object the managed entity
return object