at.spardat.xma.datasource
Class TabularDomData

java.lang.Object
  extended byat.spardat.xma.datasource.TabularData
      extended byat.spardat.xma.datasource.TabularDomData
All Implemented Interfaces:
ITabularData, ITabularDomData

public class TabularDomData
extends TabularData
implements ITabularDomData

Extension of TabularData that must be used for domains. This class implements ITabularDomData and therefore is more convenient to deal with in the case of domain tables.


Constructor Summary
TabularDomData()
          Constructor.
 
Method Summary
 void addDomColumns()
          Convenience method.
 void addRow(TabularDataRow r)
          Overwrites the implementation of the superclass to ensure that The columns are valid when the first row is added.
 IDomRow getDomRow(int index)
          Returns a domain row at a provided index.
 IDomRow getDomRow(java.lang.String key)
          Returns a row for a provided key or null if there is no row with that key.
static boolean isDomainColStructure(java.lang.String[] columns)
          Given an array of column names, this method decides if a TabularDomData may be constructed with this structure.
 
Methods inherited from class at.spardat.xma.datasource.TabularData
addColumn, clear, getCell, getCell, getColumnIndex, getColumnName, getRow, hashCode, numCols, readFrom, readFrom, save, size, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface at.spardat.xma.datasource.ITabularData
getCell, getCell, getColumnIndex, getColumnName, numCols, size
 

Constructor Detail

TabularDomData

public TabularDomData()
Constructor.

Method Detail

addDomColumns

public void addDomColumns()
Convenience method. Calls addColumn for every reserved domain column.


isDomainColStructure

public static boolean isDomainColStructure(java.lang.String[] columns)
Given an array of column names, this method decides if a TabularDomData may be constructed with this structure.


addRow

public void addRow(TabularDataRow r)
            throws java.lang.IllegalArgumentException
Overwrites the implementation of the superclass to ensure that
  1. The columns are valid when the first row is added.
  2. There are no duplicate values for COD_KEY.

Overrides:
addRow in class TabularData
Parameters:
r - the row to add.
Throws:
java.lang.IllegalArgumentException - if the added columns do not represent the reserved dom structure or a COD_KEY already exists.
See Also:
TabularData.addRow(at.spardat.xma.datasource.TabularDataRow)

getDomRow

public IDomRow getDomRow(int index)
Description copied from interface: ITabularDomData
Returns a domain row at a provided index.

Specified by:
getDomRow in interface ITabularDomData
Parameters:
index - zero based index, may range from zero up to size()-1.
Returns:
the IDomRow object at the requested index.
See Also:
ITabularDomData.getDomRow(int)

getDomRow

public IDomRow getDomRow(java.lang.String key)
Description copied from interface: ITabularDomData
Returns a row for a provided key or null if there is no row with that key. All rows are searched, regardless of their valid-time-range.

Specified by:
getDomRow in interface ITabularDomData
Parameters:
key - the COD_KEY of the searched row.
Returns:
IDomRow object or null
See Also:
ITabularDomData.getDomRow(java.lang.String)