@ApplicationScoped public class HibernateInitializer extends Object implements Startable
| Modifier and Type | Field and Description |
|---|---|
protected DatabaseAutoSynchronizer |
databaseAutoSynchronizer |
protected String |
databaseName |
protected DataSourceManager |
databaseSourceManager |
static String |
DB_DB2 |
static String |
DB_H2 |
static String |
DB_MYSQL |
static String |
DB_ORACLE |
static String |
DB_POSTGRES |
static String |
DB_SQLSERVER |
static String |
DB_SYBASE |
static String |
DB_TEIID |
protected String |
defaultSchema |
protected org.hibernate.cfg.Configuration |
hbmConfig |
protected HibernateSessionFactoryProvider |
hibernateSessionFactoryProvider |
protected DataSource |
localDataSource |
protected String[] |
nativeToHiloReplaceableDialects |
protected String[] |
nativeToSequenceReplaceableDialects |
protected Map<String,String> |
supportedDialects |
protected String[] |
verificationExcludedClassNames |
| Constructor and Description |
|---|
HibernateInitializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
evictAllCaches()
Evict all cache information.
|
String |
getDatabaseName() |
String |
getDefaultSchema() |
DataSource |
getLocalDataSource() |
Priority |
getPriority() |
org.hibernate.SessionFactory |
getSessionFactory() |
protected String |
inferDatabaseName() |
String |
inferDatabaseName(DataSource ds) |
protected boolean |
isDatabase(String dbId) |
boolean |
isDB2Database() |
boolean |
isH2Database() |
boolean |
isMySQLDatabase() |
boolean |
isOracleDatabase() |
boolean |
isPostgresDatabase() |
boolean |
isSQLServerDatabase() |
boolean |
isSybaseDatabase() |
boolean |
isTeiidDatabase() |
protected void |
loadHibernateDescriptors(org.hibernate.cfg.Configuration hbmConfig) |
protected String |
processXMLContents(String fileContent) |
protected String |
readXMLForFile(String fileName,
InputStream is) |
void |
setDefaultSchema(String defaultSchema) |
void |
start() |
protected void |
verifyHibernateConfig() |
public static final String DB_H2
public static final String DB_POSTGRES
public static final String DB_MYSQL
public static final String DB_ORACLE
public static final String DB_SQLSERVER
public static final String DB_DB2
public static final String DB_TEIID
public static final String DB_SYBASE
@Inject protected HibernateSessionFactoryProvider hibernateSessionFactoryProvider
@Inject protected DatabaseAutoSynchronizer databaseAutoSynchronizer
@Inject protected DataSourceManager databaseSourceManager
@Inject protected String[] nativeToSequenceReplaceableDialects
@Inject protected String[] nativeToHiloReplaceableDialects
@Inject protected String[] verificationExcludedClassNames
protected org.hibernate.cfg.Configuration hbmConfig
protected String databaseName
protected DataSource localDataSource
@Inject protected String defaultSchema
public org.hibernate.SessionFactory getSessionFactory()
public Priority getPriority()
getPriority in interface Startablepublic void start()
throws Exception
public String getDatabaseName()
public void setDefaultSchema(String defaultSchema)
public String getDefaultSchema()
public boolean isOracleDatabase()
public boolean isPostgresDatabase()
public boolean isSQLServerDatabase()
public boolean isMySQLDatabase()
public boolean isH2Database()
public boolean isDB2Database()
public boolean isTeiidDatabase()
public boolean isSybaseDatabase()
protected boolean isDatabase(String dbId)
public DataSource getLocalDataSource() throws Exception
Exceptionpublic String inferDatabaseName(DataSource ds) throws Exception
Exceptionprotected void loadHibernateDescriptors(org.hibernate.cfg.Configuration hbmConfig)
throws IOException
IOExceptionprotected String readXMLForFile(String fileName, InputStream is) throws IOException
IOExceptionpublic void evictAllCaches()
Copyright © 2012–2015 JBoss by Red Hat. All rights reserved.