Module org.seasar.doma.core
Package org.seasar.doma.jdbc.query
Class SqlFileDeleteQuery.EntityHandler<E>
java.lang.Object
org.seasar.doma.jdbc.query.SqlFileDeleteQuery.EntityHandler<E>
- Type Parameters:
E- the entity type
- Enclosing class:
- SqlFileDeleteQuery
A handler for entity lifecycle callbacks and optimistic locking.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EThe entity being deleted.protected final EntityType<E>The entity type.protected final StringThe parameter name for the entity.protected final VersionPropertyType<E,?, ?> The version property type for optimistic locking. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEntityHandler(String name, E entity, EntityType<E> entityType) Constructs a new instance with the specified entity information. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidExecutes post-delete entity lifecycle callbacks.protected voidExecutes pre-delete entity lifecycle callbacks.protected voidPrepares optimistic locking for this query.
-
Field Details
-
name
The parameter name for the entity. -
entity
The entity being deleted. -
entityType
The entity type. -
versionPropertyType
The version property type for optimistic locking.
-
-
Constructor Details
-
EntityHandler
Constructs a new instance with the specified entity information.- Parameters:
name- the parameter name for the entityentity- the entity being deletedentityType- 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.
-