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

상속: ICompositeUserType
파일 보기 프로젝트 열기: debop/NFramework

공개 메소드들

메소드 설명
Assemble ( object cached, ISessionImplementor session, object owner ) : object

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

DeepCopy ( object value ) : object

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

Disassemble ( object value, ISessionImplementor session ) : object

Transform the object into its cacheable representation. At the very least this method should perform a deep copy. That may not be enough for some implementations, method should perform a deep copy. 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 persistence "equality", ie. equality of persistent state.

GetHashCode ( object x ) : int

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

GetPropertyValue ( object component, int property ) : object

Get the value of a property

NullSafeGet ( IDataReader dr, string names, ISessionImplementor session, object owner ) : object

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

NullSafeSet ( IDbCommand cmd, object value, int index, ISessionImplementor session ) : 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.

NullSafeSet ( IDbCommand cmd, object value, int index, bool settable, ISessionImplementor session ) : 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. If a property is not settable, skip it and don't increment the index.

Replace ( object original, object target, ISessionImplementor session, 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. However, since composite user types often define component values, it might make sense to recursively replace component values in the target object.

SetPropertyValue ( object component, int property, object value ) : void

Set the value of a property

비공개 메소드들

메소드 설명
AsYearWeek ( object value ) : YearWeek

메소드 상세

Assemble() 공개 메소드

Reconstruct an object from the cacheable representation. At the very least this method should perform a deep copy. (optional operation)
public Assemble ( object cached, ISessionImplementor session, object owner ) : object
cached object the object to be cached
session ISessionImplementor
owner 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. That may not be enough for some implementations, method should perform a deep copy. That may not be enough for some implementations, however; for example, associations must be cached as identifier values. (optional operation)
public Disassemble ( object value, ISessionImplementor session ) : object
value object the object to be cached
session ISessionImplementor
리턴 object

Equals() 공개 메소드

Compare two instances of the class mapped by this type for persistence "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

GetPropertyValue() 공개 메소드

Get the value of a property
public GetPropertyValue ( object component, int property ) : object
component object an instance of class mapped by this "type"
property int
리턴 object

NullSafeGet() 공개 메소드

Retrieve an instance of the mapped class from a IDataReader. Implementors should handle possibility of null values.
public NullSafeGet ( IDataReader dr, string names, ISessionImplementor session, object owner ) : object
dr IDataReader IDataReader
names string the column names
session ISessionImplementor the containing entity
owner object
리턴 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.
public NullSafeSet ( IDbCommand cmd, object value, int index, ISessionImplementor session ) : void
cmd IDbCommand
value object
index int
session ISessionImplementor
리턴 void

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. If a property is not settable, skip it and don't increment the index.
public NullSafeSet ( IDbCommand cmd, object value, int index, bool settable, ISessionImplementor session ) : void
cmd IDbCommand
value object
index int
settable bool
session ISessionImplementor
리턴 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. However, since composite user types often define component values, it might make sense to recursively replace component values in the target object.
public Replace ( object original, object target, ISessionImplementor session, object owner ) : object
original object
target object
session ISessionImplementor
owner object
리턴 object

SetPropertyValue() 공개 메소드

Set the value of a property
public SetPropertyValue ( object component, int property, object value ) : void
component object an instance of class mapped by this "type"
property int the value to set
value object
리턴 void