Module org.seasar.doma.core
Package org.seasar.doma.jdbc.query
Class SqlFileBatchUpdateQuery.SqlFileBatchPreUpdateContext<E>
java.lang.Object
org.seasar.doma.internal.jdbc.entity.AbstractEntityListenerContext<E>
org.seasar.doma.internal.jdbc.entity.AbstractPreUpdateContext<E>
org.seasar.doma.jdbc.query.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.
-
Field Summary
Fields inherited from class org.seasar.doma.internal.jdbc.entity.AbstractEntityListenerContext
config, entityType, method, newEntity -
Constructor Summary
ConstructorsConstructorDescriptionSqlFileBatchPreUpdateContext(EntityType<E> entityType, Method method, Config config) Constructs a new instance with the specified entity information. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether the entity has been changed since it was last read from the database.booleanisPropertyChanged(String propertyName) Determines whether a specific property of the entity has been changed.Methods inherited from class org.seasar.doma.internal.jdbc.entity.AbstractPreUpdateContext
validatePropertyDefinedMethods inherited from class org.seasar.doma.internal.jdbc.entity.AbstractEntityListenerContext
getConfig, getEntityType, getMethod, getNewEntity, isPropertyDefinedInternal, setNewEntityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.seasar.doma.jdbc.entity.PreUpdateContext
getConfig, getEntityType, getMethod, getNewEntity, getReturningProperties, setNewEntity
-
Constructor Details
-
SqlFileBatchPreUpdateContext
Constructs a new instance with the specified entity information.- Parameters:
entityType- the entity typemethod- the methodconfig- 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
OriginalStatesfield.This method always returns
truewhenUpdate.sqlFile()returnstrue, as SQL file-based updates do not perform change detection.This implementation always returns true for batch operations.
- Returns:
trueif the entity has been changed,falseotherwise- See Also:
-
isPropertyChanged
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
OriginalStatesfield.This method always returns
truewhenUpdate.sqlFile()returnstrue, 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:
trueif the property has been changed,falseotherwise- See Also:
-