org.apache.torque.betwixt
Class Dataset

java.lang.Object
  extended by org.apache.torque.betwixt.Dataset

public class Dataset
extends java.lang.Object

A container Bean class for records to be exported or imported. It also supports the name, action, onError, description processing attributes.

Author:
Greg Monroe

Constructor Summary
Dataset()
          Generic bean constructor
 
Method Summary
 void addRecord(java.lang.Object item)
          Add an individual item to the data set.
 void addRecordList(java.util.List list)
          Add a list or records to the end of the current collection.
 java.lang.String getAction()
          Get the value of the action attribute.
 org.apache.commons.betwixt.io.BeanWriter getBeanWriter()
          Get the bean writer.
 java.lang.String getDescription()
          Get the value of the description attribute.
 java.lang.String getName()
          Get the value of the name attribute
 java.lang.String getOnError()
          Gets the value of the onError attribute.
 java.util.List getRecord()
          Get the record set list.
 java.util.Iterator iterator()
          Get an iterator for this data record set.
 void setAction(java.lang.String action)
          Sets the value of the action attribute
 void setDescription(java.lang.String description)
          Set the value of the description attribute.
 void setName(java.lang.String name)
          Set the value of the name attribute
 void setOnError(java.lang.String onError)
          Set the value of the onError attribute.
 void setRecord(java.util.List value)
          Replace the record set with the supplied set.
 int size()
          Get the size of the current data set.
 java.lang.String toString()
          Dump debug info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Dataset

public Dataset()
Generic bean constructor

Method Detail

addRecord

public void addRecord(java.lang.Object item)
Add an individual item to the data set.

Parameters:
item -

addRecordList

public void addRecordList(java.util.List list)
Add a list or records to the end of the current collection.

Parameters:
list - A list of records to add to the end of the existing list.

getRecord

public java.util.List getRecord()
Get the record set list.

Returns:
The list of records.

size

public int size()
Get the size of the current data set.

Returns:
The number of records in this dataset

iterator

public java.util.Iterator iterator()
Get an iterator for this data record set.

Returns:
The unsynchronized iterator

setRecord

public void setRecord(java.util.List value)
Replace the record set with the supplied set. Note that value should be a synchronized collection (e.g Collections.synchronizedList(new ArrayList(...));

Parameters:
value -

getAction

public java.lang.String getAction()
Get the value of the action attribute.

Returns:
Returns the action.

setAction

public void setAction(java.lang.String action)
Sets the value of the action attribute

Parameters:
action - The action to set.

getOnError

public java.lang.String getOnError()
Gets the value of the onError attribute.

Returns:
Returns the onError.

setOnError

public void setOnError(java.lang.String onError)
Set the value of the onError attribute.

Parameters:
onError - The onError to set.

getDescription

public java.lang.String getDescription()
Get the value of the description attribute.

Returns:
Returns the description.

setDescription

public void setDescription(java.lang.String description)
Set the value of the description attribute.

Parameters:
description - The description to set.

getBeanWriter

public org.apache.commons.betwixt.io.BeanWriter getBeanWriter()
                                                       throws java.lang.IllegalStateException
Get the bean writer. Only valid after createBeanWriter has been called.

Returns:
The current BeanWriter object.
Throws:
java.lang.IllegalStateException - If called before createBeanWriter has been called.

toString

public java.lang.String toString()
Dump debug info.

Overrides:
toString in class java.lang.Object

getName

public java.lang.String getName()
Get the value of the name attribute

Returns:
Returns the name.

setName

public void setName(java.lang.String name)
Set the value of the name attribute

Parameters:
name - The name to set.


Copyright © 2006 Torque Add-ons Project. All Rights Reserved.