C# Class Prizm.Data.DAL.Hibernate.AuditInterceptor

Inheritance: NHibernate.EmptyInterceptor, IDisposable
Afficher le fichier Open project: AleksMorozova/prizm Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void
OnDelete ( object entity, object id, object state, string propertyNames, NHibernate types ) : void

Is called whilr deleting record

OnFlushDirty ( object entity, object id, object currentState, object previousState, string propertyNames, NHibernate types ) : bool

Is called while updating existing record

OnSave ( object entity, object id, object state, string propertyNames, NHibernate types ) : bool

Is called while inserting new record

Private Methods

Méthode Description
AuditInterceptor ( User currentUser ) : System
FlushDirtyEntityMapLikeComponent ( object entity, object currentState, object previousState, NHibernate types ) : void
IsAuditableType ( object obj ) : bool
IsMapLikeComponent ( object obj ) : bool
LogAudit ( object entity, string propertyNames, AuditRecordType actionType ) : void

Log insert/delete record (just one state)

LogAuditEntityMapLikeComponent ( object entity, AuditRecordType operationType ) : void
NewAuditRecord ( Item curentity, string fieldName, string newValue, string oldValue, AuditRecordType operationType ) : void

Creating log record and saving it to DB

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

OnDelete() public méthode

Is called whilr deleting record
public OnDelete ( object entity, object id, object state, string propertyNames, NHibernate types ) : void
entity object
id object
state object
propertyNames string
types NHibernate
Résultat void

OnFlushDirty() public méthode

Is called while updating existing record
public OnFlushDirty ( object entity, object id, object currentState, object previousState, string propertyNames, NHibernate types ) : bool
entity object
id object
currentState object
previousState object
propertyNames string
types NHibernate
Résultat bool

OnSave() public méthode

Is called while inserting new record
public OnSave ( object entity, object id, object state, string propertyNames, NHibernate types ) : bool
entity object
id object
state object
propertyNames string
types NHibernate
Résultat bool