Class BTAddressHistory
java.lang.Object
overit.geocall.bl.BusinessTask<Void>
overit.geocallapp.utilities.core.bl.common.task.BTHistory
overit.geocallapp.wfm.core.bl.location.address.task.BTAddressHistory
- All Implemented Interfaces:
Serializable,Tool
Business task in order to save a history of
BOAddress. - See Also:
- GCApi:
- task
-
Field Summary
Fields inherited from class overit.geocallapp.utilities.core.bl.common.task.BTHistory
currentDBValues, dao, daoHistory, elaboratedRows, filters, HISTORY_CACHE_NAME, HISTORY_TABLE_TRANSLATE_FIELD_CACHE, historyFieldsMap, historyWritten, LOG, newHistoryRecordId, operationCode, operationMode, operationType, TYPE_COMMAND_AND_HISTORY, TYPE_ONLY_HISTORY, validModes, values -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringReturns a descriptive name for this history task.protected StringReturns the prefix used in field names of the entity table.protected StringReturns the name of the field in the history table that references the previous history record.protected StringReturns the name of the field in the history table that stores the creation date.protected StringReturns the name of the field in the entity table that references the history table.protected StringReturns the name of the field in the history table that references the entity table.protected StringReturns the name of the field in the history table that stores the operation code.protected StringReturns the prefix used in field names of the history table.protected voidInitializes the DAOs used by this history task.protected voidHook method called before the entity operation is executed.protected HashGettertranslateFields(Map<String, Object> hgValues) Translates entity field values to their corresponding history field values.Methods inherited from class overit.geocallapp.utilities.core.bl.common.task.BTHistory
applyCommand, body, buildMap, createHistoryRecord, customizeChangedFields, customizeFieldMap, getChangedFields, getCustomFieldsToExclude, getElaboratedRows, getExcludedHistoryFieldsFromComparison, getFieldsToExclude, getHistoryRecordId, getHistorySequenceField, getHistoryTableField, getHistoryUserField, getOperationCodeValue, getStackTraceField, getStackTraceString, getValidOperationModes, insertHistoryRecord, isDelete, isHistoryWritten, isInsert, isUpdate, loadCurrentDBData, loadPreviousHistoryRecord, loadTranslatedFieldMap, postElaboration, setCommandAndHistoryParams, setHistoryParams, traceCurrentStack, validateParams, writeHistoryRecordMethods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Constructor Details
-
BTAddressHistory
public BTAddressHistory()
-
-
Method Details
-
getBTDescription
Description copied from class:BTHistoryReturns a descriptive name for this history task. This name is used for logging purposes to identify the specific history task being executed.- Specified by:
getBTDescriptionin classBTHistory- Returns:
- a string describing the task
-
initializeDAO
protected void initializeDAO()Description copied from class:BTHistoryInitializes the DAOs used by this history task. Implementations must set:- dao: for entity table operations (insert/update/delete)
- daoHistory: for history table operations
- Specified by:
initializeDAOin classBTHistory
-
getEntityTablePrefix
Description copied from class:BTHistoryReturns the prefix used in field names of the entity table.- Specified by:
getEntityTablePrefixin classBTHistory- Returns:
- the prefix string used in field names of the entity table
-
getHistoryTablePrefix
Description copied from class:BTHistoryReturns the prefix used in field names of the history table.- Specified by:
getHistoryTablePrefixin classBTHistory- Returns:
- the prefix string used in field names of the history table
-
getHistoryDateField
Description copied from class:BTHistoryReturns the name of the field in the history table that stores the creation date.- Specified by:
getHistoryDateFieldin classBTHistory- Returns:
- the name of the date field in the history table
-
getHistoryField
Description copied from class:BTHistoryReturns the name of the field in the entity table that references the history table.- Specified by:
getHistoryFieldin classBTHistory- Returns:
- the name of the field in the entity table that references the history table
-
getForeignHistoryField
Description copied from class:BTHistoryReturns the name of the field in the history table that references the previous history record.- Specified by:
getForeignHistoryFieldin classBTHistory- Returns:
- the name of the field in the history table that references the previous history record
-
getHistoryForeignField
Description copied from class:BTHistoryReturns the name of the field in the history table that references the entity table.- Specified by:
getHistoryForeignFieldin classBTHistory- Returns:
- the name of the field in the history table that references the entity table
-
getHistoryOperationField
Description copied from class:BTHistoryReturns the name of the field in the history table that stores the operation code.- Specified by:
getHistoryOperationFieldin classBTHistory- Returns:
- the name of the operation code field in the history table
-
translateFields
Description copied from class:BTHistoryTranslates entity field values to their corresponding history field values. This method applies the field mapping to convert entity data into the format required for the history table. It:- Maps entity field names to history field names using the translation map
- Adds the foreign key reference to the entity record
- Sets the operation code (INSERT/UPDATE/DELETE)
- Sets the timestamp for the history record
- Sets the user ID if user tracking is enabled
- Overrides:
translateFieldsin classBTHistory- Parameters:
hgValues- the entity data to translate- Returns:
- a new
HashGettercontaining the translated values for the history record
-
preElaboration
Description copied from class:BTHistoryHook method called before the entity operation is executed. This method is called before the entity is modified (inserted, updated, or deleted). Subclasses can override this method to perform additional actions before the entity operation begins.- Overrides:
preElaborationin classBTHistory- Parameters:
pk- thePoolKit- Throws:
DAException- if a data access error occursDAValidateException- if validation fails
-