public class SchemaHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_REFERENCE |
Constructor and Description |
---|
SchemaHelper() |
Modifier and Type | Method and Description |
---|---|
void |
createSchema()
Creates the schema in the database.
|
org.hibernate.cfg.Configuration |
getConfiguration() |
MappingResources |
getMappingResources() |
void |
setConfiguration(org.hibernate.cfg.Configuration configuration) |
void |
setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig) |
void |
setHibernateProperties(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 String COMPONENT_REFERENCE
public void setHibernateProperties(Properties props)
public void setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
public org.hibernate.cfg.Configuration getConfiguration() throws org.hibernate.MappingException
org.hibernate.MappingException
public 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 updateSchemaIfNeeded() throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationException
public void updateSchemaIfNeeded(boolean showDDL) throws com.atlassian.config.ConfigurationException
showDDL
- - false will output DDL to stdoutcom.atlassian.config.ConfigurationException
public void createSchema() throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationException
- if there was an issue configuring the schema.Copyright © 2013 Atlassian. All Rights Reserved.