Class DbSqlSessionFactory

java.lang.Object
org.camunda.bpm.engine.impl.db.sql.DbSqlSessionFactory
All Implemented Interfaces:
SessionFactory

public class DbSqlSessionFactory extends Object implements SessionFactory
Author:
Tom Baeyens
  • Field Details

    • MSSQL

      public static final String MSSQL
      See Also:
    • DB2

      public static final String DB2
      See Also:
    • ORACLE

      public static final String ORACLE
      See Also:
    • H2

      public static final String H2
      See Also:
    • MYSQL

      public static final String MYSQL
      See Also:
    • POSTGRES

      public static final String POSTGRES
      See Also:
    • MARIADB

      public static final String MARIADB
      See Also:
    • CRDB

      public static final String CRDB
      See Also:
    • SUPPORTED_DATABASES

      public static final String[] SUPPORTED_DATABASES
    • databaseSpecificStatements

      protected static final Map<String,Map<String,String>> databaseSpecificStatements
    • databaseSpecificLimitBeforeStatements

      public static final Map<String,String> databaseSpecificLimitBeforeStatements
    • databaseSpecificLimitAfterStatements

      public static final Map<String,String> databaseSpecificLimitAfterStatements
    • databaseSpecificLimitBeforeWithoutOffsetStatements

      public static final Map<String,String> databaseSpecificLimitBeforeWithoutOffsetStatements
    • databaseSpecificLimitAfterWithoutOffsetStatements

      public static final Map<String,String> databaseSpecificLimitAfterWithoutOffsetStatements
    • databaseSpecificInnerLimitAfterStatements

      public static final Map<String,String> databaseSpecificInnerLimitAfterStatements
    • databaseSpecificLimitBetweenStatements

      public static final Map<String,String> databaseSpecificLimitBetweenStatements
    • databaseSpecificLimitBetweenFilterStatements

      public static final Map<String,String> databaseSpecificLimitBetweenFilterStatements
    • databaseSpecificLimitBetweenAcquisitionStatements

      public static final Map<String,String> databaseSpecificLimitBetweenAcquisitionStatements
    • databaseSpecificLimitBeforeInUpdate

      public static final Map<String,String> databaseSpecificLimitBeforeInUpdate
    • databaseSpecificLimitAfterInUpdate

      public static final Map<String,String> databaseSpecificLimitAfterInUpdate
    • databaseSpecificCountDistinctBeforeStart

      public static final Map<String,String> databaseSpecificCountDistinctBeforeStart
    • databaseSpecificCountDistinctBeforeEnd

      public static final Map<String,String> databaseSpecificCountDistinctBeforeEnd
    • databaseSpecificCountDistinctAfterEnd

      public static final Map<String,String> databaseSpecificCountDistinctAfterEnd
    • optimizeDatabaseSpecificLimitBeforeWithoutOffsetStatements

      public static final Map<String,String> optimizeDatabaseSpecificLimitBeforeWithoutOffsetStatements
    • optimizeDatabaseSpecificLimitAfterWithoutOffsetStatements

      public static final Map<String,String> optimizeDatabaseSpecificLimitAfterWithoutOffsetStatements
    • databaseSpecificEscapeChar

      public static final Map<String,String> databaseSpecificEscapeChar
    • databaseSpecificOrderByStatements

      public static final Map<String,String> databaseSpecificOrderByStatements
    • databaseSpecificLimitBeforeNativeQueryStatements

      public static final Map<String,String> databaseSpecificLimitBeforeNativeQueryStatements
    • databaseSpecificBitAnd1

      public static final Map<String,String> databaseSpecificBitAnd1
    • databaseSpecificBitAnd2

      public static final Map<String,String> databaseSpecificBitAnd2
    • databaseSpecificBitAnd3

      public static final Map<String,String> databaseSpecificBitAnd3
    • databaseSpecificDatepart1

      public static final Map<String,String> databaseSpecificDatepart1
    • databaseSpecificDatepart2

      public static final Map<String,String> databaseSpecificDatepart2
    • databaseSpecificDatepart3

      public static final Map<String,String> databaseSpecificDatepart3
    • databaseSpecificDummyTable

      public static final Map<String,String> databaseSpecificDummyTable
    • databaseSpecificIfNull

      public static final Map<String,String> databaseSpecificIfNull
    • databaseSpecificTrueConstant

      public static final Map<String,String> databaseSpecificTrueConstant
    • databaseSpecificFalseConstant

      public static final Map<String,String> databaseSpecificFalseConstant
    • databaseSpecificDistinct

      public static final Map<String,String> databaseSpecificDistinct
    • databaseSpecificNumericCast

      public static final Map<String,String> databaseSpecificNumericCast
    • dbSpecificConstants

      public static final Map<String,Map<String,String>> dbSpecificConstants
    • databaseSpecificDaysComparator

      public static final Map<String,String> databaseSpecificDaysComparator
    • databaseSpecificCollationForCaseSensitivity

      public static final Map<String,String> databaseSpecificCollationForCaseSensitivity
    • databaseSpecificAuthJoinStart

      public static final Map<String,String> databaseSpecificAuthJoinStart
    • databaseSpecificAuthJoinEnd

      public static final Map<String,String> databaseSpecificAuthJoinEnd
    • databaseSpecificAuthJoinSeparator

      public static final Map<String,String> databaseSpecificAuthJoinSeparator
    • databaseSpecificAuth1JoinStart

      public static final Map<String,String> databaseSpecificAuth1JoinStart
    • databaseSpecificAuth1JoinEnd

      public static final Map<String,String> databaseSpecificAuth1JoinEnd
    • databaseSpecificAuth1JoinSeparator

      public static final Map<String,String> databaseSpecificAuth1JoinSeparator
    • databaseSpecificExtractTimeUnitFromDate

      public static final Map<String,String> databaseSpecificExtractTimeUnitFromDate
    • databaseSpecificAuthCheckMethodSuffix

      public static final Map<String,String> databaseSpecificAuthCheckMethodSuffix
    • MAXIMUM_NUMBER_PARAMS

      public static final int MAXIMUM_NUMBER_PARAMS
      See Also:
    • databaseType

      protected String databaseType
    • databaseTablePrefix

      protected String databaseTablePrefix
    • databaseSchema

      protected String databaseSchema
      In some situations you want to set the schema to use for table checks / generation if the database metadata doesn't return that correctly, see https://jira.codehaus.org/browse/ACT-1220, https://jira.codehaus.org/browse/ACT-1062
    • sqlSessionFactory

      protected org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory
    • idGenerator

      protected IdGenerator idGenerator
    • statementMappings

      protected Map<String,String> statementMappings
    • insertStatements

      protected Map<Class<?>,String> insertStatements
    • updateStatements

      protected Map<Class<?>,String> updateStatements
    • deleteStatements

      protected Map<Class<?>,String> deleteStatements
    • selectStatements

      protected Map<Class<?>,String> selectStatements
    • isDbIdentityUsed

      protected boolean isDbIdentityUsed
    • isDbHistoryUsed

      protected boolean isDbHistoryUsed
    • cmmnEnabled

      protected boolean cmmnEnabled
    • dmnEnabled

      protected boolean dmnEnabled
    • jdbcBatchProcessing

      protected boolean jdbcBatchProcessing
  • Constructor Details

    • DbSqlSessionFactory

      public DbSqlSessionFactory(boolean jdbcBatchProcessing)
  • Method Details

    • getSessionType

      public Class<?> getSessionType()
      Specified by:
      getSessionType in interface SessionFactory
    • openSession

      public Session openSession()
      Specified by:
      openSession in interface SessionFactory
    • openSession

      public DbSqlSession openSession(Connection connection, String catalog, String schema)
    • getInsertStatement

      public String getInsertStatement(DbEntity object)
    • getUpdateStatement

      public String getUpdateStatement(DbEntity object)
    • getDeleteStatement

      public String getDeleteStatement(Class<?> persistentObjectClass)
    • getSelectStatement

      public String getSelectStatement(Class<?> persistentObjectClass)
    • addDatabaseSpecificStatement

      protected static void addDatabaseSpecificStatement(String databaseType, String activitiStatement, String ibatisStatement)
    • mapStatement

      public String mapStatement(String statement)
    • setDatabaseType

      public void setDatabaseType(String databaseType)
    • getSqlSessionFactory

      public org.apache.ibatis.session.SqlSessionFactory getSqlSessionFactory()
    • setSqlSessionFactory

      public void setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)
    • getIdGenerator

      public IdGenerator getIdGenerator()
    • setIdGenerator

      public void setIdGenerator(IdGenerator idGenerator)
    • getDatabaseType

      public String getDatabaseType()
    • getStatementMappings

      public Map<String,String> getStatementMappings()
    • setStatementMappings

      public void setStatementMappings(Map<String,String> statementMappings)
    • getInsertStatements

      public Map<Class<?>,String> getInsertStatements()
    • setInsertStatements

      public void setInsertStatements(Map<Class<?>,String> insertStatements)
    • getUpdateStatements

      public Map<Class<?>,String> getUpdateStatements()
    • setUpdateStatements

      public void setUpdateStatements(Map<Class<?>,String> updateStatements)
    • getDeleteStatements

      public Map<Class<?>,String> getDeleteStatements()
    • setDeleteStatements

      public void setDeleteStatements(Map<Class<?>,String> deleteStatements)
    • getSelectStatements

      public Map<Class<?>,String> getSelectStatements()
    • setSelectStatements

      public void setSelectStatements(Map<Class<?>,String> selectStatements)
    • isDbIdentityUsed

      public boolean isDbIdentityUsed()
    • setDbIdentityUsed

      public void setDbIdentityUsed(boolean isDbIdentityUsed)
    • isDbHistoryUsed

      public boolean isDbHistoryUsed()
    • setDbHistoryUsed

      public void setDbHistoryUsed(boolean isDbHistoryUsed)
    • isCmmnEnabled

      public boolean isCmmnEnabled()
    • setCmmnEnabled

      public void setCmmnEnabled(boolean cmmnEnabled)
    • isDmnEnabled

      public boolean isDmnEnabled()
    • setDmnEnabled

      public void setDmnEnabled(boolean dmnEnabled)
    • setDatabaseTablePrefix

      public void setDatabaseTablePrefix(String databaseTablePrefix)
    • getDatabaseTablePrefix

      public String getDatabaseTablePrefix()
    • getDatabaseSchema

      public String getDatabaseSchema()
    • setDatabaseSchema

      public void setDatabaseSchema(String databaseSchema)