com.azalient.api.file.record
Class AbstractRecordW

java.lang.Object
  extended by com.azalient.api.file.record.TypeObject
      extended by com.azalient.api.file.record.ReaderUtilities
          extended by com.azalient.api.file.record.AbstractRecordW
All Implemented Interfaces:
RecordW, SortableData

public abstract class AbstractRecordW
extends ReaderUtilities
implements RecordW

An abstract implementation of the RecordW interface, requiring only get() method to be implemented


Constructor Summary
AbstractRecordW()
           
 
Method Summary
 Object[] extraCols()
          Return an array of extra columns for this record.
 Object extraGet(Object col)
          The (API) user can store additional information in any record using "Extra" fields.
 boolean extraGetB(Object col)
          Get the data in the named extra column, as a boolean
 double extraGetD(Object col)
          Get the data in the named extra column, as a double
 int extraGetI(Object col)
          Get the data in the named extra column, as an integer
 String extraGetS(Object col)
          Get the data in the named extra column, as a String
 UTime extraGetT(Object col)
          Get the data in the named extra column, as a UTime Object
abstract  Object get(Object colKey)
          The writer calls this to get the data in the record.
 boolean isVolatile()
          If true, do not save the record
 
Methods inherited from class com.azalient.api.file.record.TypeObject
b, c, d, equals, equals, equalsEW, f, i, keyString, keyString, nameFromKeyString, rowKeysFromKeyString, s, t, t
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRecordW

public AbstractRecordW()
Method Detail

get

public abstract Object get(Object colKey)
Description copied from interface: RecordW
The writer calls this to get the data in the record.

Specified by:
get in interface RecordW
Specified by:
get in interface SortableData
Parameters:
colKey - The column header key (normally a String)
Returns:
an object having one of the following types:
  • String
  • Double / Float
  • Integer / Long
  • Boolean
  • UTime

OR

an object of any other type - converted to a String using the toString() method

OR

the data may be an array of uniform type. An array of objects is expected if the key-string ends in "*". (This is a convention, not enforced).

isVolatile

public boolean isVolatile()
Description copied from interface: RecordW
If true, do not save the record

Specified by:
isVolatile in interface RecordW

extraCols

public Object[] extraCols()
Description copied from interface: RecordW
Return an array of extra columns for this record. Returning null or an empty array means there is are no extra columns

Specified by:
extraCols in interface RecordW

extraGet

public Object extraGet(Object col)
Description copied from interface: RecordW
The (API) user can store additional information in any record using "Extra" fields. There is no limit to the number of Extra fields, the only constraint is that the field name must be unique. Normally, the columnName passed in is a String, but any other type of object can be used. This method returns the data as one of the types described in the get method()

Specified by:
extraGet in interface RecordW
See Also:
RecordW.get(Object), RecordR.extraSet(Object, Object)

extraGetD

public double extraGetD(Object col)
Description copied from interface: RecordW
Get the data in the named extra column, as a double

Specified by:
extraGetD in interface RecordW
See Also:
RecordW.extraGet(Object)

extraGetB

public boolean extraGetB(Object col)
Description copied from interface: RecordW
Get the data in the named extra column, as a boolean

Specified by:
extraGetB in interface RecordW
See Also:
RecordW.extraGet(Object)

extraGetI

public int extraGetI(Object col)
Description copied from interface: RecordW
Get the data in the named extra column, as an integer

Specified by:
extraGetI in interface RecordW
See Also:
RecordW.extraGet(Object)

extraGetS

public String extraGetS(Object col)
Description copied from interface: RecordW
Get the data in the named extra column, as a String

Specified by:
extraGetS in interface RecordW
See Also:
RecordW.extraGet(Object)

extraGetT

public UTime extraGetT(Object col)
Description copied from interface: RecordW
Get the data in the named extra column, as a UTime Object

Specified by:
extraGetT in interface RecordW
See Also:
RecordW.extraGet(Object)