|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bucket.core.persistence.hibernate.schema.SchemaHelper
@NotThreadSafe public class SchemaHelper
Replaces functionality in the ConfluenceHibernateSetup for running schema actions against a database. This implermentation is a Spring-ified object that can be created and managed by an IoC container
Field Summary | |
---|---|
static java.lang.String |
COMPONENT_REFERENCE
|
Constructor Summary | |
---|---|
SchemaHelper()
Deprecated. since 5.6, use SchemaHelper(Iterable, java.util.Properties) |
|
SchemaHelper(java.lang.Iterable<java.lang.String> mappingResources,
com.atlassian.config.db.HibernateConfig hibernateConfig)
|
|
SchemaHelper(java.lang.Iterable<java.lang.String> mappingResources,
java.util.Properties hibernateProperties)
|
Method Summary | |
---|---|
void |
addMappingResources(java.util.List<java.lang.String> mappings)
Deprecated. since 5.6, use a lazy Iterable in conjunction with SchemaHelper(Iterable, java.util.Properties) |
void |
createTables()
|
void |
dropTables()
|
net.sf.hibernate.cfg.Configuration |
getConfiguration()
|
MappingResources |
getMappingResources()
Deprecated. since 5.6, use getMappingResourcesView() |
java.lang.Iterable<java.lang.String> |
getMappingResourcesView()
|
void |
recreateDatabase()
|
void |
setConfiguration(net.sf.hibernate.cfg.Configuration configuration)
Deprecated. since 5.6, use #SchemaHelper(com.atlassian.util.concurrent.Supplier) |
void |
setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
Deprecated. since 5.6, use SchemaHelper(Iterable, java.util.Properties) |
void |
setHibernateProperties(java.util.Properties hibernateConfigProperties)
Deprecated. since 5.6, use SchemaHelper(Iterable, java.util.Properties) |
void |
setMappingResources(MappingResources mappings)
Deprecated. since 5.6, use a lazy Iterable in conjunction with SchemaHelper(Iterable, java.util.Properties) |
void |
updateSchemaIfNeeded()
If there are any updates to the Schema needed, do them. |
void |
updateSchemaIfNeeded(boolean showDDL)
|
void |
validateSchemaUpdateIfNeeded()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COMPONENT_REFERENCE
Constructor Detail |
---|
@Deprecated public SchemaHelper()
SchemaHelper(Iterable, java.util.Properties)
public SchemaHelper(java.lang.Iterable<java.lang.String> mappingResources, com.atlassian.config.db.HibernateConfig hibernateConfig)
public SchemaHelper(java.lang.Iterable<java.lang.String> mappingResources, java.util.Properties hibernateProperties)
Method Detail |
---|
@Deprecated public void setHibernateProperties(java.util.Properties hibernateConfigProperties)
SchemaHelper(Iterable, java.util.Properties)
@Deprecated public void setHibernateConfig(com.atlassian.config.db.HibernateConfig hibernateConfig)
SchemaHelper(Iterable, java.util.Properties)
public net.sf.hibernate.cfg.Configuration getConfiguration() throws net.sf.hibernate.MappingException
net.sf.hibernate.MappingException
@Deprecated public void setConfiguration(net.sf.hibernate.cfg.Configuration configuration)
#SchemaHelper(com.atlassian.util.concurrent.Supplier)
configuration
- The config to set.@Deprecated public MappingResources getMappingResources()
getMappingResourcesView()
@Deprecated public void setMappingResources(MappingResources mappings)
Iterable
in conjunction with SchemaHelper(Iterable, java.util.Properties)
mappings
- The mappings to set.@Deprecated public void addMappingResources(java.util.List<java.lang.String> mappings)
Iterable
in conjunction with SchemaHelper(Iterable, java.util.Properties)
public void recreateDatabase() throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationException
public void dropTables() throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationException
public void createTables() throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationException
public void updateSchemaIfNeeded() throws com.atlassian.config.ConfigurationException
com.atlassian.config.ConfigurationException
public void validateSchemaUpdateIfNeeded() 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 stdout
com.atlassian.config.ConfigurationException
public java.lang.Iterable<java.lang.String> getMappingResourcesView()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |