|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.tools.dbloader.HibernateDbLoader
public class HibernateDbLoader
Can drop and/or create tables based on an XML table definition file and populate tables based on a XML data definition file. Table creation is done using the Hibernate mapping APIs to allow for a full range of database support.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
logger
|
| Constructor Summary | |
|---|---|
HibernateDbLoader()
|
|
| Method Summary | |
|---|---|
protected List<String> |
createScript(Collection<org.hibernate.mapping.Table> tables,
org.hibernate.dialect.Dialect dialect,
org.hibernate.engine.Mapping mapping,
String defaultCatalog,
String defaultSchema)
Generate create scripts and add them to the script list |
protected List<String> |
dropScript(Collection<org.hibernate.mapping.Table> tables,
org.hibernate.dialect.Dialect dialect,
String defaultCatalog,
String defaultSchema)
Generate the drop scripts and add them to the script list |
org.hibernate.dialect.Dialect |
getDialect()
|
protected org.hibernate.dialect.Dialect |
getDialect(String dialectName)
Load the appropriate database dialect |
protected ITableDataProvider |
loadTables(DbLoaderConfiguration configuration)
|
protected void |
populateTables(DbLoaderConfiguration configuration,
Map<String,Map<String,Integer>> tableColumnTypes)
|
void |
process(DbLoaderConfiguration configuration)
Executes database loading based on the provided configuration |
void |
setDataSource(DataSource dataSource)
|
void |
setDialect(org.hibernate.dialect.Dialect dialect)
|
void |
setTransactionManager(PlatformTransactionManager transactionManager)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log logger
| Constructor Detail |
|---|
public HibernateDbLoader()
| Method Detail |
|---|
public void setDataSource(DataSource dataSource)
jdbcTemplate - the jdbcTemplate to setpublic void setTransactionManager(PlatformTransactionManager transactionManager)
transactionTemplate - the transactionTemplate to setpublic org.hibernate.dialect.Dialect getDialect()
public void setDialect(org.hibernate.dialect.Dialect dialect)
dialect - the dialect to set
public void process(DbLoaderConfiguration configuration)
throws ParserConfigurationException,
SAXException,
IOException
IDbLoader
process in interface IDbLoaderParserConfigurationException
SAXException
IOException
protected ITableDataProvider loadTables(DbLoaderConfiguration configuration)
throws ParserConfigurationException,
SAXException,
IOException
ParserConfigurationException
SAXException
IOExceptionprotected org.hibernate.dialect.Dialect getDialect(String dialectName)
protected List<String> dropScript(Collection<org.hibernate.mapping.Table> tables,
org.hibernate.dialect.Dialect dialect,
String defaultCatalog,
String defaultSchema)
protected List<String> createScript(Collection<org.hibernate.mapping.Table> tables,
org.hibernate.dialect.Dialect dialect,
org.hibernate.engine.Mapping mapping,
String defaultCatalog,
String defaultSchema)
protected void populateTables(DbLoaderConfiguration configuration,
Map<String,Map<String,Integer>> tableColumnTypes)
throws ParserConfigurationException,
SAXException,
IOException
ParserConfigurationException
SAXException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||