javax.rad.model.datatype
Class StringDataType

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

public class StringDataType
extends DataType

A StringDataType is the data type class of a String ColumnDefinition.

See Also:
Serialized Form

Field Summary
static int TYPE_IDENTIFIER
          the type identifier.
 
Constructor Summary
StringDataType()
          Constructs a StringDataType with the maximum Integer size.
StringDataType(ICellEditor pCellEditor)
          Constructs a StringDataType with the maximum Integer size and the given cell editor.
StringDataType(int pSize)
          Constructs a StringDataType with the given Integer size.
StringDataType(int pSize, ICellEditor pCellEditor)
          Constructs a StringDataType with the given Integer size and the given cell editor.
 
Method Summary
 StringDataType 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.
 Class getTypeClass()
          Returns the class of the Object's handled by IDataType.
 int getTypeIdentifier()
          Gets the data type identifier.
 
Methods inherited from class javax.rad.model.datatype.DataType
compareTo, getCellEditor, getCellRenderer, getSize, 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

StringDataType

public StringDataType()
Constructs a StringDataType with the maximum Integer size.


StringDataType

public StringDataType(int pSize)
Constructs a StringDataType with the given Integer size.

Parameters:
pSize - the size

StringDataType

public StringDataType(ICellEditor pCellEditor)
Constructs a StringDataType with the maximum Integer size and the given cell editor.

Parameters:
pCellEditor - the cell editor

StringDataType

public StringDataType(int pSize,
                      ICellEditor pCellEditor)
Constructs a StringDataType with the given Integer size and the given cell editor.

Parameters:
pSize - the size
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.

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

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

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

clone

public StringDataType 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()


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.