net.sf.oness.common.model.util.dbunit
Class DatabasePopulator

java.lang.Object
  extended bynet.sf.oness.common.model.util.dbunit.DatabasePopulator

public class DatabasePopulator
extends java.lang.Object

Bean that populates a database, removing previous data, from a list of resources (in Spring format) whose contents are either in FlatXmlDataSetor XlsDataSetformat if they end with ".xml" or ".xls" respectively.

Version:
$Revision: 1.4 $
Author:
Carlos Sanchez

Constructor Summary
DatabasePopulator()
           
 
Method Summary
 void execute()
           
 javax.sql.DataSource getDataSource()
           
 java.util.List getLocations()
           
 void setDataSource(javax.sql.DataSource dataSource)
          DataSource of the database to populate
 void setLocations(java.util.List locations)
          Set the locations of the dataset resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabasePopulator

public DatabasePopulator()
Method Detail

setLocations

public void setLocations(java.util.List locations)
Set the locations of the dataset resources.

Parameters:
locations - The locations to set.

getLocations

public java.util.List getLocations()
Returns:
Returns the locations.

setDataSource

public void setDataSource(javax.sql.DataSource dataSource)
DataSource of the database to populate

Parameters:
dataSource - The dataSource to set.

getDataSource

public javax.sql.DataSource getDataSource()
Returns:
Returns the dataSource.

execute

public void execute()
             throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2003-2005 ONess Project. All Rights Reserved.