Class SqlFileDeleteQuery.EntityHandler<E>

java.lang.Object
org.seasar.doma.jdbc.query.SqlFileDeleteQuery.EntityHandler<E>
Type Parameters:
E - the entity type
Enclosing class:
SqlFileDeleteQuery

protected class SqlFileDeleteQuery.EntityHandler<E> extends Object
A handler for entity lifecycle callbacks and optimistic locking.
  • Field Details

    • name

      protected final String name
      The parameter name for the entity.
    • entity

      protected E entity
      The entity being deleted.
    • entityType

      protected final EntityType<E> entityType
      The entity type.
    • versionPropertyType

      protected final VersionPropertyType<E,?,?> versionPropertyType
      The version property type for optimistic locking.
  • Constructor Details

    • EntityHandler

      protected EntityHandler(String name, E entity, EntityType<E> entityType)
      Constructs a new instance with the specified entity information.
      Parameters:
      name - the parameter name for the entity
      entity - the entity being deleted
      entityType - the entity type
  • Method Details

    • preDelete

      protected void preDelete()
      Executes pre-delete entity lifecycle callbacks.

      This method creates a pre-delete context and calls the entity type's preDelete method.

    • postDelete

      protected void postDelete()
      Executes post-delete entity lifecycle callbacks.

      This method creates a post-delete context and calls the entity type's postDelete method.

    • prepareOptimisticLock

      protected void prepareOptimisticLock()
      Prepares optimistic locking for this query.

      This method sets the optimistic lock check flag based on the version property and configuration.