org.opengts.war.report.field
Class FieldData

java.lang.Object
  extended by org.opengts.war.report.field.FieldData
All Implemented Interfaces:
CSSRowClass
Direct Known Subclasses:
FieldData.FieldEventDataProvider

public class FieldData
extends java.lang.Object
implements CSSRowClass


Nested Class Summary
static class FieldData.DeviceDescriptionComparator
           
static class FieldData.FieldEventDataProvider
          Custom FieldEventDataProvider class
 
Field Summary
static java.lang.String KEY_ACCOUNT
           
static java.lang.String KEY_DEVICE
           
static java.lang.String KEY_DEVICE_DESC
           
static java.lang.String KEY_DEVICE_VIN
           
static java.lang.String KEY_DRIVER
           
 
Constructor Summary
FieldData()
           
 
Method Summary
 java.lang.Object filterReturnedValue(java.lang.String key, java.lang.Object rtnVal)
          This method provide this instance to tweak (colorise, etc) the returned value from the FieldLayout class.
 Account getAccount()
           
 Account getAccount(Account dft)
           
 java.lang.String getAccountID()
           
 boolean getBoolean(java.lang.String key)
           
 boolean getBoolean(java.lang.String key, boolean dft)
           
 java.lang.String getCssClass()
           
 Device getDevice()
           
 Device getDevice(Device dft)
           
 java.lang.String getDeviceDescription()
           
static java.util.Comparator<FieldData> getDeviceDescriptionComparator()
           
 java.lang.String getDeviceID()
           
 java.lang.String getDeviceVIN()
           
 double getDouble(java.lang.String key)
           
 double getDouble(java.lang.String key, double dft)
           
 Driver getDriver()
           
 Driver getDriver(Driver dft)
           
 java.lang.String getDriverID()
           
 GeoPoint getGeoPoint(java.lang.String key)
           
 GeoPoint getGeoPoint(java.lang.String key, GeoPoint dft)
           
 int getInt(java.lang.String key)
           
 int getInt(java.lang.String key, int dft)
           
 double getLatitude(java.lang.String key)
           
 long getLong(java.lang.String key)
           
 long getLong(java.lang.String key, long dft)
           
 double getLongitude(java.lang.String key)
           
 DBDataRow.RowType getRowType()
           
 java.lang.String getString(java.lang.String key)
           
 java.lang.String getString(java.lang.String key, java.lang.String dft)
           
 long getTimestamp(java.lang.String key)
           
 java.lang.Object getValue(java.lang.String key)
           
 java.lang.Object getValue(java.lang.String key, java.lang.Object dft)
           
 boolean hasCssClass()
           
 boolean hasValue(java.lang.String key)
           
 void setAccount(Account account)
           
 void setBoolean(java.lang.String key, boolean val)
           
 void setCssClass(java.lang.String rowClass)
           
 void setDevice(Device device)
           
 void setDouble(java.lang.String key, double val)
           
 void setDriver(Driver driver)
           
 void setGeoPoint(java.lang.String key, GeoPoint gp)
           
 void setInt(java.lang.String key, int val)
           
 void setLong(java.lang.String key, long val)
           
 void setRowType(DBDataRow.RowType rt)
           
 void setString(java.lang.String key, java.lang.String val)
           
 void setValue(java.lang.String key, boolean val)
           
 void setValue(java.lang.String key, double val)
           
 void setValue(java.lang.String key, int val)
           
 void setValue(java.lang.String key, long val)
           
 void setValue(java.lang.String key, java.lang.Object val)
           
