org.kaiwitte.workbench.data
Class MetaRecordImpl

java.lang.Object
  extended by org.kaiwitte.workbench.data.MetaRecordImpl
All Implemented Interfaces:
MetaRecord

public class MetaRecordImpl
extends java.lang.Object
implements MetaRecord

Default implementation of a MetaRecord.


Constructor Summary
MetaRecordImpl(MetaScheme metaScheme, java.lang.Object... values)
          Creates a new instance.
MetaRecordImpl(Record[] records)
          Creates a new instance.
 
Method Summary
 java.lang.String getColumnName(int column)
          Returns the name of the column.
 Record[] getRecords()
          Returns all records.
 java.lang.Object getValue(int column)
          Returns the value at the specified column.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaRecordImpl

public MetaRecordImpl(Record[] records)
Creates a new instance.

Parameters:
records - the records to be wrapped

MetaRecordImpl

public MetaRecordImpl(MetaScheme metaScheme,
                      java.lang.Object... values)
Creates a new instance.

Parameters:
values - the values for this record
Method Detail

getValue

public java.lang.Object getValue(int column)
Description copied from interface: MetaRecord
Returns the value at the specified column.

Specified by:
getValue in interface MetaRecord
Parameters:
column - the column
Returns:
the value at the specified column

getColumnName

public java.lang.String getColumnName(int column)
Description copied from interface: MetaRecord
Returns the name of the column.

Specified by:
getColumnName in interface MetaRecord
Parameters:
column - the column id
Returns:
the name of the column

getRecords

public Record[] getRecords()
Description copied from interface: MetaRecord
Returns all records. The first one in the array is the primary one (e. g. of type repair request).

Specified by:
getRecords in interface MetaRecord
Returns:
the records that back this instance

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object