Class SQLMaintainBuilder
java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.service.data.builder.AbstractQueryBuilder
com.almis.awe.service.data.builder.SQLBuilder
com.almis.awe.service.data.builder.SQLMaintainBuilder
- All Implemented Interfaces:
QueryBuilder
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
Generates SQL for maintain operations
- Author:
- jbellon
-
Field Summary
Fields inherited from class com.almis.awe.service.data.builder.AbstractQueryBuilder
componentSortList, parameters, queryUtil, variableIndex, variables
-
Constructor Summary
ConstructorDescriptionSQLMaintainBuilder
(QueryUtil queryUtil, EncodeService encodeService, DatabaseConfigProperties databaseConfigProperties) Autowired constructor -
Method Summary
Modifier and TypeMethodDescriptioncom.querydsl.sql.dml.AbstractSQLClause<?>
build()
Builds the SQLQuerygetSequence
(String sequence) Retrieves and updates the value for the sequencesetAudit
(boolean audit) Sets whether if that maintain it's the audit operation or notsetFactory
(com.querydsl.sql.SQLQueryFactory factory) Sets the SQLQueryFactory used by QueryDSL to create the SQLQuerysetMaintain
(MaintainQuery maintain) Sets the Query created from XMLsetOperation
(MaintainBuildOperation operation) Sets whether if that maintain should be treated as batchsetParameters
(com.fasterxml.jackson.databind.node.ObjectNode parameterMap) setPreviousQuery
(com.querydsl.sql.dml.AbstractSQLClause<?> previousQuery) Sets already batched queries so this query can be addedsetVariableIndex
(Integer variableIndex) Sets whether if that maintain it's the audit operation or notsetVariables
(Map<String, QueryParameter> parameterMap) Set variablesMethods inherited from class com.almis.awe.service.data.builder.SQLBuilder
buildPath, buildPath, buildPath, generateOperationExpression, getCaseExpression, getConstantExpression, getExpressionCast, getExpressionFunction, getFactory, getFieldAliasExpression, getFieldExpression, getFilterGroups, getOperandExpression, getOperationExpression, getOrderByExpression, getOverExpression, getSimpleFieldExpression, getSqlFieldExpression, getStringExpression, getSubquery, getTable, getTableExpression, getVariableAsExpression, getVariableAsExpressionOrEmpty, getVariableAsExpressionOrNull, getVariableExpression
Methods inherited from class com.almis.awe.service.data.builder.AbstractQueryBuilder
addComponentSort, extractValuesFromParameters, getVariableAsString, getVariables, transformFromJsonNode
Methods inherited from class com.almis.awe.config.ServiceConfig
containsBean, getApplicationContext, getBean, getBean, getElements, getLocale, getLocale, getProperty, getProperty, getRequest, getSession, setApplicationContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.almis.awe.service.data.builder.QueryBuilder
setQuery
-
Constructor Details
-
SQLMaintainBuilder
public SQLMaintainBuilder(QueryUtil queryUtil, EncodeService encodeService, DatabaseConfigProperties databaseConfigProperties) Autowired constructor- Parameters:
queryUtil
- Query utilitiesencodeService
- Encode servicedatabaseConfigProperties
- Database config properties
-
-
Method Details
-
setMaintain
Sets the Query created from XML- Parameters:
maintain
- Maintain query- Returns:
- this
-
setAudit
Sets whether if that maintain it's the audit operation or not- Parameters:
audit
- Audit- Returns:
- this
-
setOperation
Sets whether if that maintain should be treated as batch- Parameters:
operation
- Maintain operation- Returns:
- this
-
setPreviousQuery
Sets already batched queries so this query can be added- Parameters:
previousQuery
- Previous query- Returns:
- this
-
setVariableIndex
Sets whether if that maintain it's the audit operation or not- Parameters:
variableIndex
- Variable index- Returns:
- this
-
setFactory
Description copied from class:SQLBuilder
Sets the SQLQueryFactory used by QueryDSL to create the SQLQuery- Overrides:
setFactory
in classSQLBuilder
- Parameters:
factory
- Factory- Returns:
- this
-
setVariables
Description copied from class:AbstractQueryBuilder
Set variables- Specified by:
setVariables
in interfaceQueryBuilder
- Overrides:
setVariables
in classAbstractQueryBuilder
- Parameters:
parameterMap
- Parameter map- Returns:
- this
-
setParameters
public SQLMaintainBuilder setParameters(com.fasterxml.jackson.databind.node.ObjectNode parameterMap) -
build
Builds the SQLQuery- Returns:
- SQLQuery prepared for fetch
- Throws:
AWException
- Error building maintain
-
getSequence
Retrieves and updates the value for the sequence- Returns:
- value
- Throws:
AWException
- Error retrieving sequence value
-