C# Class Castle.ActiveRecord.ActiveRecordHooksBase

Afficher le fichier Open project: nats/castle-1.0.3-mono Class Usage Examples

Méthodes protégées

Méthode 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 méthode

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

BeforeLoad() protected méthode

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
Résultat bool

BeforeSave() protected méthode

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

FindDirty() protected méthode

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
Résultat int[]

IsUnsaved() protected méthode

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
Résultat object

OnDelete() protected méthode

Lifecycle method invoked during Delete of the entity
protected OnDelete ( ) : void
Résultat void

OnFlushDirty() protected méthode

protected OnFlushDirty ( object id, IDictionary previousState, IDictionary currentState, IType types ) : bool
id object
previousState IDictionary
currentState IDictionary
types IType
Résultat bool

OnLoad() protected méthode

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

OnSave() protected méthode

Lifecycle method invoked during Save of the entity
protected OnSave ( ) : void
Résultat void

OnUpdate() protected méthode

Lifecycle method invoked during Update of the entity
protected OnUpdate ( ) : void
Résultat void

PostFlush() protected méthode

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
Résultat void

PreFlush() protected méthode

Called before a flush
protected PreFlush ( ) : void
Résultat void