Class SqlFileBatchUpdateQuery.SqlFileBatchPreUpdateContext<E>

Type Parameters:
E - the entity type
All Implemented Interfaces:
PreUpdateContext<E>
Enclosing class:
SqlFileBatchUpdateQuery<ELEMENT>

protected static class SqlFileBatchUpdateQuery.SqlFileBatchPreUpdateContext<E> extends AbstractPreUpdateContext<E>
A context for pre-update entity lifecycle callbacks.
  • Constructor Details

    • SqlFileBatchPreUpdateContext

      public SqlFileBatchPreUpdateContext(EntityType<E> entityType, Method method, Config config)
      Constructs a new instance with the specified entity information.
      Parameters:
      entityType - the entity type
      method - the method
      config - the configuration
  • Method Details

    • isEntityChanged

      public boolean isEntityChanged()
      Determines whether the entity has been changed since it was last read from the database.

      This method checks if any property of the entity has been modified by comparing the current values with the original values stored in the OriginalStates field.

      This method always returns true when Update.sqlFile() returns true, as SQL file-based updates do not perform change detection.

      This implementation always returns true for batch operations.

      Returns:
      true if the entity has been changed, false otherwise
      See Also:
    • isPropertyChanged

      public boolean isPropertyChanged(String propertyName)
      Determines whether a specific property of the entity has been changed.

      This method checks if the specified property has been modified by comparing its current value with the original value stored in the OriginalStates field.

      This method always returns true when Update.sqlFile() returns true, as SQL file-based updates do not perform change detection.

      This implementation always returns true for batch operations.

      Parameters:
      propertyName - the name of the property to check
      Returns:
      true if the property has been changed, false otherwise
      See Also: