C# Class Castle.ActiveRecord.ActiveRecordHooksBase

Mostra file Open project: nats/castle-1.0.3-mono Class Usage Examples

Protected Methods

Method Description
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

Method Details

BeforeDelete() protected method

Hook to perform additional tasks before removing the object instance representation from the database.
protected BeforeDelete ( IDictionary adapter ) : void
adapter IDictionary
return void

BeforeLoad() protected method

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
return bool

BeforeSave() protected method

Hook to change the object state before saving it.
protected BeforeSave ( IDictionary state ) : bool
state IDictionary
return bool

FindDirty() protected method

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
return int[]

IsUnsaved() protected method

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
return object

OnDelete() protected method

Lifecycle method invoked during Delete of the entity
protected OnDelete ( ) : void
return void

OnFlushDirty() protected method

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

OnLoad() protected method

Lifecycle method invoked during Load of the entity
protected OnLoad ( object id ) : void
id object
return void

OnSave() protected method

Lifecycle method invoked during Save of the entity
protected OnSave ( ) : void
return void

OnUpdate() protected method

Lifecycle method invoked during Update of the entity
protected OnUpdate ( ) : void
return void

PostFlush() protected method

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
return void

PreFlush() protected method

Called before a flush
protected PreFlush ( ) : void
return void