org.kaiwitte.workbench.data
Class MutableRecordImpl

java.lang.Object
  extended by org.kaiwitte.workbench.data.MutableRecordImpl
All Implemented Interfaces:
MutableRecord, Record

public class MutableRecordImpl
extends java.lang.Object
implements MutableRecord

Default implementation of a MutableRecord.


Constructor Summary
MutableRecordImpl(DataScheme scheme, java.lang.Object... fields)
          Creates a new instance.
MutableRecordImpl(long id, DataScheme scheme, java.lang.Object... fields)
          Creates a new instance.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 long getID()
          Returns the ID.
 DataScheme getScheme()
          Returns the associated scheme.
 java.lang.Object getValue(int fieldNumber)
          Returns the value.
 int hashCode()
           
 void setValue(int fieldNumber, java.lang.Object fieldValue)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MutableRecordImpl

public MutableRecordImpl(long id,
                         DataScheme scheme,
                         java.lang.Object... fields)
Creates a new instance.

Parameters:
id - the id of the record
scheme - the data scheme that describes this record's structure
fields - the content

MutableRecordImpl

public MutableRecordImpl(DataScheme scheme,
                         java.lang.Object... fields)
Creates a new instance.

Parameters:
scheme - the data scheme that describes this record's structure
fields - the content
Method Detail

setValue

public void setValue(int fieldNumber,
                     java.lang.Object fieldValue)
Specified by:
setValue in interface MutableRecord

getID

public long getID()
Description copied from interface: Record
Returns the ID.

Specified by:
getID in interface Record
Returns:
the id

getValue

public java.lang.Object getValue(int fieldNumber)
Description copied from interface: Record
Returns the value.

Specified by:
getValue in interface Record
Parameters:
fieldNumber - the index
Returns:
the content at the index.

getScheme

public DataScheme getScheme()
Description copied from interface: Record
Returns the associated scheme.

Specified by:
getScheme in interface Record
Returns:
the scheme

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

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