Class DbSqlSessionFactory
java.lang.Object
org.camunda.bpm.engine.impl.db.sql.DbSqlSessionFactory
- All Implemented Interfaces:
SessionFactory
- Author:
- Tom Baeyens
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAccepted values ofProcessEngineConfigurationImpl#mssqlAuthCheckSetOperator.static final Stringstatic final Stringprotected booleanprotected StringIn 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-1062The set operator that the..._mssqlfragment inAuthorization.xmluses to combine the user-grant and group-grant branches of the authorization check.protected Stringprotected Stringstatic final Stringprotected booleanstatic final Stringprotected IdGeneratorprotected booleanprotected booleanprotected booleanstatic final Stringstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected org.apache.ibatis.session.SqlSessionFactorystatic final String[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddDatabaseSpecificStatement(String databaseType, String activitiStatement, String ibatisStatement) getDeleteStatement(Class<?> persistentObjectClass) getInsertStatement(DbEntity object) getSelectStatement(Class<?> persistentObjectClass) Class<?>org.apache.ibatis.session.SqlSessionFactorygetUpdateStatement(DbEntity object) booleanbooleanbooleanbooleanmapStatement(String statement) openSession(Connection connection, String catalog, String schema) voidsetCmmnEnabled(boolean cmmnEnabled) voidsetDatabaseSchema(String databaseSchema) voidsetDatabaseTablePrefix(String databaseTablePrefix) voidsetDatabaseType(String databaseType) voidsetDbHistoryUsed(boolean isDbHistoryUsed) voidsetDbIdentityUsed(boolean isDbIdentityUsed) voidsetDeleteStatements(Map<Class<?>, String> deleteStatements) voidsetDmnEnabled(boolean dmnEnabled) voidsetIdGenerator(IdGenerator idGenerator) voidsetInsertStatements(Map<Class<?>, String> insertStatements) voidsetSelectStatements(Map<Class<?>, String> selectStatements) voidsetSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory) voidsetStatementMappings(Map<String, String> statementMappings) voidsetUpdateStatements(Map<Class<?>, String> updateStatements)
-
Field Details
-
MSSQL
- See Also:
-
DB2
- See Also:
-
ORACLE
- See Also:
-
H2
- See Also:
-
MYSQL
- See Also:
-
POSTGRES
- See Also:
-
MARIADB
- See Also:
-
SUPPORTED_DATABASES
-
databaseSpecificStatements
-
databaseSpecificLimitBeforeStatements
-
databaseSpecificLimitAfterStatements
-
databaseSpecificLimitBeforeWithoutOffsetStatements
-
databaseSpecificLimitAfterWithoutOffsetStatements
-
databaseSpecificInnerLimitAfterStatements
-
databaseSpecificLimitBetweenStatements
-
databaseSpecificLimitBetweenFilterStatements
-
databaseSpecificLimitBetweenAcquisitionStatements
-
databaseSpecificLimitBeforeInUpdate
-
databaseSpecificLimitAfterInUpdate
-
databaseSpecificCountDistinctBeforeStart
-
databaseSpecificCountDistinctBeforeEnd
-
databaseSpecificCountDistinctAfterEnd
-
optimizeDatabaseSpecificLimitBeforeWithoutOffsetStatements
-
optimizeDatabaseSpecificLimitAfterWithoutOffsetStatements
-
databaseSpecificEscapeChar
-
databaseSpecificOrderByStatements
-
databaseSpecificLimitBeforeNativeQueryStatements
-
databaseSpecificBitAnd1
-
databaseSpecificBitAnd2
-
databaseSpecificBitAnd3
-
databaseSpecificDatepart1
-
databaseSpecificDatepart2
-
databaseSpecificDatepart3
-
databaseSpecificDummyTable
-
databaseSpecificIfNull
-
databaseSpecificTrueConstant
-
databaseSpecificFalseConstant
-
databaseSpecificDistinct
-
databaseSpecificNumericCast
-
dbSpecificConstants
-
databaseSpecificDaysComparator
-
databaseSpecificCollationForCaseSensitivity
-
databaseSpecificAuthJoinStart
-
databaseSpecificAuthJoinEnd
-
databaseSpecificAuthJoinSeparator
-
databaseSpecificAuth1JoinStart
-
databaseSpecificAuth1JoinEnd
-
databaseSpecificAuth1JoinSeparator
-
databaseSpecificExtractTimeUnitFromDate
-
databaseSpecificAuthCheckMethodSuffix
-
databaseSpecificAuthCheckSetOperator
The set operator that the..._mssqlfragment inAuthorization.xmluses to combine the user-grant and group-grant branches of the authorization check. Only populated forMSSQL; every other database uses a singleOR-based fragment with no set operator.The branches are disjoint - an authorization row has either a
USER_ID_or aGROUP_ID_, never both (seeSaveAuthorizationCmd#validateAuthorizationStructure) - and each selectsA.*, including the primary key, so no two rows from them can ever be equal.UNIONandUNION ALLtherefore always return identical rows here; only the execution plan differs.The compiled-in default only; installations override it individually via
ProcessEngineConfigurationImpl#mssqlAuthCheckSetOperator, which documents why the default is deliberately left unchanged rather than flipped again. -
AUTH_CHECK_SET_OPERATOR_OR
Accepted values ofProcessEngineConfigurationImpl#mssqlAuthCheckSetOperator.AUTH_CHECK_SET_OPERATOR_ORis not substituted as a set operator: it selects the generic, database-independentauthCheckJoinWithoutOnClauseWithBindingfragment (plainOR, noUNION) on SQL Server too - the fragment SQL Server itself used before3151c40896introduced theUNION-based variant.- See Also:
-
AUTH_CHECK_SET_OPERATOR_UNION
- See Also:
-
AUTH_CHECK_SET_OPERATOR_UNION_ALL
- See Also:
-
MAXIMUM_NUMBER_PARAMS
public static final int MAXIMUM_NUMBER_PARAMS- See Also:
-
databaseType
-
databaseTablePrefix
-
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
-
statementMappings
-
insertStatements
-
updateStatements
-
deleteStatements
-
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
- Specified by:
getSessionTypein interfaceSessionFactory
-
openSession
- Specified by:
openSessionin interfaceSessionFactory
-
openSession
-
getInsertStatement
-
getUpdateStatement
-
getDeleteStatement
-
getSelectStatement
-
addDatabaseSpecificStatement
-
mapStatement
-
setDatabaseType
-
getSqlSessionFactory
public org.apache.ibatis.session.SqlSessionFactory getSqlSessionFactory() -
setSqlSessionFactory
public void setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory) -
getIdGenerator
-
setIdGenerator
-
getDatabaseType
-
getStatementMappings
-
setStatementMappings
-
getInsertStatements
-
setInsertStatements
-
getUpdateStatements
-
setUpdateStatements
-
getDeleteStatements
-
setDeleteStatements
-
getSelectStatements
-
setSelectStatements
-
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
-
getDatabaseTablePrefix
-
getDatabaseSchema
-
setDatabaseSchema
-