Click or drag to resize

IAuditor Interface

Interface for the auditor to be used with entity instances at runtime. Auditors audit at runtime various actions on entities and allow automatic persistence of audit information in audit entities when transactions are committed.

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.9.0.0 (5.9.0)
Syntax
public interface IAuditor

The IAuditor type exposes the following members.

Properties
  NameDescription
Public propertyHasDataToXmlSerialize
Gets if the auditor object has data which should be Xml serialized. If this property returns false, no serialization (and thus no deserialization) will take place of the data to XML.
Top
Methods
  NameDescription
Public methodAuditDeleteOfEntity
Audits the successful delete of an entity from the database
Public methodAuditDereferenceOfRelatedEntity
Audits the successful dereference of related entity from the entity passed in.
Public methodAuditDirectDeleteOfEntities
Audits the successful direct delete of entities in the database
Public methodAuditDirectUpdateOfEntities
Audits the succesful direct update of entities in the database.
Public methodAuditEntityFieldGet
Audits when an entity field's value is succesfully obtained from the passed in entity
Public methodAuditEntityFieldSet
Audits when an entity field is set succesfully to a new value.
Public methodAuditInsertOfNewEntity
Audits the successful insert of a new entity into the database.
Public methodAuditLoadOfEntity
Audits the successful load of an entity from the database
Public methodAuditReferenceOfRelatedEntity
Audits the successful reference of related entity from the entity passed in.
Public methodAuditUpdateOfExistingEntity
Audits the successful update of an existing entity in the database
Public methodGetAuditEntitiesToSave
Gets the audit entities to save. Audit entities contain the audit information stored inside this auditor.
Public methodReadXml(XmlNode)
Reads the auditor data XML.
Public methodReadXml(XmlReader)
Reads the auditor data XML.
Public methodRequiresTransactionForAuditEntities
Method which returns true if this auditor expects to have audit entities to persist and therefore needs a transaction. This method is called in the situation when there's no transaction going on though one should be started right before the single-statement action in the case if the auditor has entities to save afterwards. It's recommended to return true if the auditor might have audit entities to persist after an entity save/delete/direct update/direct delete of entities. Default: true
Public methodTransactionCommitted
The transaction with which the audit entities requested from GetAuditEntitiesToSave were saved. Use this method to clear any audit data in this auditor as all audit information is persisted successfully.
Public methodWriteXml
Method to serialze audit data to XML. Use the aspects passed in to determine various aspects of the XML format. If the audit data consists of entity instances, be sure to pass the passed in processedObjectIDs object to the WriteXml routine of IEntity2, so use the overload of IEntity2.WriteXml() which accepts a reader and the processedObjectIDs. Though it's recommended not to serialize entity objects in audit data, keep audit data as clean as possible from entity references. The start element 'Auditor' has already been written, the end element /Auditor will be written for you after this routine.
Top
See Also