org.apache.ojb.broker.ant
Class DataSet

java.lang.Object
  extended by org.apache.ojb.broker.ant.DataSet

public class DataSet
extends Object

Encapsulates the data objects read by Digester.

Author:
Thomas Dudziak

Constructor Summary
DataSet()
           
 
Method Summary
 void add(org.apache.commons.beanutils.DynaBean bean)
          Adds a data object.
 void createInsertionSql(org.apache.ddlutils.model.Database model, org.apache.ddlutils.Platform platform, Writer writer)
          Generates and writes the sql for inserting the currently contained data objects.
 void insert(org.apache.ddlutils.Platform platform, org.apache.ddlutils.model.Database model, int batchSize)
          Inserts the currently contained data objects into the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSet

public DataSet()
Method Detail

add

public void add(org.apache.commons.beanutils.DynaBean bean)
Adds a data object.

Parameters:
bean - The data object

createInsertionSql

public void createInsertionSql(org.apache.ddlutils.model.Database model,
                               org.apache.ddlutils.Platform platform,
                               Writer writer)
                        throws IOException
Generates and writes the sql for inserting the currently contained data objects.

Parameters:
model - The database model
platform - The platform
writer - The output stream
Throws:
IOException

insert

public void insert(org.apache.ddlutils.Platform platform,
                   org.apache.ddlutils.model.Database model,
                   int batchSize)
            throws SQLException
Inserts the currently contained data objects into the database.

Parameters:
platform - The (connected) database platform for inserting data
model - The database model
batchSize - The batch size; use 1 for not using batch mode
Throws:
SQLException


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.