net.sf.dc.core.objects
Class DCCollection

java.lang.Object
  extended bynet.sf.dc.core.objects.DCCollection

public class DCCollection
extends java.lang.Object

A collection of Data Crow objects. Normal actions like save / update and delete can be performed on a collection of objects

Since:
1.3
Version:
DC0.50
Author:
Robert-Jan van der Waals

Constructor Summary
DCCollection()
          Initializes a new collection
 
Method Summary
 void addObject(DCObject o, java.lang.Integer rowNumber)
          Adds an object to this collection.
 void delete(RequestorCollection requestors)
           
 void saveNew(RequestorCollection requestors)
           
 void saveUpdate(RequestorCollection requestors)
           
 QueryBatch toQueryBatch(int queryType)
          Convert this collection to a Query Batch.
 boolean uniqueObject(DCObject o, java.lang.Integer newRow)
          Checks whether the data crow object is unqiue within the collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DCCollection

public DCCollection()
Initializes a new collection

Method Detail

addObject

public void addObject(DCObject o,
                      java.lang.Integer rowNumber)
Adds an object to this collection. The rownumber indicates where the object is located in the UI table

Parameters:
o - Data Crow Object to be added to the collection
rowNumber - UI row number

saveUpdate

public void saveUpdate(RequestorCollection requestors)

delete

public void delete(RequestorCollection requestors)

saveNew

public void saveNew(RequestorCollection requestors)

toQueryBatch

public QueryBatch toQueryBatch(int queryType)
Convert this collection to a Query Batch. The values added to the batch are checked before hand: - if they are unique within this batch - if all required fields have been entered

Parameters:
queryType - type of query (@see Query)

uniqueObject

public boolean uniqueObject(DCObject o,
                            java.lang.Integer newRow)
Checks whether the data crow object is unqiue within the collection

Parameters:
o - the object to check for completeness and uniqueness
newRow - UI row index