Class DbSqlSessionFactory

  • All Implemented Interfaces:
    SessionFactory

    public class DbSqlSessionFactory
    extends java.lang.Object
    implements SessionFactory
    Author:
    Tom Baeyens
    • Field Detail

      • SUPPORTED_DATABASES

        public static final java.lang.String[] SUPPORTED_DATABASES
      • databaseSpecificStatements

        protected static final java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> databaseSpecificStatements
      • databaseSpecificLimitBeforeStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificLimitBeforeStatements
      • databaseSpecificLimitAfterStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificLimitAfterStatements
      • databaseSpecificLimitBeforeWithoutOffsetStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificLimitBeforeWithoutOffsetStatements
      • databaseSpecificLimitAfterWithoutOffsetStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificLimitAfterWithoutOffsetStatements
      • databaseSpecificInnerLimitAfterStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificInnerLimitAfterStatements
      • databaseSpecificLimitBetweenStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificLimitBetweenStatements
      • databaseSpecificLimitBetweenFilterStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificLimitBetweenFilterStatements
      • databaseSpecificLimitBetweenAcquisitionStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificLimitBetweenAcquisitionStatements
      • databaseSpecificCountDistinctBeforeStart

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificCountDistinctBeforeStart
      • databaseSpecificCountDistinctBeforeEnd

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificCountDistinctBeforeEnd
      • databaseSpecificCountDistinctAfterEnd

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificCountDistinctAfterEnd
      • optimizeDatabaseSpecificLimitBeforeWithoutOffsetStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> optimizeDatabaseSpecificLimitBeforeWithoutOffsetStatements
      • optimizeDatabaseSpecificLimitAfterWithoutOffsetStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> optimizeDatabaseSpecificLimitAfterWithoutOffsetStatements
      • databaseSpecificEscapeChar

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificEscapeChar
      • databaseSpecificOrderByStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificOrderByStatements
      • databaseSpecificLimitBeforeNativeQueryStatements

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificLimitBeforeNativeQueryStatements
      • databaseSpecificBitAnd1

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificBitAnd1
      • databaseSpecificBitAnd2

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificBitAnd2
      • databaseSpecificBitAnd3

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificBitAnd3
      • databaseSpecificDatepart1

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificDatepart1
      • databaseSpecificDatepart2

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificDatepart2
      • databaseSpecificDatepart3

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificDatepart3
      • databaseSpecificDummyTable

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificDummyTable
      • databaseSpecificIfNull

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificIfNull
      • databaseSpecificTrueConstant

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificTrueConstant
      • databaseSpecificFalseConstant

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificFalseConstant
      • databaseSpecificDistinct

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificDistinct
      • databaseSpecificNumericCast

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificNumericCast
      • dbSpecificConstants

        public static final java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> dbSpecificConstants
      • databaseSpecificDaysComparator

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificDaysComparator
      • databaseSpecificCollationForCaseSensitivity

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificCollationForCaseSensitivity
      • databaseSpecificAuthJoinStart

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificAuthJoinStart
      • databaseSpecificAuthJoinEnd

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificAuthJoinEnd
      • databaseSpecificAuthJoinSeparator

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificAuthJoinSeparator
      • databaseSpecificAuth1JoinStart

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificAuth1JoinStart
      • databaseSpecificAuth1JoinEnd

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificAuth1JoinEnd
      • databaseSpecificAuth1JoinSeparator

        public static final java.util.Map<java.lang.String,​java.lang.String> databaseSpecificAuth1JoinSeparator
      • databaseType

        protected java.lang.String databaseType
      • databaseTablePrefix

        protected java.lang.String databaseTablePrefix
      • databaseSchema

        protected java.lang.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
      • statementMappings

        protected java.util.Map<java.lang.String,​java.lang.String> statementMappings
      • insertStatements

        protected java.util.Map<java.lang.Class<?>,​java.lang.String> insertStatements
      • updateStatements

        protected java.util.Map<java.lang.Class<?>,​java.lang.String> updateStatements
      • deleteStatements

        protected java.util.Map<java.lang.Class<?>,​java.lang.String> deleteStatements
      • selectStatements

        protected java.util.Map<java.lang.Class<?>,​java.lang.String> selectStatements
      • isDbIdentityUsed

        protected boolean isDbIdentityUsed
      • isDbHistoryUsed

        protected boolean isDbHistoryUsed
      • cmmnEnabled

        protected boolean cmmnEnabled
      • dmnEnabled

        protected boolean dmnEnabled
      • jdbcBatchProcessing

        protected boolean jdbcBatchProcessing
    • Constructor Detail

      • DbSqlSessionFactory

        public DbSqlSessionFactory​(boolean jdbcBatchProcessing)
    • Method Detail

      • openSession

        public DbSqlSession openSession​(java.sql.Connection connection,
                                        java.lang.String catalog,
                                        java.lang.String schema)
      • getInsertStatement

        public java.lang.String getInsertStatement​(DbEntity object)
      • getUpdateStatement

        public java.lang.String getUpdateStatement​(DbEntity object)
      • getDeleteStatement

        public java.lang.String getDeleteStatement​(java.lang.Class<?> persistentObjectClass)
      • getSelectStatement

        public java.lang.String getSelectStatement​(java.lang.Class<?> persistentObjectClass)
      • addDatabaseSpecificStatement

        protected static void addDatabaseSpecificStatement​(java.lang.String databaseType,
                                                           java.lang.String activitiStatement,
                                                           java.lang.String ibatisStatement)
      • mapStatement

        public java.lang.String mapStatement​(java.lang.String statement)
      • setDatabaseType

        public void setDatabaseType​(java.lang.String databaseType)
      • getSqlSessionFactory

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

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

        public void setIdGenerator​(IdGenerator idGenerator)
      • getDatabaseType

        public java.lang.String getDatabaseType()
      • getStatementMappings

        public java.util.Map<java.lang.String,​java.lang.String> getStatementMappings()
      • setStatementMappings

        public void setStatementMappings​(java.util.Map<java.lang.String,​java.lang.String> statementMappings)
      • getInsertStatements

        public java.util.Map<java.lang.Class<?>,​java.lang.String> getInsertStatements()
      • setInsertStatements

        public void setInsertStatements​(java.util.Map<java.lang.Class<?>,​java.lang.String> insertStatements)
      • getUpdateStatements

        public java.util.Map<java.lang.Class<?>,​java.lang.String> getUpdateStatements()
      • setUpdateStatements

        public void setUpdateStatements​(java.util.Map<java.lang.Class<?>,​java.lang.String> updateStatements)
      • getDeleteStatements

        public java.util.Map<java.lang.Class<?>,​java.lang.String> getDeleteStatements()
      • setDeleteStatements

        public void setDeleteStatements​(java.util.Map<java.lang.Class<?>,​java.lang.String> deleteStatements)
      • getSelectStatements

        public java.util.Map<java.lang.Class<?>,​java.lang.String> getSelectStatements()
      • setSelectStatements

        public void setSelectStatements​(java.util.Map<java.lang.Class<?>,​java.lang.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​(java.lang.String databaseTablePrefix)
      • getDatabaseTablePrefix

        public java.lang.String getDatabaseTablePrefix()
      • getDatabaseSchema

        public java.lang.String getDatabaseSchema()
      • setDatabaseSchema

        public void setDatabaseSchema​(java.lang.String databaseSchema)