public abstract class AbstractSQLSessionFactory extends Object implements br.com.anteros.persistence.session.SQLSessionFactory
| Modifier and Type | Field and Description |
|---|---|
protected br.com.anteros.persistence.session.configuration.SessionFactoryConfiguration |
configuration |
protected br.com.anteros.persistence.session.context.CurrentSQLSessionContext |
currentSessionContext |
protected DataSource |
dataSource |
protected br.com.anteros.persistence.sql.dialect.DatabaseDialect |
dialect |
protected br.com.anteros.persistence.metadata.EntityCacheManager |
entityCacheManager |
| Constructor and Description |
|---|
AbstractSQLSessionFactory(br.com.anteros.persistence.metadata.EntityCacheManager entityCacheManager,
DataSource dataSource,
br.com.anteros.persistence.session.configuration.SessionFactoryConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
afterGenerateDDL(br.com.anteros.persistence.session.SQLSession session) |
abstract void |
beforeGenerateDDL(br.com.anteros.persistence.session.SQLSession session) |
protected br.com.anteros.persistence.session.context.CurrentSQLSessionContext |
buildCurrentSessionContext() |
void |
generateDDL() |
void |
generateDDL(br.com.anteros.persistence.schema.type.TableCreationType databaseDDLType,
br.com.anteros.persistence.schema.type.TableCreationType scriptDDLType,
Boolean createReferentialIntegrity) |
int |
getBatchSize() |
br.com.anteros.persistence.session.configuration.SessionFactoryConfiguration |
getConfiguration() |
br.com.anteros.persistence.session.SQLSession |
getCurrentSession() |
DataSource |
getDatasource() |
DataSource |
getDataSource() |
br.com.anteros.persistence.sql.dialect.DatabaseDialect |
getDialect() |
br.com.anteros.persistence.metadata.EntityCacheManager |
getEntityCacheManager() |
int |
getLockTimeout() |
int |
getQueryTimeout() |
br.com.anteros.persistence.session.query.ShowSQLType[] |
getShowSql() |
protected abstract br.com.anteros.persistence.transaction.TransactionFactory |
getTransactionFactory() |
TransactionManager |
getTransactionManager()
Gerenciador de transações JTA.
|
abstract TransactionManagerLookup |
getTransactionManagerLookup()
Retorna a estratégia para fazer lookup (obter) transaction manager para JTA.
|
boolean |
isFormatSql() |
boolean |
isShowSql() |
void |
onAfterExecuteCommit(Connection connection) |
void |
onAfterExecuteRollback(Connection connection) |
void |
onBeforeExecuteCommit(Connection connection) |
void |
onBeforeExecuteRollback(Connection connection) |
void |
setConfiguration(br.com.anteros.persistence.session.configuration.SessionFactoryConfiguration configuration) |
protected void |
setConfigurationClientInfo(Connection connection) |
void |
setDatasource(DataSource datasource) |
void |
setDataSource(DataSource dataSource) |
void |
setDialect(br.com.anteros.persistence.sql.dialect.DatabaseDialect dialect) |
void |
setEntityCacheManager(br.com.anteros.persistence.metadata.EntityCacheManager enityCacheManager) |
void |
setFormatSql(boolean formatSql) |
void |
setLockTimeout(int lockTimeout) |
void |
setQueryTimeout(int queryTimeout) |
void |
setShowSql(br.com.anteros.persistence.session.query.ShowSQLType[] showSql) |
protected br.com.anteros.persistence.sql.dialect.DatabaseDialect dialect
protected br.com.anteros.persistence.metadata.EntityCacheManager entityCacheManager
protected DataSource dataSource
protected br.com.anteros.persistence.session.configuration.SessionFactoryConfiguration configuration
protected br.com.anteros.persistence.session.context.CurrentSQLSessionContext currentSessionContext
public AbstractSQLSessionFactory(br.com.anteros.persistence.metadata.EntityCacheManager entityCacheManager,
DataSource dataSource,
br.com.anteros.persistence.session.configuration.SessionFactoryConfiguration configuration)
throws Exception
Exceptionpublic br.com.anteros.persistence.session.SQLSession getCurrentSession()
throws Exception
getCurrentSession in interface br.com.anteros.persistence.session.SQLSessionFactoryExceptionprotected br.com.anteros.persistence.session.context.CurrentSQLSessionContext buildCurrentSessionContext()
throws Exception
Exceptionprotected abstract br.com.anteros.persistence.transaction.TransactionFactory getTransactionFactory()
public void generateDDL(br.com.anteros.persistence.schema.type.TableCreationType databaseDDLType,
br.com.anteros.persistence.schema.type.TableCreationType scriptDDLType,
Boolean createReferentialIntegrity)
throws Exception
Exceptionpublic abstract void beforeGenerateDDL(br.com.anteros.persistence.session.SQLSession session)
throws Exception
Exceptionpublic abstract void afterGenerateDDL(br.com.anteros.persistence.session.SQLSession session)
throws Exception
Exceptionpublic br.com.anteros.persistence.sql.dialect.DatabaseDialect getDialect()
public void setDialect(br.com.anteros.persistence.sql.dialect.DatabaseDialect dialect)
public br.com.anteros.persistence.metadata.EntityCacheManager getEntityCacheManager()
getEntityCacheManager in interface br.com.anteros.persistence.session.SQLSessionFactorypublic void setEntityCacheManager(br.com.anteros.persistence.metadata.EntityCacheManager enityCacheManager)
public DataSource getDatasource()
public void setDatasource(DataSource datasource)
public boolean isShowSql()
public br.com.anteros.persistence.session.query.ShowSQLType[] getShowSql()
public void setShowSql(br.com.anteros.persistence.session.query.ShowSQLType[] showSql)
public boolean isFormatSql()
public void setFormatSql(boolean formatSql)
public void onBeforeExecuteCommit(Connection connection) throws Exception
Exceptionpublic void onBeforeExecuteRollback(Connection connection) throws Exception
Exceptionpublic void onAfterExecuteCommit(Connection connection) throws Exception
Exceptionpublic void onAfterExecuteRollback(Connection connection) throws Exception
Exceptionpublic DataSource getDataSource()
public void setDataSource(DataSource dataSource)
public br.com.anteros.persistence.session.configuration.SessionFactoryConfiguration getConfiguration()
public void setConfiguration(br.com.anteros.persistence.session.configuration.SessionFactoryConfiguration configuration)
public int getQueryTimeout()
public void setQueryTimeout(int queryTimeout)
protected void setConfigurationClientInfo(Connection connection) throws IOException, SQLException
IOExceptionSQLExceptionpublic abstract TransactionManagerLookup getTransactionManagerLookup() throws Exception
br.com.anteros.persistence.transaction.impl.TransactionExceptionExceptionpublic TransactionManager getTransactionManager() throws Exception
Exceptionpublic int getLockTimeout()
public void setLockTimeout(int lockTimeout)
public int getBatchSize()
Copyright © 2016 Anteros Tecnologia. All rights reserved.