Class AutoUpdateQuery.AutoPostUpdateContext<E>

Type Parameters:
E - the entity type
All Implemented Interfaces:
PostUpdateContext<E>
Enclosing class:
AutoUpdateQuery<ENTITY>

protected static class AutoUpdateQuery.AutoPostUpdateContext<E> extends AbstractPostUpdateContext<E>
A context class for post-update processing.

This class provides context information for entity post-update hooks, including which properties were changed and which properties should be returned.

  • Field Details

    • changedPropertyNames

      protected final Set<String> changedPropertyNames
      The names of properties that were changed in this update.
  • Constructor Details

    • AutoPostUpdateContext

      public AutoPostUpdateContext(EntityType<E> entityType, Method method, Config config, List<EntityPropertyType<E,?>> targetPropertyTypes, ReturningProperties returningProperties)
      Constructs an instance.
      Parameters:
      entityType - the entity type
      method - the method that triggered the update
      config - the configuration
      targetPropertyTypes - the property types that were updated
      returningProperties - the properties to be returned
  • Method Details

    • 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.

      A property is considered changed if it was included in the set of properties that were updated.

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

      public ReturningProperties getReturningProperties()
      Returns the returning properties configuration for this update operation.

      Returning properties specify which columns should be returned by the database after an update operation, typically used with the RETURNING clause in SQL.

      Returns:
      the returning properties configuration, never null
      See Also: