C# Класс Habanero.DB.TransactionLogTable

Logs transactions in the same database that is used to store the business objects. Used to log every change to the business object. Stores datetime action carried out actionstype (CRUD). windows user, logged user. Database Field name and the dirty XML field (shows the previously persisted state and newly persisted state of the field.
Наследование: ITransactionLog
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetPersistSql ( ) : IEnumerable

Returns the appropriate sql statement collection depending on the state of the object. E.g. Update SQL, InsertSQL or DeleteSQL.

TransactionID ( ) : string

This is the ID that uniquely identifies this item of the transaction. This must be the same for the lifetime of the transaction object. This assumption is relied upon for certain optimisations in the Transaction Comitter.

TransactionLogTable ( BusinessObject busObjToLog ) : System

Constructs the new transactionlogTable with default table name and logging fields.

TransactionLogTable ( BusinessObject busObjToLog, ISecurityController securityController ) : System

Constructs the new transactionlogTable with default table name and logging fields and a specific security controller for getting the currently logged on user.

TransactionLogTable ( BusinessObject busObjToLog, ISecurityController securityController, string transactionLogTable ) : System

Constructs the new transactionlogTable with default table name and logging fields and a specific security controller for getting the currently logged on user.

TransactionLogTable ( BusinessObject busObjToLog, string transactionLogTable ) : System

Constructs the new transactionlogTable with specified table name and the defaultlogging fields.

TransactionLogTable ( BusinessObject buObjToLog, string transactionLogTable, string dateTimeUpdatedFieldName, string windowsUserFieldName, string logonUserFieldName, string businessObjectToStringFieldName, string machineUpdateName, string businessObjectTypeNameFieldName, string crudActionFieldName, string dirtyXMLFieldName ) : System

Constructor to initialise a new log table

TransactionLogTable ( BusinessObject buObjToLog, string transactionLogTable, string dateTimeUpdatedFieldName, string windowsUserFieldName, string logonUserFieldName, string businessObjectToStringFieldName, string machineUpdateName, string businessObjectTypeNameFieldName, string crudActionFieldName, string dirtyXMLFieldName, ISecurityController securityController ) : System

Constructor to initialise a new log table

UpdateAsRolledBack ( ) : void

updates the object as rolled back

UpdateStateAsCommitted ( ) : void

Updates the business object as committed

Приватные методы

Метод Описание
GetCrudAction ( IBusinessObject busObj ) : string

Returns the status of the business object specified, such as "Created", "Deleted" or "Updated" (if dirty)

GetLogonUserName ( ) : string

Описание методов

GetPersistSql() публичный Метод

Returns the appropriate sql statement collection depending on the state of the object. E.g. Update SQL, InsertSQL or DeleteSQL.
public GetPersistSql ( ) : IEnumerable
Результат IEnumerable

TransactionID() публичный Метод

This is the ID that uniquely identifies this item of the transaction. This must be the same for the lifetime of the transaction object. This assumption is relied upon for certain optimisations in the Transaction Comitter.
public TransactionID ( ) : string
Результат string

TransactionLogTable() публичный Метод

Constructs the new transactionlogTable with default table name and logging fields.
public TransactionLogTable ( BusinessObject busObjToLog ) : System
busObjToLog BusinessObject
Результат System

TransactionLogTable() публичный Метод

Constructs the new transactionlogTable with default table name and logging fields and a specific security controller for getting the currently logged on user.
public TransactionLogTable ( BusinessObject busObjToLog, ISecurityController securityController ) : System
busObjToLog BusinessObject
securityController ISecurityController
Результат System

TransactionLogTable() публичный Метод

Constructs the new transactionlogTable with default table name and logging fields and a specific security controller for getting the currently logged on user.
public TransactionLogTable ( BusinessObject busObjToLog, ISecurityController securityController, string transactionLogTable ) : System
busObjToLog BusinessObject
securityController ISecurityController
transactionLogTable string
Результат System

TransactionLogTable() публичный Метод

Constructs the new transactionlogTable with specified table name and the defaultlogging fields.
public TransactionLogTable ( BusinessObject busObjToLog, string transactionLogTable ) : System
busObjToLog BusinessObject the business object for which the transaction log is being created
transactionLogTable string The log table name
Результат System

TransactionLogTable() публичный Метод

Constructor to initialise a new log table
public TransactionLogTable ( BusinessObject buObjToLog, string transactionLogTable, string dateTimeUpdatedFieldName, string windowsUserFieldName, string logonUserFieldName, string businessObjectToStringFieldName, string machineUpdateName, string businessObjectTypeNameFieldName, string crudActionFieldName, string dirtyXMLFieldName ) : System
buObjToLog BusinessObject the business object for which the transaction log is being created
transactionLogTable string The log table name
dateTimeUpdatedFieldName string Time updated field name
windowsUserFieldName string Windows user field name
logonUserFieldName string Logon user field name
businessObjectToStringFieldName string BusinessObject ToString field name
machineUpdateName string Machine update name
businessObjectTypeNameFieldName string BO type field name
crudActionFieldName string Crud action field name
dirtyXMLFieldName string Dirty xml field name
Результат System

TransactionLogTable() публичный Метод

Constructor to initialise a new log table
public TransactionLogTable ( BusinessObject buObjToLog, string transactionLogTable, string dateTimeUpdatedFieldName, string windowsUserFieldName, string logonUserFieldName, string businessObjectToStringFieldName, string machineUpdateName, string businessObjectTypeNameFieldName, string crudActionFieldName, string dirtyXMLFieldName, ISecurityController securityController ) : System
buObjToLog BusinessObject the business object for which the transaction log is being created
transactionLogTable string The log table name
dateTimeUpdatedFieldName string Time updated field name
windowsUserFieldName string Windows user field name
logonUserFieldName string Logon user field name
businessObjectToStringFieldName string
machineUpdateName string Machine update name
businessObjectTypeNameFieldName string BO type field name
crudActionFieldName string Crud action field name
dirtyXMLFieldName string Dirty xml field name
securityController ISecurityController
Результат System

UpdateAsRolledBack() публичный Метод

updates the object as rolled back
public UpdateAsRolledBack ( ) : void
Результат void

UpdateStateAsCommitted() публичный Метод

Updates the business object as committed
public UpdateStateAsCommitted ( ) : void
Результат void