public class DbSqlSession extends AbstractPersistenceSession
Modifier and Type | Field and Description |
---|---|
protected String |
connectionMetadataDefaultCatalog |
protected String |
connectionMetadataDefaultSchema |
protected DbSqlSessionFactory |
dbSqlSessionFactory |
static String[] |
JDBC_METADATA_TABLE_TYPES |
protected org.apache.ibatis.session.SqlSession |
sqlSession |
Constructor and Description |
---|
DbSqlSession(DbSqlSessionFactory dbSqlSessionFactory) |
DbSqlSession(DbSqlSessionFactory dbSqlSessionFactory,
Connection connection,
String catalog,
String schema) |
Modifier and Type | Method and Description |
---|---|
protected String |
addMissingComponent(String missingComponents,
String component) |
protected String |
addSqlStatementPiece(String sqlStatement,
String line) |
void |
close() |
void |
commit() |
void |
dbSchemaCheckVersion() |
protected void |
dbSchemaCreateCmmn() |
protected void |
dbSchemaCreateCmmnHistory() |
protected void |
dbSchemaCreateEngine() |
protected void |
dbSchemaCreateHistory() |
protected void |
dbSchemaCreateIdentity() |
protected void |
dbSchemaDropCmmn() |
protected void |
dbSchemaDropCmmnHistory() |
protected void |
dbSchemaDropEngine() |
protected void |
dbSchemaDropHistory() |
protected void |
dbSchemaDropIdentity() |
protected void |
deleteBulk(DbBulkOperation operation) |
protected void |
deleteEntity(DbEntityOperation operation) |
protected void |
entityDeleted(DbEntity entity) |
protected void |
entityInserted(DbEntity entity) |
protected void |
entityUpdated(DbEntity entity) |
protected int |
executeDelete(String deleteStatement,
Object parameter) |
protected void |
executeInsertEntity(String insertStatement,
Object parameter) |
void |
executeMandatorySchemaResource(String operation,
String component) |
void |
executeSchemaResource(String schemaFileResourceName) |
void |
executeSchemaResource(String operation,
String component,
String resourceName,
boolean isOptional) |
protected int |
executeUpdate(String updateStatement,
Object parameter) |
void |
flush() |
DbSqlSessionFactory |
getDbSqlSessionFactory() |
protected String |
getDbVersion() |
String |
getResourceForDbOperation(String directory,
String operation,
String component) |
org.apache.ibatis.session.SqlSession |
getSqlSession() |
protected void |
insertEntity(DbEntityOperation operation) |
boolean |
isCmmnHistoryTablePresent() |
boolean |
isCmmnTablePresent() |
boolean |
isEngineTablePresent() |
boolean |
isHistoryTablePresent() |
boolean |
isIdentityTablePresent() |
protected boolean |
isMissingTablesException(Exception e) |
boolean |
isTablePresent(String tableName) |
void |
lock(String statement) |
protected String |
prependDatabaseTablePrefix(String tableName) |
protected String |
readNextTrimmedLine(BufferedReader reader) |
void |
rollback() |
<T extends DbEntity> |
selectById(Class<T> type,
String id) |
List<?> |
selectList(String statement,
Object parameter) |
Object |
selectOne(String statement,
Object parameter) |
protected String |
toString(Object object) |
protected void |
updateBulk(DbBulkOperation operation) |
protected void |
updateEntity(DbEntityOperation operation) |
dbSchemaCreate, dbSchemaDrop, dbSchemaPrune, dbSchemaUpdate, executeDbOperation
protected org.apache.ibatis.session.SqlSession sqlSession
protected DbSqlSessionFactory dbSqlSessionFactory
protected String connectionMetadataDefaultCatalog
protected String connectionMetadataDefaultSchema
public static String[] JDBC_METADATA_TABLE_TYPES
public DbSqlSession(DbSqlSessionFactory dbSqlSessionFactory)
public DbSqlSession(DbSqlSessionFactory dbSqlSessionFactory, Connection connection, String catalog, String schema)
public void lock(String statement)
protected void insertEntity(DbEntityOperation operation)
insertEntity
in class AbstractPersistenceSession
protected void entityInserted(DbEntity entity)
protected void deleteEntity(DbEntityOperation operation)
deleteEntity
in class AbstractPersistenceSession
protected void entityDeleted(DbEntity entity)
protected void deleteBulk(DbBulkOperation operation)
deleteBulk
in class AbstractPersistenceSession
protected void updateEntity(DbEntityOperation operation)
updateEntity
in class AbstractPersistenceSession
protected void entityUpdated(DbEntity entity)
protected void updateBulk(DbBulkOperation operation)
updateBulk
in class AbstractPersistenceSession
public void flush()
public void close()
public void commit()
public void rollback()
public void dbSchemaCheckVersion()
protected String addMissingComponent(String missingComponents, String component)
protected String getDbVersion()
getDbVersion
in class AbstractPersistenceSession
protected void dbSchemaCreateIdentity()
dbSchemaCreateIdentity
in class AbstractPersistenceSession
protected void dbSchemaCreateHistory()
dbSchemaCreateHistory
in class AbstractPersistenceSession
protected void dbSchemaCreateEngine()
dbSchemaCreateEngine
in class AbstractPersistenceSession
protected void dbSchemaCreateCmmn()
dbSchemaCreateCmmn
in class AbstractPersistenceSession
protected void dbSchemaCreateCmmnHistory()
dbSchemaCreateCmmnHistory
in class AbstractPersistenceSession
protected void dbSchemaDropIdentity()
dbSchemaDropIdentity
in class AbstractPersistenceSession
protected void dbSchemaDropHistory()
dbSchemaDropHistory
in class AbstractPersistenceSession
protected void dbSchemaDropEngine()
dbSchemaDropEngine
in class AbstractPersistenceSession
protected void dbSchemaDropCmmn()
dbSchemaDropCmmn
in class AbstractPersistenceSession
protected void dbSchemaDropCmmnHistory()
dbSchemaDropCmmnHistory
in class AbstractPersistenceSession
public void executeMandatorySchemaResource(String operation, String component)
public boolean isEngineTablePresent()
isEngineTablePresent
in class AbstractPersistenceSession
public boolean isHistoryTablePresent()
isHistoryTablePresent
in class AbstractPersistenceSession
public boolean isIdentityTablePresent()
isIdentityTablePresent
in class AbstractPersistenceSession
public boolean isCmmnTablePresent()
isCmmnTablePresent
in class AbstractPersistenceSession
public boolean isCmmnHistoryTablePresent()
isCmmnHistoryTablePresent
in class AbstractPersistenceSession
public boolean isTablePresent(String tableName)
public String getResourceForDbOperation(String directory, String operation, String component)
public void executeSchemaResource(String operation, String component, String resourceName, boolean isOptional)
public void executeSchemaResource(String schemaFileResourceName)
protected String readNextTrimmedLine(BufferedReader reader) throws IOException
IOException
protected boolean isMissingTablesException(Exception e)
public org.apache.ibatis.session.SqlSession getSqlSession()
public DbSqlSessionFactory getDbSqlSessionFactory()
Copyright © 2018. All rights reserved.