|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.svcon.jdbf.JDBField
A database field. Its attributes are name, type, length, and decimal count.
| Constructor Summary | |
JDBField(java.lang.String name,
char type,
int length,
int decimalCount)
Construct a database field with a given name, type, length, and decimal count. |
|
| Method Summary | |
java.lang.String |
format(java.lang.Object value)
Formats a value to its String representation, based on the fields parameters. |
int |
getDecimalCount()
Returns the decimal count of the field. |
int |
getLength()
Returns the length of the field. |
java.lang.String |
getName()
Returns the name of the field. |
char |
getType()
Returns the type of the field. |
java.lang.Object |
parse(java.lang.String value)
Parses a formatted String and returns an object of type, corresponding to this field. |
java.lang.String |
toString()
Returns the String representation of the JDBField. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public JDBField(java.lang.String name,
char type,
int length,
int decimalCount)
throws JDBFException
name - the name of the field.type - the type of the field. It needs to be one of the following
characters: 'N' - numeric; 'C' - character; 'L' - logical;
'D' - date; 'F' - floating point.length - the length of the field.decimalCount - the number of decimal positions after the decimal point.JDBFException - if the parameters passed do not comply with the DBF specs.| Method Detail |
public java.lang.String getName()
public char getType()
public int getLength()
public int getDecimalCount()
public java.lang.String format(java.lang.Object value)
throws JDBFException
value - the valueJDBFException - if the value passed cannot be formatted.
public java.lang.Object parse(java.lang.String value)
throws JDBFException
value - the String value.JDBFException - if the value passed cannot be parsed.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||