public class SchemaHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMPONENT_REFERENCE |
| Constructor and Description |
|---|
SchemaHelper() |
SchemaHelper(org.hibernate.cfg.Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMappingResources(java.util.List mappings) |
void |
createTables() |
void |
dropTables() |
org.hibernate.cfg.Configuration |
getConfiguration() |
MappingResources |
getMappingResources() |
void |
recreateDatabase() |
void |
setConfiguration(org.hibernate.cfg.Configuration configuration) |
void |
setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig) |
void |
setHibernateProperties(java.util.Properties props) |
void |
setMappingResources(MappingResources mappings) |
void |
updateSchemaIfNeeded()
If there are any updates to the Schema needed, do them.
|
void |
updateSchemaIfNeeded(boolean showDDL) |
public static final java.lang.String COMPONENT_REFERENCE
public SchemaHelper()
public SchemaHelper(org.hibernate.cfg.Configuration configuration)
public void setHibernateProperties(java.util.Properties props)
public void setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
public org.hibernate.cfg.Configuration getConfiguration()
throws org.hibernate.MappingException
org.hibernate.MappingExceptionpublic void setConfiguration(org.hibernate.cfg.Configuration configuration)
configuration - The config to set.public MappingResources getMappingResources()
public void setMappingResources(MappingResources mappings)
mappings - The mappings to set.public void addMappingResources(java.util.List mappings)
public void recreateDatabase()
throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationExceptionpublic void dropTables()
throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationExceptionpublic void createTables()
throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationExceptionpublic void updateSchemaIfNeeded()
throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationExceptionpublic void updateSchemaIfNeeded(boolean showDDL)
throws com.atlassian.config.ConfigurationException
showDDL - - false will output DDL to stdoutcom.atlassian.config.ConfigurationExceptionCopyright © 2014 Atlassian. All Rights Reserved.