org.jasig.portal.tools.dbloader
Class DataSourceSchemaExport

java.lang.Object
  extended by org.jasig.portal.tools.dbloader.DataSourceSchemaExport
All Implemented Interfaces:
ISchemaExport

public class DataSourceSchemaExport
extends Object
implements ISchemaExport

Runs the Hibernate Schema Export tool using the specified DataSource for the target DB.

Version:
$Revision: 19776 $
Author:
Eric Dalquist

Constructor Summary
DataSourceSchemaExport()
           
 
Method Summary
 Resource getConfiguration()
           
 DataSource getDataSource()
           
 String getDialect()
           
 void hbm2ddl(boolean export, boolean create, boolean drop, String outputFile)
           
 void setConfiguration(Resource configuration)
           
 void setDataSource(DataSource dataSource)
           
 void setDialect(String dialect)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceSchemaExport

public DataSourceSchemaExport()
Method Detail

getConfiguration

public Resource getConfiguration()
Returns:
the configuration

setConfiguration

public void setConfiguration(Resource configuration)
Parameters:
configuration - the configuration to set

getDataSource

public DataSource getDataSource()
Returns:
the dataSource

setDataSource

public void setDataSource(DataSource dataSource)
Parameters:
dataSource - the dataSource to set

getDialect

public String getDialect()
Returns:
the dialect

setDialect

public void setDialect(String dialect)
Parameters:
dialect - the dialect to set

hbm2ddl

public void hbm2ddl(boolean export,
                    boolean create,
                    boolean drop,
                    String outputFile)
Specified by:
hbm2ddl in interface ISchemaExport
Parameters:
export - If the database should have the SQL executed agaisnt it
drop - If existing database objects should be dropped before creating new objects
outputFile - Optional file to write out the SQL to.


Copyright © 2010 Jasig. All Rights Reserved.