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

public class BTAddressHistory extends BTHistory
Business task in order to save a history of BOAddress.
See Also:
GCApi:
task
  • Constructor Details

    • BTAddressHistory

      public BTAddressHistory()
  • Method Details

    • getBTDescription

      protected String getBTDescription()
      Description copied from class: BTHistory
      Returns a descriptive name for this history task. This name is used for logging purposes to identify the specific history task being executed.
      Specified by:
      getBTDescription in class BTHistory
      Returns:
      a string describing the task
    • initializeDAO

      protected void initializeDAO()
      Description copied from class: BTHistory
      Initializes 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:
      initializeDAO in class BTHistory
    • getEntityTablePrefix

      protected String getEntityTablePrefix()
      Description copied from class: BTHistory
      Returns the prefix used in field names of the entity table.
      Specified by:
      getEntityTablePrefix in class BTHistory
      Returns:
      the prefix string used in field names of the entity table
    • getHistoryTablePrefix

      protected String getHistoryTablePrefix()
      Description copied from class: BTHistory
      Returns the prefix used in field names of the history table.
      Specified by:
      getHistoryTablePrefix in class BTHistory
      Returns:
      the prefix string used in field names of the history table
    • getHistoryDateField

      protected String getHistoryDateField()
      Description copied from class: BTHistory
      Returns the name of the field in the history table that stores the creation date.
      Specified by:
      getHistoryDateField in class BTHistory
      Returns:
      the name of the date field in the history table
    • getHistoryField

      protected String getHistoryField()
      Description copied from class: BTHistory
      Returns the name of the field in the entity table that references the history table.
      Specified by:
      getHistoryField in class BTHistory
      Returns:
      the name of the field in the entity table that references the history table
    • getForeignHistoryField

      protected String getForeignHistoryField()
      Description copied from class: BTHistory
      Returns the name of the field in the history table that references the previous history record.
      Specified by:
      getForeignHistoryField in class BTHistory
      Returns:
      the name of the field in the history table that references the previous history record
    • getHistoryForeignField

      protected String getHistoryForeignField()
      Description copied from class: BTHistory
      Returns the name of the field in the history table that references the entity table.
      Specified by:
      getHistoryForeignField in class BTHistory
      Returns:
      the name of the field in the history table that references the entity table
    • getHistoryOperationField

      protected String getHistoryOperationField()
      Description copied from class: BTHistory
      Returns the name of the field in the history table that stores the operation code.
      Specified by:
      getHistoryOperationField in class BTHistory
      Returns:
      the name of the operation code field in the history table
    • translateFields

      protected HashGetter translateFields(Map<String,Object> hgValues)
      Description copied from class: BTHistory
      Translates 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:
      translateFields in class BTHistory
      Parameters:
      hgValues - the entity data to translate
      Returns:
      a new HashGetter containing the translated values for the history record
    • preElaboration

      protected void preElaboration(PoolKit pk) throws DAException, DAValidateException
      Description copied from class: BTHistory
      Hook 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:
      preElaboration in class BTHistory
      Parameters:
      pk - the PoolKit
      Throws:
      DAException - if a data access error occurs
      DAValidateException - if validation fails