javax.rad.model.datatype
Class BinaryDataType

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

public class BinaryDataType
extends DataType

A BinaryDataType is the data type class of a binary ColumnDefinition.

See Also:
Serialized Form

Field Summary
static int TYPE_IDENTIFIER
          the type identifier.
 
Constructor Summary
BinaryDataType()
          Constructs a BinaryDataType with the maximum Integer size.
 
Method Summary
 BinaryDataType clone()
          Clone an IDataType.
 int compareTo(Object pObject1, Object pObject2)
          Compares IDataType objects in the rules of the Comparable interface. Implementations need to take care about to null objects are equal.
 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
getCellEditor, getCellRenderer, getSize, hashCode, 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

BinaryDataType

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

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

compareTo

public int compareTo(Object pObject1,
                     Object pObject2)
Compares IDataType objects in the rules of the Comparable interface. Implementations need to take care about to null objects are equal.

Specified by:
compareTo in interface IDataType
Overrides:
compareTo in class DataType
Parameters:
pObject1 - a getTypeClass() object of one IDataType
pObject2 - a getTypeClass() object of one IDataType
Returns:
-1 if pObject1 is smaller, 0 if equal and +1 if it is greater then pObject2

clone

public BinaryDataType 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.