public abstract class DataFormatter
extends java.lang.Object
implements java.lang.Cloneable
Type Name Type ID Base Type Marker --------- ---------- ---------------- String STRING S Number NUMBER N Integer INTEGER Money MONEY Datetime DATETIME D Date DATE Time TIME Boolean BOOLEAN BAn instance of DataFormatter works with only one Type ID, which is specified at the construction time and is returned by getTypeId() method.
Modifier and Type | Field and Description |
---|---|
static int |
BOOLEAN |
static int |
DATE |
static int |
DATETIME |
static boolean |
DEBUG |
static int |
INTEGER |
static int |
MONEY |
static int |
NUMBER |
static int |
STRING |
static int |
TIME |
Constructor and Description |
---|
DataFormatter() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
clone() |
protected void |
debug(java.lang.String text) |
abstract java.lang.String |
format(java.lang.Object value)
Transform a specified simple Java Object into a String.
|
static int |
getBaseTypeId(int typeId)
Return the ID for the base type of the specified type.
|
static char |
getBaseTypeMarker(int typeId)
Return the one-character marker ('S','N','B' or 'D') for the
base type of the specified type.
|
abstract int |
getTypeId()
Return the type ID supported by this DataFormatter.
|
static int |
getTypeId(char typeMarker)
Translate the specified one-character base type marker
('S','N','B' or 'D') into the type ID.
|
static int |
getTypeId(java.lang.String type)
Return the type ID for the specified type name.
|
static java.lang.String |
getTypeName(int typeId)
Return the name for the specified type ID.
|
abstract java.lang.Object |
parse(java.lang.String text)
Transform a specified String into a simple Java Object.
|
public static final boolean DEBUG
public static final int STRING
public static final int NUMBER
public static final int INTEGER
public static final int MONEY
public static final int BOOLEAN
public static final int DATETIME
public static final int DATE
public static final int TIME
public abstract int getTypeId()
public abstract java.lang.String format(java.lang.Object value)
public abstract java.lang.Object parse(java.lang.String text) throws FndException
FndException
public static java.lang.String getTypeName(int typeId)
public static char getBaseTypeMarker(int typeId) throws FndException
FndException
public static int getBaseTypeId(int typeId) throws FndException
FndException
public static int getTypeId(char typeMarker) throws FndException
FndException
public static int getTypeId(java.lang.String type) throws FndException
"String" "Integer" "Number" "Money" "Boolean" "Date" "Time" "Datetime"
FndException
protected void debug(java.lang.String text)
public abstract java.lang.Object clone()
clone
in class java.lang.Object