protected class AbstractSqlRepositoryOperations.StoredSqlOperation extends AbstractSqlRepositoryOperations.SqlOperation
AbstractSqlRepositoryOperations.SqlOperation
that uses bindging paths.Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
autoPopulatedPreviousProperties |
protected boolean |
expandedQuery |
protected boolean |
isOptimisticLock |
protected java.lang.String[] |
parameterBindingPaths |
dialect, query
Modifier | Constructor and Description |
---|---|
protected |
StoredSqlOperation(Dialect dialect,
java.lang.String query,
java.lang.String[] parameterBindingPaths,
java.lang.String[] autoPopulatedPreviousProperties,
boolean isOptimisticLock)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
<T> void |
checkForParameterToBeExpanded(RuntimePersistentEntity<T> persistentEntity,
T entity,
SqlQueryBuilder queryBuilder)
Check if query need to be modified to expand parameters.
|
<T> java.util.Map<java.lang.String,java.lang.Object> |
collectAutoPopulatedPreviousValues(RuntimePersistentEntity<T> persistentEntity,
T entity)
Collect auto-populated property values before pre-actions are triggered and property values are modified.
|
boolean |
isOptimisticLock()
Return true if query contains previous version check.
|
<T> void |
setParameters(PS stmt,
RuntimePersistentEntity<T> persistentEntity,
T entity,
java.util.Map<java.lang.String,java.lang.Object> previousValues)
Set query parameters.
|
exandedQuery, getDialect, getQuery, setParameters
protected final java.lang.String[] parameterBindingPaths
protected final java.lang.String[] autoPopulatedPreviousProperties
protected final boolean isOptimisticLock
protected boolean expandedQuery
protected StoredSqlOperation(Dialect dialect, java.lang.String query, java.lang.String[] parameterBindingPaths, java.lang.String[] autoPopulatedPreviousProperties, boolean isOptimisticLock)
dialect
- The dialect.query
- The queryparameterBindingPaths
- The parameterBindingPathsautoPopulatedPreviousProperties
- The autoPopulatedPreviousPropertiesisOptimisticLock
- Is optimistic lockingpublic boolean isOptimisticLock()
AbstractSqlRepositoryOperations.SqlOperation
should be thrown.
isOptimisticLock
in class AbstractSqlRepositoryOperations.SqlOperation
public <T> java.util.Map<java.lang.String,java.lang.Object> collectAutoPopulatedPreviousValues(RuntimePersistentEntity<T> persistentEntity, T entity)
AbstractSqlRepositoryOperations.SqlOperation
collectAutoPopulatedPreviousValues
in class AbstractSqlRepositoryOperations.SqlOperation
T
- The entity typepersistentEntity
- The persistent entityentity
- The entity instancepublic <T> void checkForParameterToBeExpanded(RuntimePersistentEntity<T> persistentEntity, T entity, SqlQueryBuilder queryBuilder)
T
- The entity typepersistentEntity
- The persistentEntityentity
- The entity instancequeryBuilder
- The queryBuilderpublic <T> void setParameters(PS stmt, RuntimePersistentEntity<T> persistentEntity, T entity, java.util.Map<java.lang.String,java.lang.Object> previousValues)
AbstractSqlRepositoryOperations.SqlOperation
setParameters
in class AbstractSqlRepositoryOperations.SqlOperation
T
- The entity typestmt
- The statementpersistentEntity
- The persistentEntityentity
- The entitypreviousValues
- The previous auto-populated collected values