public interface JCoField
Modifier and Type | Method and Description |
---|---|
BigDecimal |
getBigDecimal()
Returns the field's value as a BigDecimal object.
|
BigInteger |
getBigInteger()
Returns the field's value as a BigInteger object.
|
InputStream |
getBinaryStream()
Returns the field's value as a stream of uninterpreted bytes in form of a java.io.InputStream object.
|
byte |
getByte()
Returns the field's value as a as a byte.
|
byte[] |
getByteArray()
Returns the field's value as a byte array.
|
int |
getByteLength()
Returns the length of this field in non-Unicode layout.
|
char |
getChar()
Returns the field's value as a character.
|
Reader |
getCharacterStream()
Returns the value of the i'th field as a stream of characters in form of a java.io.Reader object.
|
char[] |
getCharArray()
Returns the field's value as a char array.
|
String |
getClassNameOfValue()
Returns the fully-qualified name of the Java class whose instances
are manufactured if the method Field.getValue() is called
to retrieve a value from a field.
|
Date |
getDate()
Returns the field's value as a Date object.
|
int |
getDecimals()
Returns the number of decimals for this field.
|
String |
getDescription()
Returns a textual description for this field.
|
double |
getDouble()
Returns the field's value as a double.
|
JCoExtendedFieldMetaData |
getExtendedFieldMetaData()
Returns the extended field metadata object.
|
float |
getFloat()
Returns the field's value as a float.
|
int |
getInt()
Returns the field's value as an int.
|
int |
getLength()
Returns the max length of the data field.
|
long |
getLong()
Returns the field's value as a long.
|
String |
getName()
Returns the name of this field.
|
JCoRecordMetaData |
getRecordMetaData()
Returns the field metadata object in case of complex object (table or structure),
or null .
|
short |
getShort()
Returns the field's value as a short.
|
String |
getString()
Returns the field's value as a string.
|
JCoStructure |
getStructure()
Returns the field's value as a JCoStructure object.
|
JCoTable |
getTable()
Returns the field's value as a JCoTable object.
|
Date |
getTime()
Returns the field's value as a Date object.
|
int |
getType()
Returns the type of this field.
|
String |
getTypeAsString()
Returns the field's type as a string.
|
int |
getUnicodeByteLength()
Returns the length of this field in Unicode layout.
|
Object |
getValue()
Returns the field's value as an object.
|
boolean |
isInitialized()
Checks whether this field has been initialized.
|
boolean |
isStructure()
Checks whether this field is a structure parameter.
|
boolean |
isTable()
Checks whether this field is a table parameter.
|
void |
setValue(byte value)
Sets the specified byte as the field's value.
|
void |
setValue(byte[] value)
Sets the specified byte array as the field's value.
|
void |
setValue(char value)
Sets the specified character as the field's value.
|
void |
setValue(char[] value,
int offset,
int length)
Sets the specified character array as the field's value.
|
void |
setValue(double value)
Sets the specified double as the field's value.
|
void |
setValue(int value)
Sets the specified integer as the field's value.
|
void |
setValue(JCoStructure value)
Sets the specified structure as the field's value.
|
void |
setValue(JCoTable value)
Sets the specified table as the field's value.
|
void |
setValue(long value)
Sets the specified long as the field's value.
|
void |
setValue(Object value)
Sets the specified object as the field's value.
|
void |
setValue(short value)
Sets the specified short as the field's value.
|
void |
setValue(String value)
Sets the specified string as the field's value.
|
Writer |
write(Writer writer)
Writes the field to a java.io.Writer.
|
boolean isInitialized()
boolean isStructure()
boolean isTable()
String getName()
int getType()
int getByteLength()
int getUnicodeByteLength()
int getLength()
int getDecimals()
String getDescription()
String getTypeAsString()
JCoExtendedFieldMetaData getExtendedFieldMetaData()
JCoRecordMetaData getRecordMetaData()
String getClassNameOfValue()
Object getValue()
ConversionException
- thrown if the value could not be converted to an ObjectString getString()
ConversionException
- thrown if the value could not be converted to a Stringchar getChar()
ConversionException
- thrown if the value could not be converted to a charchar[] getCharArray()
getString()
this method
does not trim trailing blanks and it does not format date and time fields
with :
or -
separator chars.ConversionException
- thrown if the value could not be converted to a char arrayshort getShort()
ConversionException
- thrown if the value could not be converted to a shortint getInt()
ConversionException
- thrown if the value could not be converted to a intlong getLong()
ConversionException
- thrown if the value could not be converted to a longBigInteger getBigInteger()
ConversionException
- thrown if the value could not be converted to a BigIntegerdouble getDouble()
ConversionException
- thrown if the value could not be converted to a doublebyte getByte()
ConversionException
- thrown if the value could not be converted to a bytefloat getFloat()
ConversionException
- thrown if the value could not be converted to a floatBigDecimal getBigDecimal()
ConversionException
- thrown if the value could not be converted to a BigDecimalDate getDate()
ConversionException
- thrown if the value could not be converted to a DateDate getTime()
ConversionException
- thrown if the value could not be converted to a Datebyte[] getByteArray()
ConversionException
- thrown if the value could not be converted to a byte[] array.InputStream getBinaryStream()
ConversionException
- thrown if the value could not be converted to an java.io.InputStreamReader getCharacterStream()
ConversionException
- thrown if the value could not be converted to an java.io.ReaderJCoTable getTable()
ConversionException
- thrown if the value could not be converted to a JCoTableJCoStructure getStructure()
ConversionException
- thrown if the value could not be converted to a JCoStructurevoid setValue(Object value)
value
- the new value of this fieldConversionException
- thrown if the value could not be converted to its internal representationvoid setValue(String value)
value
- the new value of this fieldConversionException
- thrown if the value could not be converted to its internal representationvoid setValue(char value)
value
- the new value of this fieldConversionException
- thrown if the value could not be converted to its internal representationvoid setValue(char[] value, int offset, int length)
value
- the new value of this fieldoffset
- in the valuelength
- number of charsConversionException
- thrown if the value could not be converted to its internal representationvoid setValue(short value)
value
- the new value of this fieldConversionException
- thrown if the value could not be converted to its internal representationvoid setValue(int value)
value
- the new value of this fieldConversionException
- thrown if the value could not be converted to its internal representationvoid setValue(long value)
value
- the new value of this fieldConversionException
- thrown if the value could not be converted to its internal representationvoid setValue(double value)
value
- the new value of this fieldConversionException
- thrown if the value could not be converted to its internal representationvoid setValue(byte[] value)
value
- the new value of this fieldConversionException
- thrown if the value could not be converted to its internal representationvoid setValue(byte value)
value
- the new value of this fieldConversionException
- thrown if the value could not be converted to its internal representationvoid setValue(JCoStructure value)
value
- the new value of this fieldConversionException
- thrown if the value could not be converted to its internal representationvoid setValue(JCoTable value)
value
- the new value of this fieldConversionException
- thrown if the value could not be converted to its internal representationWriter write(Writer writer) throws IOException
See JCoRecord.write(int, Writer) for details.
writer
- writer instance used to writeConversionException
- if the field is complex.IOException
- if writer throws IOExceptionJCoRecord.write(int, Writer)
Copyright © 2020 SAP. All Rights Reserved.