C# 클래스 NSoft.NFramework.Data.NHibernateEx.Domain.UserTypes.CultureUserType

NHibernate가 지원하는 CultureInfo에 대한 저장 공간의 기본 크기가 5로 제한되어 있다. 중화권의 경우 5자가 넘는 경우가 있어서 128자 이상으로 저장공간을 늘렸습니다.
상속: IUserType
파일 보기 프로젝트 열기: debop/NFramework

공개 메소드들

메소드 설명
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.

메소드 상세

Assemble() 공개 메소드

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
리턴 object

DeepCopy() 공개 메소드

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
리턴 object

Disassemble() 공개 메소드

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
리턴 object

Equals() 공개 메소드

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
리턴 bool

GetHashCode() 공개 메소드

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

NullSafeGet() 공개 메소드

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
리턴 object

NullSafeSet() 공개 메소드

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
리턴 void

Replace() 공개 메소드

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
리턴 object