static void sortByDeviceDescription(java.util.List<FieldData> fieldDataList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_ACCOUNT

public static final java.lang.String KEY_ACCOUNT
See Also:
Constant Field Values

KEY_DEVICE

public static final java.lang.String KEY_DEVICE
See Also:
Constant Field Values

KEY_DEVICE_DESC

public static final java.lang.String KEY_DEVICE_DESC
See Also:
Constant Field Values

KEY_DEVICE_VIN

public static final java.lang.String KEY_DEVICE_VIN
See Also:
Constant Field Values

KEY_DRIVER

public static final java.lang.String KEY_DRIVER
See Also:
Constant Field Values
Constructor Detail

FieldData

public FieldData()
Method Detail

setRowType

public void setRowType(DBDataRow.RowType rt)

getRowType

public DBDataRow.RowType getRowType()

hasCssClass

public boolean hasCssClass()
Specified by:
hasCssClass in interface CSSRowClass

getCssClass

public java.lang.String getCssClass()
Specified by:
getCssClass in interface CSSRowClass

setCssClass

public void setCssClass(java.lang.String rowClass)

setValue

public void setValue(java.lang.String key,
                     java.lang.Object val)

getValue

public java.lang.Object getValue(java.lang.String key,
                                 java.lang.Object dft)

getValue

public java.lang.Object getValue(java.lang.String key)

hasValue

public boolean hasValue(java.lang.String key)

filterReturnedValue

public java.lang.Object filterReturnedValue(java.lang.String key,
                                            java.lang.Object rtnVal)
This method provide this instance to tweak (colorise, etc) the returned value from the FieldLayout class.

Parameters:
key - The field key that the value represents
rtnVal - The value to filter (is either a String or ColumnValue instance)
Returns:
The returned value (default is to return the specified value unfiltered)

getAccountID

public java.lang.String getAccountID()

setAccount

public void setAccount(Account account)

getAccount

public Account getAccount(Account dft)

getAccount

public Account getAccount()

getDeviceID

public java.lang.String getDeviceID()

setDevice

public void setDevice(Device device)

getDevice

public Device getDevice(Device dft)

getDevice

public Device getDevice()

getDeviceDescription

public java.lang.String getDeviceDescription()

getDeviceVIN

public java.lang.String getDeviceVIN()

getDriverID

public java.lang.String getDriverID()

setDriver

public void setDriver(Driver driver)

getDriver

public Driver getDriver(Driver dft)

getDriver

public Driver getDriver()

getTimestamp

public long getTimestamp(java.lang.String key)

setGeoPoint

public void setGeoPoint(java.lang.String key,
                        GeoPoint gp)

getGeoPoint

public GeoPoint getGeoPoint(java.lang.String key,
                            GeoPoint dft)

getGeoPoint

public GeoPoint getGeoPoint(java.lang.String key)

getLatitude

public double getLatitude(java.lang.String key)

getLongitude

public double getLongitude(java.lang.String key)

setValue

public void setValue(java.lang.String key,
                     boolean val)

setBoolean

public void setBoolean(java.lang.String key,
                       boolean val)

getBoolean

public boolean getBoolean(java.lang.String key,
                          boolean dft)

getBoolean

public boolean getBoolean(java.lang.String key)

setString

public void setString(java.lang.String key,
                      java.lang.String val)

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.String dft)

getString

public java.lang.String getString(java.lang.String key)

setValue

public void setValue(java.lang.String key,
                     int val)

setInt

public void setInt(java.lang.String key,
                   int val)

getInt

public int getInt(java.lang.String key,
                  int dft)

getInt

public int getInt(java.lang.String key)

setValue

public void setValue(java.lang.String key,
                     long val)

setLong

public void setLong(java.lang.String key,
                    long val)

getLong

public long getLong(java.lang.String key,
                    long dft)

getLong

public long getLong(java.lang.String key)

setValue

public void setValue(java.lang.String key,
                     double val)

setDouble

public void setDouble(java.lang.String key,
                      double val)

getDouble

public double getDouble(java.lang.String key,
                        double dft)

getDouble

public double getDouble(java.lang.String key)

getDeviceDescriptionComparator

public static java.util.Comparator<FieldData> getDeviceDescriptionComparator()

sortByDeviceDescription

public static void sortByDeviceDescription(java.util.List<FieldData> fieldDataList)