C# Класс Castle.ActiveRecord.ActiveRecordHooksBase

Показать файл Открыть проект Примеры использования класса

Защищенные методы

Метод Описание
BeforeDelete ( IDictionary adapter ) : void

Hook to perform additional tasks before removing the object instance representation from the database.

BeforeLoad ( object id, IDictionary adapter ) : bool

Hook to transform the read data from the database before populating the object instance

BeforeSave ( IDictionary state ) : bool

Hook to change the object state before saving it.

FindDirty ( object id, IDictionary previousState, IDictionary currentState, IType types ) : int[]

Called from Flush(). The return value determines whether the entity is updated

an array of property indicies - the entity is dirty an empty array - the entity is not dirty null - use Hibernate's default dirty-checking algorithm

IsUnsaved ( ) : object

Called when a transient entity is passed to SaveOrUpdate.

The return value determines if the object is saved true - the entity is passed to Save(), resulting in an INSERT false - the entity is passed to Update(), resulting in an UPDATE null - Hibernate uses the unsaved-value mapping to determine if the object is unsaved

OnDelete ( ) : void

Lifecycle method invoked during Delete of the entity

OnFlushDirty ( object id, IDictionary previousState, IDictionary currentState, IType types ) : bool

OnLoad ( object id ) : void

Lifecycle method invoked during Load of the entity

OnSave ( ) : void

Lifecycle method invoked during Save of the entity

OnUpdate ( ) : void

Lifecycle method invoked during Update of the entity

PostFlush ( ) : void

Called after a flush that actually ends in execution of the SQL statements required to synchronize in-memory state with the database.

PreFlush ( ) : void

Called before a flush

Описание методов

BeforeDelete() защищенный Метод

Hook to perform additional tasks before removing the object instance representation from the database.
protected BeforeDelete ( IDictionary adapter ) : void
adapter IDictionary
Результат void

BeforeLoad() защищенный Метод

Hook to transform the read data from the database before populating the object instance
protected BeforeLoad ( object id, IDictionary adapter ) : bool
id object id of the obejct
adapter IDictionary list of properties and their values
Результат bool

BeforeSave() защищенный Метод

Hook to change the object state before saving it.
protected BeforeSave ( IDictionary state ) : bool
state IDictionary
Результат bool

FindDirty() защищенный Метод

Called from Flush(). The return value determines whether the entity is updated
an array of property indicies - the entity is dirty an empty array - the entity is not dirty null - use Hibernate's default dirty-checking algorithm
protected FindDirty ( object id, IDictionary previousState, IDictionary currentState, IType types ) : int[]
id object
previousState IDictionary
currentState IDictionary
types IType
Результат int[]

IsUnsaved() защищенный Метод

Called when a transient entity is passed to SaveOrUpdate.
The return value determines if the object is saved true - the entity is passed to Save(), resulting in an INSERT false - the entity is passed to Update(), resulting in an UPDATE null - Hibernate uses the unsaved-value mapping to determine if the object is unsaved
protected IsUnsaved ( ) : object
Результат object

OnDelete() защищенный Метод

Lifecycle method invoked during Delete of the entity
protected OnDelete ( ) : void
Результат void

OnFlushDirty() защищенный Метод

protected OnFlushDirty ( object id, IDictionary previousState, IDictionary currentState, IType types ) : bool
id object
previousState IDictionary
currentState IDictionary
types IType
Результат bool

OnLoad() защищенный Метод

Lifecycle method invoked during Load of the entity
protected OnLoad ( object id ) : void
id object
Результат void

OnSave() защищенный Метод

Lifecycle method invoked during Save of the entity
protected OnSave ( ) : void
Результат void

OnUpdate() защищенный Метод

Lifecycle method invoked during Update of the entity
protected OnUpdate ( ) : void
Результат void

PostFlush() защищенный Метод

Called after a flush that actually ends in execution of the SQL statements required to synchronize in-memory state with the database.
protected PostFlush ( ) : void
Результат void

PreFlush() защищенный Метод

Called before a flush
protected PreFlush ( ) : void
Результат void