Class BTWorkOrderOperationHistory

java.lang.Object
overit.geocall.bl.BusinessTask<Void>
overit.geocallapp.utilities.core.bl.common.task.BTHistory
overit.geocallapp.wfm.workorders.bl.operation.task.BTWorkOrderOperationHistory
All Implemented Interfaces:
Serializable, Tool

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

    • BTWorkOrderOperationHistory

      public BTWorkOrderOperationHistory()
  • 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
    • getHistoryUserField

      protected String getHistoryUserField()
      Description copied from class: BTHistory
      Returns the name of the field in the history table that stores the user ID.
      Overrides:
      getHistoryUserField in class BTHistory
      Returns:
      the name of the user ID field in the history table, or null if user tracking is not enabled
    • customizeChangedFields

      protected HashGetter customizeChangedFields(List<String> changedHistoryFields)
      Description copied from class: BTHistory
      Hook method for customizing history record values based on changed fields. This method is called before inserting a new history record when a previous history record exists.
      Overrides:
      customizeChangedFields in class BTHistory
      Parameters:
      changedHistoryFields - the list of field names that have changed
      Returns:
      a HashGetter containing custom values to add to the history record
    • translateFields

      protected HashGetter translateFields(Map<String,Object> values)
      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:
      values - the entity data to translate
      Returns:
      a new HashGetter containing the translated values for the history record
    • customizeFieldMap

      protected void customizeFieldMap(HashGetter map)
      Description copied from class: BTHistory
      Hook method for customizing the field mapping between entity and history tables. This method provides a customization point for subclasses to modify the automatically generated field mapping. Subclasses can override this method to:
      • Add mappings for fields that don't follow standard naming conventions
      • Remove mappings that should not be included in history records
      • Modify existing mappings to handle special cases
      The default implementation does nothing, preserving the automatically generated mapping.
      Overrides:
      customizeFieldMap in class BTHistory
      Parameters:
      map - the translation map from entity fields to history fields to be customized