| java.lang.Object org.dbunit.dataset.datatype.DataType
All known Subclasses: org.dbunit.dataset.datatype.AbstractDataType,
DataType | abstract public class DataType (Code) | | author: Manuel Laflamme version: $Revision: 554 $ |
Method Summary | |
public static String | asString(Object value) Typecast the specified value to string. | abstract public int | compare(Object o1, Object o2) Returns a negative integer, zero, or a positive integer as the first
argument is less than, equal to, or greater than the second. | public static DataType | forObject(Object value) Returns the DataType corresponding to the specified value
runtime class. | public static DataType | forSqlType(int sqlType) Returns the DataType corresponding to the specified Sql
type. | public static DataType | forSqlTypeName(String sqlTypeName) Returns the DataType corresponding to the specified Sql
type name. | abstract public int | getSqlType() Returns the coresponding
java.sql.Types . | abstract public Object | getSqlValue(int column, ResultSet resultSet) Returns the specified column value from the specified resultset object. | abstract public Class | getTypeClass() Returns the runtime class of the typecast result. | abstract public boolean | isDateTime() Returns true if this DataType represents a
date and/or time. | abstract public boolean | isNumber() Returns true if this DataType represents a
number. | abstract public void | setSqlValue(Object value, int column, PreparedStatement statement) Set the specified value to the specified prepared statement object. | abstract public Object | typeCast(Object value) |
compare | abstract public int compare(Object o1, Object o2) throws TypeCastException(Code) | | Returns a negative integer, zero, or a positive integer as the first
argument is less than, equal to, or greater than the second.
The two values are typecast to this DataType before being compared.
throws: TypeCastException - if the arguments' types prevent them frombeing compared by this Comparator. |
forObject | public static DataType forObject(Object value)(Code) | | Returns the DataType corresponding to the specified value
runtime class. This method returns DataType.UNKNOWN
if the value is null or runtime class not recognized.
|
getTypeClass | abstract public Class getTypeClass()(Code) | | Returns the runtime class of the typecast result.
|
isDateTime | abstract public boolean isDateTime()(Code) | | Returns true if this DataType represents a
date and/or time.
|
isNumber | abstract public boolean isNumber()(Code) | | Returns true if this DataType represents a
number.
|
|
|