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

Inheritance: NHibernate.EmptyInterceptor, IDisposable
Mostrar archivo Open project: AleksMorozova/prizm Class Usage Examples

Public Methods

Method 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

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

public Dispose ( ) : void
return void

OnDelete() public method

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

OnFlushDirty() public method

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

OnSave() public method

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