Class SQLMaintainBuilder

All Implemented Interfaces:
QueryBuilder, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class SQLMaintainBuilder extends SQLBuilder
Generates SQL for maintain operations
Author:
jbellon
  • Constructor Details

    • SQLMaintainBuilder

      public SQLMaintainBuilder(QueryUtil queryUtil, EncodeService encodeService, DatabaseConfigProperties databaseConfigProperties)
      Autowired constructor
      Parameters:
      queryUtil - Query utilities
      encodeService - Encode service
      databaseConfigProperties - Database config properties
  • Method Details

    • setMaintain

      public SQLMaintainBuilder setMaintain(MaintainQuery maintain)
      Sets the Query created from XML
      Parameters:
      maintain - Maintain query
      Returns:
      this
    • setAudit

      public SQLMaintainBuilder setAudit(boolean audit)
      Sets whether if that maintain it's the audit operation or not
      Parameters:
      audit - Audit
      Returns:
      this
    • setOperation

      public SQLMaintainBuilder setOperation(MaintainBuildOperation operation)
      Sets whether if that maintain should be treated as batch
      Parameters:
      operation - Maintain operation
      Returns:
      this
    • setPreviousQuery

      public SQLMaintainBuilder setPreviousQuery(com.querydsl.sql.dml.AbstractSQLClause<?> previousQuery)
      Sets already batched queries so this query can be added
      Parameters:
      previousQuery - Previous query
      Returns:
      this
    • setVariableIndex

      public SQLMaintainBuilder setVariableIndex(Integer variableIndex)
      Sets whether if that maintain it's the audit operation or not
      Parameters:
      variableIndex - Variable index
      Returns:
      this
    • setFactory

      public SQLMaintainBuilder setFactory(com.querydsl.sql.SQLQueryFactory factory)
      Description copied from class: SQLBuilder
      Sets the SQLQueryFactory used by QueryDSL to create the SQLQuery
      Overrides:
      setFactory in class SQLBuilder
      Parameters:
      factory - Factory
      Returns:
      this
    • setVariables

      public SQLMaintainBuilder setVariables(Map<String,QueryParameter> parameterMap)
      Description copied from class: AbstractQueryBuilder
      Set variables
      Specified by:
      setVariables in interface QueryBuilder
      Overrides:
      setVariables in class AbstractQueryBuilder
      Parameters:
      parameterMap - Parameter map
      Returns:
      this
    • setParameters

      public SQLMaintainBuilder setParameters(com.fasterxml.jackson.databind.node.ObjectNode parameterMap)
    • build

      public com.querydsl.sql.dml.AbstractSQLClause<?> build() throws AWException
      Builds the SQLQuery
      Returns:
      SQLQuery prepared for fetch
      Throws:
      AWException - Error building maintain
    • getSequence

      public String getSequence(String sequence) throws AWException
      Retrieves and updates the value for the sequence
      Returns:
      value
      Throws:
      AWException - Error retrieving sequence value