javax.rad.model.datatype
Class TimestampDataType

java.lang.Object
  extended by javax.rad.model.datatype.DataType
      extended by javax.rad.model.datatype.TimestampDataType
All Implemented Interfaces:
Serializable, Cloneable, IDataType

public class TimestampDataType
extends DataType

A TimestampDataType is the data type class of a Timestamp ColumnDefinition.

See Also:
Serialized Form

Field Summary
static int TYPE_IDENTIFIER
          the type identifier.
 
Constructor Summary
TimestampDataType()
          Constructs a ObjectDataType.
TimestampDataType(ICellEditor pCellEditor)
          Constructs a ObjectDataType cell editor.
 
Method Summary
 TimestampDataType clone()
          Clone an IDataType.
 Object convertAndCheckToTypeClass(Object pObject)
          Converts the oObject to an Object which is an instance of the class which is handled by IDataType.
 String convertToString(Object pObject)
          Converts the oObject into a String which represents the Object.
 Object convertToTypeClass(Object pObject)
          Converts the oObject to an Object which is an instance of the class which is handled by IDataType.
 String getDateFormat()
          Returns the current DateFormat.
 int getSize()
          Returns the size of the DataType.
 Class getTypeClass()
          Returns the class of the Object's handled by IDataType.
 int getTypeIdentifier()
          Gets the data type identifier.
 void setDateFormat(String pDateFormat)
          Sets the current DateFormat.
 
Methods inherited from class javax.rad.model.datatype.DataType
compareTo, getCellEditor, getCellRenderer, hashCode, prepareValue, setCellEditor, setCellRenderer, setSize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_IDENTIFIER

public static final int TYPE_IDENTIFIER
the type identifier.

See Also:
Constant Field Values
Constructor Detail

TimestampDataType

public TimestampDataType()
Constructs a ObjectDataType.


TimestampDataType

public TimestampDataType(ICellEditor pCellEditor)
Constructs a ObjectDataType cell editor.

Parameters:
pCellEditor - the cell editor
Method Detail

getTypeIdentifier

public int getTypeIdentifier()
Gets the data type identifier.

Returns:
a unique type identifier

getTypeClass

public Class getTypeClass()
Returns the class of the Object's handled by IDataType.

Returns:
the class of the Object's handled by IDataType.

convertToString

public String convertToString(Object pObject)
Converts the oObject into a String which represents the Object.

Parameters:
pObject - the source Object to convert
Returns:
the String representation of the source Object

convertAndCheckToTypeClass

public Object convertAndCheckToTypeClass(Object pObject)
                                  throws ModelException
Converts the oObject to an Object which is an instance of the class which is handled by IDataType. The resulting Object is also checked against the type attributes like size, precision,...

Parameters:
pObject - the source Object to convert
Returns:
the converted Object that is instance of the class which is handled by IDataType.
Throws:
ModelException - if the Object is outside the limits of the DataType attributes

convertToTypeClass

public Object convertToTypeClass(Object pObject)
                          throws ModelException
Converts the oObject to an Object which is an instance of the class which is handled by IDataType.

Parameters:
pObject - the source Object to convert
Returns:
the converted Object that is instance of the class which is handled by IDataType.
Throws:
ModelException - if the class/type of oObject is not supported

getSize

public int getSize()
Returns the size of the DataType.

Overrides:
getSize in class DataType
Returns:
the size of the DataType.

clone

public TimestampDataType clone()
Clone an IDataType.

Specified by:
clone in interface IDataType
Overrides:
clone in class DataType
Returns:
a clone of this IDataType
See Also:
Object.clone()

getDateFormat

public String getDateFormat()
Returns the current DateFormat.

Returns:
the current DateFormat.

setDateFormat

public void setDateFormat(String pDateFormat)
Sets the current DateFormat.

Parameters:
pDateFormat - the new DateFormat.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.