com.objex.panywhere
Class DataType

java.lang.Object
  extended by com.objex.panywhere.DataType
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BooleanDataType, DateDataType, DropDownDataType, MarkerDataType, NumberDataType, TextDataType, YesNoDataType

public abstract class DataType
extends java.lang.Object
implements java.io.Serializable

Describes the data type of the database field used by the control. This determines what operations may or may not be performed on that field.

See Also:
Serialized Form

Field Summary
static DataType BOOLEAN_TYPE
          Boolean data type values are true and false
static DataType DATE_TYPE
          Date DataType
static DataType MARKER_TYPE
          Marker data type
static DataType NUMBER_TYPE
          Number data type (Integer, Double, Float etc)
static DataType TEXT_TYPE
          Text data type for strings
static DataType YESNO_TYPE
          Yes/No Data Type whose values are Y/N
 
Constructor Summary
DataType()
           
 
Method Summary
 void addTypeValue(java.lang.String id, java.lang.String val)
          Adds a subvalue that makes up complex types such as Drop Down Lists or other such types
 java.lang.Class getDataTypeClass()
           
 int getTypeid()
           
 java.lang.String getTypename()
          Returns the actual data type name or description for this data type
 java.lang.String getTypeValue(java.lang.String id)
          Returns the subvalue from the list of subvalues that are relevant for this Data type
protected  java.util.Map getTypeValues()
          Returns an Iterarable list of all type values.
abstract  java.lang.String getXMLOutput()
          Constructs and returns the XML output that represents this subelement of the element
 void setDataTypeClass(java.lang.Class dataTypeClass)
           
protected  void setTypeid(int typeid)
           
 void setTypename(java.lang.String rhs)
          Set the datatyep name e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUMBER_TYPE

public static final DataType NUMBER_TYPE
Number data type (Integer, Double, Float etc)


TEXT_TYPE

public static final DataType TEXT_TYPE
Text data type for strings


YESNO_TYPE

public static final DataType YESNO_TYPE
Yes/No Data Type whose values are Y/N


BOOLEAN_TYPE

public static final DataType BOOLEAN_TYPE
Boolean data type values are true and false


DATE_TYPE

public static final DataType DATE_TYPE
Date DataType


MARKER_TYPE

public static final DataType MARKER_TYPE
Marker data type

Constructor Detail

DataType

public DataType()
Method Detail

getXMLOutput

public abstract java.lang.String getXMLOutput()
Constructs and returns the XML output that represents this subelement of the element


setTypename

public void setTypename(java.lang.String rhs)
Set the datatyep name e.g. "text" or "dropdown"


getTypename

public java.lang.String getTypename()
Returns the actual data type name or description for this data type


addTypeValue

public void addTypeValue(java.lang.String id,
                         java.lang.String val)
Adds a subvalue that makes up complex types such as Drop Down Lists or other such types

Parameters:
id - The ID of the Type Value of this data type
val - The actual subvalue of this data type -- relevant for complex types

getTypeValue

public java.lang.String getTypeValue(java.lang.String id)
Returns the subvalue from the list of subvalues that are relevant for this Data type

Parameters:
id - The ID of the subfield to be retrieved.
Returns:
The subvalue or an empty string

getTypeValues

protected java.util.Map getTypeValues()
Returns an Iterarable list of all type values. Null will be returned if the data type concerned does not have types values or if it is a simple data type.


getDataTypeClass

public java.lang.Class getDataTypeClass()
Returns:
The class represented by this datatype. The default class is Object if no class was specified

setDataTypeClass

public void setDataTypeClass(java.lang.Class dataTypeClass)

getTypeid

public int getTypeid()
Returns:
The Type ID for this field type.

setTypeid

protected void setTypeid(int typeid)