public interface JCoRecord extends Serializable, Cloneable, Iterable<JCoField>
| Getter-Method / Datatype | JCoMetaData.TYPE_CHAR | JCoMetaData.TYPE_INT1 | JCoMetaData.TYPE_INT2 | JCoMetaData.TYPE_INT | JCoMetaData.TYPE_INT8 | JCoMetaData.TYPE_UTCLONG | JCoMetaData.TYPE_NUM | JCoMetaData.TYPE_BCD | JCoMetaData.TYPE_FLOAT | JCoMetaData.TYPE_BYTE | JCoMetaData.TYPE_DATE | JCoMetaData.TYPE_TIME | JCoMetaData.TYPE_STRING | JCoMetaData.TYPE_XSTRING | JCoMetaData.TYPE_DECF16 | JCoMetaData.TYPE_DECF34 | JCoMetaData.TYPE_STRUCTURE | JCoMetaData.TYPE_TABLE | JCoMetaData.TYPE_ABAPOBJECT |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| java.lang.Object getValue() | String | Integer | Integer | Integer | Long | String | String | BigDecimal | Double | byte[] | Date | Date | String | byte[] | BigDecimal | BigDecimal | JCoStructure | JCoTable | JCoAbapObject |
| String getString() | String | String | String | String | String | String | String | String | String | String (hexadecimal) | String | String | String | String (hexadecimal) | String | String | String (structure name) | String (table name) | String (class name) |
| char getChar() | char | --- | --- | --- | --- | --- | char | --- | --- | --- | --- | --- | char | --- | --- | --- | --- | --- | --- |
| char[] getCharArray() | char[] | --- | --- | --- | --- | --- | char[] | --- | --- | --- | char[] | char[] | char[] | --- | --- | --- | --- | --- | --- |
| byte getByte() | byte | byte | byte | byte | byte | --- | byte | --- | --- | byte | --- | --- | byte | byte | --- | --- | --- | --- | --- |
| short getShort() | short | short | short | short | short | --- | short | --- | --- | short | --- | --- | short | short | --- | --- | --- | --- | --- |
| int getInt() | int | int | int | int | int | --- | int | --- | --- | int | --- | --- | int | int | --- | --- | --- | --- | --- |
| long getLong() | long | long | long | long | long | long | long | --- | --- | long | --- | --- | long | long | --- | --- | --- | --- | --- |
| java.math.BigInteger getBigInteger() | BigInteger | BigInteger | BigInteger | BigInteger | BigInteger | --- | BigInteger | BigInteger | --- | --- | --- | --- | BigInteger | --- | --- | --- | --- | --- | --- |
| double getFloat() | float | float | float | float | float | --- | float | float | float | --- | --- | --- | float | --- | --- | --- | --- | --- | --- |
| double getDouble() | double | double | double | double | double | --- | double | double | double | --- | --- | --- | double | --- | --- | --- | --- | --- | --- |
| java.math.BigDecimal getBigDecimal() | BigDecimal | BigDecimal | BigDecimal | BigDecimal | BigDecimal | --- | BigDecimal | BigDecimal | BigDecimal | --- | --- | --- | BigDecimal | --- | BigDecimal | BigDecimal | --- | --- | --- |
| java.util.Date getDate() | Date | --- | --- | --- | --- | Date | --- | --- | --- | --- | Date | Date | Date | --- | --- | --- | --- | --- | --- |
| java.util.Date getTime() | Date | --- | --- | --- | --- | Date | --- | --- | --- | --- | --- | Date | Date | --- | --- | --- | --- | --- | --- |
| byte[] getByteArray() | byte[] | --- | --- | --- | --- | --- | --- | --- | --- | byte[] | --- | --- | byte[] | byte[] | byte[] | byte[] | --- | --- | --- |
| java.io.InputStream getBinaryStream() | InputStream | --- | --- | --- | --- | --- | --- | --- | --- | InputStream | --- | --- | InputStream | InputStream | --- | --- | --- | --- | --- |
| java.io.Reader getCharacterStream() | Reader | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | Reader | --- | --- | --- | --- | --- | --- |
| com.sap.conn.jco.JCoStructure getStructure() | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | JCoStructure | --- | --- |
| com.sap.conn.jco.JCoTable getTable() | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | JCoTable | --- |
| com.sap.conn.jco.JCoAbapObject getAbapObject() | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | JCoAbapObject |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the record and resets everything to its initial state.
|
Object |
clone()
Clones the record instance.
|
int |
copyFrom(JCoRecord source)
Copies the matching fields from the source record into this record.
|
void |
fromJSON(Reader reader)
Deserializes all values from a given JSON representation into the fields of the
JCoRecord from a Reader. |
void |
fromJSON(String data)
Deserializes all values from a given JSON representation into the fields of the
JCoRecord. |
JCoAbapObject |
getAbapObject(int index)
Returns the value of the specified field as a
JCoAbapObject. |
JCoAbapObject |
getAbapObject(String fieldName)
Returns the value of the specified field as a
JCoAbapObject. |
BigDecimal |
getBigDecimal(int index)
Returns the value of the i'th field as a BigDecimal object.
|
BigDecimal |
getBigDecimal(String fieldName)
Returns the value of the i'th field as a BigDecimal object.
|
BigInteger |
getBigInteger(int index)
Returns the value of the i'th field as a BigInteger object.
|
BigInteger |
getBigInteger(String fieldName)
Returns the value of the i'th field as a BigInteger object.
|
InputStream |
getBinaryStream(int index)
Returns the value of the i'th field as a stream of uninterpreted bytes,
in form of a java.io.InputStream object.
|
InputStream |
getBinaryStream(String fieldName)
Returns the value of the named field as a stream of uninterpreted bytes in from of a java.io.InputStream object.
|
byte |
getByte(int index)
Returns the value of the i'th field as a byte.
|
byte |
getByte(String fieldName)
Returns the value of the named field as a byte.
|
byte[] |
getByteArray(int index)
Returns the value of the i'th field as a byte array.
|
byte[] |
getByteArray(String fieldName)
Returns the value of the named field as a byte array.
|
char |
getChar(int index)
Returns the value of the i'th field as a char.
|
char |
getChar(String fieldName)
Returns the value of the named field as a char.
|
Reader |
getCharacterStream(int index)
Returns the value of the i'th field as a java.io.Reader object.
|
Reader |
getCharacterStream(String fieldName)
Returns the value of the named field as a stream of characters in form of a java.io.Reader object.
|
char[] |
getCharArray(int index)
Returns the value of the i'th field as a char array.
|
char[] |
getCharArray(String fieldName)
Returns the value of the named field as a char array.
|
String |
getClassNameOfValue(String fieldName)
Returns the fully-qualified name of the Java class whose instances
are manufactured if the methods getValue(int index) or
getValue(String fieldName) are called to retrieve a
value from the field.
|
Date |
getDate(int index)
Returns the value of the i'th field as a
Date object containing a date or time value. |
Date |
getDate(String fieldName)
Returns the value of the named field as a
Date object containing a date or time value. |
double |
getDouble(int index)
Returns the value of the i'th field as a double.
|
double |
getDouble(String fieldName)
Returns the value of the named field as a double.
|
JCoField |
getField(int index)
Returns the i'th field.
|
JCoField |
getField(String fieldName)
Returns the named field.
|
int |
getFieldCount()
Returns the number of fields in this container.
|
JCoFieldIterator |
getFieldIterator()
Returns a JCoFieldIterator.
|
float |
getFloat(int index)
Returns the value of the i'th field as a float.
|
float |
getFloat(String fieldName)
Returns the value of the named field as a float.
|
int |
getInt(int index)
Returns the value of the i'th field as an integer.
|
int |
getInt(String fieldName)
Returns the value of the named field as an integer.
|
long |
getLong(int index)
Returns the value of the i'th field as a long.
|
long |
getLong(String fieldName)
Returns the value of the named field as a long.
|
JCoMetaData |
getMetaData()
Returns the appropriated metadata object that was used for
creation of this record.
|
short |
getShort(int index)
Returns the value of the i'th field as a short.
|
short |
getShort(String fieldName)
Returns the value of the named field as a short.
|
String |
getString(int index)
Returns the value of the i'th field as a String.
|
String |
getString(String fieldName)
Returns the value of the named field as a String object.
|
JCoStructure |
getStructure(int index)
Returns the value of the i'th field as a JCoStructure.
|
JCoStructure |
getStructure(String fieldName)
Returns the value of the named field as a JCoStructure object.
|
JCoTable |
getTable(int index)
Returns the value of the i'th field as a table.
|
JCoTable |
getTable(String fieldName)
Returns the value of the named field as a JCoTable object.
|
Date |
getTime(int index)
Returns the value of the i'th field as a
Date object containing a time value. |
Date |
getTime(String fieldName)
Returns the value of the named field as a
Date object containing a time value. |
Object |
getValue(int index)
Generic method that returns the value of the i'th field as an object.
|
Object |
getValue(String fieldName)
Returns the value of the named field as an object.
|
boolean |
isInitialized(int index)
Checks whether this field has been initialized.
|
boolean |
isInitialized(String fieldName)
Checks whether this field has been initialized.
|
Iterator<JCoField> |
iterator()
Returns an Iterator.
|
void |
setValue(int index,
BigDecimal value)
Sets the BigDecimal as the value for the i'th field.
|
void |
setValue(int index,
byte value)
Sets the byte as the value for the i'th field.
|
void |
setValue(int index,
byte[] value)
Sets the byte array as the value for the i'th field.
|
void |
setValue(int index,
char value)
Sets the specified character as the field's value.
|
void |
setValue(int index,
char[] value)
Sets the specified character array as the field's value.
|
void |
setValue(int index,
char[] value,
int from,
int length)
Sets a sequence of characters from the specified character array
as the field's value.
|
void |
setValue(int index,
double value)
Sets the double as the value for the i'th field.
|
void |
setValue(int index,
float value)
Sets the float as the value for the i'th field.
|
void |
setValue(int index,
int value)
Sets the int as the value for the i'th field.
|
void |
setValue(int index,
JCoAbapObject abapObject)
Sets the value of the specified field to be the given
JCoAbapObject. |
void |
setValue(int index,
JCoStructure value)
Sets the structure as the value for the i'th field.
|
void |
setValue(int index,
JCoTable value)
Sets the table as the value for the i'th field.
|
void |
setValue(int index,
long value)
Sets the long as the value for the i'th field.
|
void |
setValue(int index,
Object value)
Sets the object as the value for the i'th field.
|
void |
setValue(int index,
short value)
Sets the short as the value for the i'th field.
|
void |
setValue(int index,
String value)
Sets the specified string as the field's value.
|
void |
setValue(String name,
BigDecimal value)
Sets the BigDecimal as the value for the named field.
|
void |
setValue(String name,
byte value)
Sets the byte as the value for the named field.
|
void |
setValue(String name,
byte[] value)
Sets the byte array as the value for the named field.
|
void |
setValue(String name,
char value)
Sets the character as the value for the named field.
|
void |
setValue(String name,
char[] value)
Sets the specified character array as the value for the named field.
|
void |
setValue(String name,
char[] value,
int from,
int length)
Sets a sequence of characters from the specified character array
as the value for the named field.
|
void |
setValue(String name,
double value)
Sets the double as the value for the named field.
|
void |
setValue(String name,
float value)
Sets the float as the value for the named field.
|
void |
setValue(String name,
int value)
Sets the int as the value for the named field.
|
void |
setValue(String fieldName,
JCoAbapObject abapObject)
Sets the value of the specified field to be the given
JCoAbapObject. |
void |
setValue(String name,
JCoStructure value)
Sets the structure as the value for the named field.
|
void |
setValue(String name,
JCoTable value)
Sets the table as the value for the named field.
|
void |
setValue(String name,
long value)
Sets the long as the value for the named field.
|
void |
setValue(String name,
Object value)
Sets the object as the value for the named field.
|
void |
setValue(String name,
short value)
Sets the short as the value for the named field.
|
void |
setValue(String name,
String value)
Sets the string as the value for the named field.
|
String |
toJSON()
Returns the whole record in a JSON representation.
|
void |
toJSON(Writer writer)
Serializes the whole record in a JSON representation to a Writer.
|
String |
toXML()
Returns the whole record in XML format.
|
String |
toXML(int index)
Returns the value of the i'th field as an XML string.
|
String |
toXML(String fieldName)
Returns the value of the named field as an XML string.
|
Writer |
write(int index,
Writer writer)
Writes the field specified by the index to the provided Writer.
|
Writer |
write(String fieldName,
Writer writer)
Writes the named field to the provided Writer.
|
forEach, spliteratorJCoMetaData getMetaData()
void clear()
Object clone()
int copyFrom(JCoRecord source)
source - the source record from which to copy the dataJCoRuntimeException - if something went wrongint getFieldCount()
JCoField getField(int index)
index - the index of the fieldJCoField getField(String fieldName)
fieldName - the name of the fieldObject getValue(int index)
| Field datatype | Object |
|---|---|
| JCoMetaData.TYPE_CHAR | java.lang.String |
| JCoMetaData.TYPE_INT1 | java.lang.Integer |
| JCoMetaData.TYPE_INT2 | java.lang.Integer |
| JCoMetaData.TYPE_INT | java.lang.Integer |
| JCoMetaData.TYPE_INT8 | java.lang.Long |
| JCoMetaData.TYPE_NUM | java.lang.String |
| JCoMetaData.TYPE_BCD | java.math.BigDecimal |
| JCoMetaData.TYPE_FLOAT | java.lang.Double |
| JCoMetaData.TYPE_BYTE | byte[] |
| JCoMetaData.TYPE_UTCLONG | java.lang.String |
| JCoMetaData.TYPE_DATE | java.util.Date |
| JCoMetaData.TYPE_TIME | java.util.Date |
| JCoMetaData.TYPE_STRING | java.lang.String |
| JCoMetaData.TYPE_XSTRING | byte[] |
| JCoMetaData.TYPE_DECF16 | java.math.BigDecimal |
| JCoMetaData.TYPE_DECF34 | java.math.BigDecimal |
| JCoMetaData.TYPE_STRUCTURE | com.sap.conn.jco.JCoStructure |
| JCoMetaData.TYPE_TABLE | com.sap.conn.jco.JCoTable |
| JCoMetaData.TYPE_ABAPOBJECT | com.sap.conn.jco.JCoAbapObject |
index - the field indexConversionException - thrown if the value could not be converted to an objectIndexOutOfBoundsException - thrown if the index is out of rangeObject getValue(String fieldName)
| Field datatype | Object |
|---|---|
| JCoMetaData.TYPE_CHAR | java.lang.String |
| JCoMetaData.TYPE_INT1 | java.lang.Integer |
| JCoMetaData.TYPE_INT2 | java.lang.Integer |
| JCoMetaData.TYPE_INT | java.lang.Integer |
| JCoMetaData.TYPE_INT8 | java.lang.Long |
| JCoMetaData.TYPE_NUM | java.lang.String |
| JCoMetaData.TYPE_BCD | java.math.BigDecimal |
| JCoMetaData.TYPE_FLOAT | java.lang.Double |
| JCoMetaData.TYPE_BYTE | byte[] |
| JCoMetaData.TYPE_UTCLONG | java.lang.String |
| JCoMetaData.TYPE_DATE | java.util.Date |
| JCoMetaData.TYPE_TIME | java.util.Date |
| JCoMetaData.TYPE_STRING | java.lang.String |
| JCoMetaData.TYPE_XSTRING | byte[] |
| JCoMetaData.TYPE_DECF16 | java.math.BigDecimal |
| JCoMetaData.TYPE_DECF34 | java.math.BigDecimal |
| JCoMetaData.TYPE_STRUCTURE | com.sap.conn.jco.JCoStructure |
| JCoMetaData.TYPE_TABLE | com.sap.conn.jco.JCoTable |
| JCoMetaData.TYPE_ABAPOBJECT | com.sap.conn.jco.JCoAbapObject |
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to an objectJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existString getString(int index)
Note: If the data type of the field is TYPE_CHAR, this method trims all trailing blanks from the returned string. For the data types TYPE_DATE and TYPE_TIME the returned date and time strings are formatted using the patterns "yyyy-MM-dd" and "HH:mm:ss", respectively.
index - the index of the fieldConversionException - thrown if the value could not be converted to a StringIndexOutOfBoundsException - thrown if the index is out of rangeString getString(String fieldName)
Note: If the datatype of the field is TYPE_CHAR, this method trims all trailing blanks from the returned string. For the datatypes TYPE_DATE and TYPE_TIME the returned date and time strings are formatted using the patterns "yyyy-MM-dd" and "HH:mm:ss", respectively.
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a StringJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existchar getChar(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a char,
i.e. if the underlying field contained more than one characterIndexOutOfBoundsException - thrown if the index is out of rangechar getChar(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a charJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existchar[] getCharArray(int index)
Note: In contrast to getString(int index) this method
does not trim trailing blanks and it does not format date and time fields
with : or - separator chars.
index - the field indexConversionException - thrown if the value could not be converted to a char arrayIndexOutOfBoundsException - thrown if the index is out of rangechar[] getCharArray(String fieldName)
Note: In contrast to getString(String fieldName) this method
does not trim trailing blanks and it does not format date and time fields
with : or - separator chars.
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a byte[] arrayJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existbyte getByte(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a byteIndexOutOfBoundsException - thrown if the index is out of rangebyte getByte(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a byteJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existbyte[] getByteArray(int index)
index - the field indexConversionException - thrown if the value could not be converted to a byte arrayIndexOutOfBoundsException - thrown if the index is out of rangebyte[] getByteArray(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a byte arrayJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existshort getShort(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a shortshort getShort(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a shortJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existint getInt(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to an intint getInt(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to an intJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existlong getLong(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to an longIndexOutOfBoundsException - thrown if the index is out of rangelong getLong(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a longJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existfloat getFloat(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a floatfloat getFloat(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a floatJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existdouble getDouble(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a doubleIndexOutOfBoundsException - thrown if the index is out of rangedouble getDouble(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a doubleJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existBigInteger getBigInteger(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a BigIntegerIndexOutOfBoundsException - thrown if the index is out of rangeBigInteger getBigInteger(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a BigIntegerJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existBigDecimal getBigDecimal(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a BigDecimalIndexOutOfBoundsException - thrown if the index is out of rangeBigDecimal getBigDecimal(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a BigDecimalJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existDate getDate(int index)
Date object containing a date or time value. In case that
the field is of TYPE_UTCLONG the returned Date object contains a full timestamp.Date object containing a timestamp has a reduced precision with the split
seconds from the TYPE_UTCLONG field always being rounded down to milliseconds.index - the index of the fieldDate object containing a date, time or timestamp valueConversionException - thrown if the value could not be converted to a DateIndexOutOfBoundsException - thrown if the index is out of rangeDate getDate(String fieldName)
Date object containing a date or time value. In case that
the field is of TYPE_UTCLONG the returned Date object contains a full timestamp.Date object containing a timestamp has a reduced precision with the split
seconds from the TYPE_UTCLONG field always being rounded down to milliseconds.fieldName - the name of the fieldDate object containing a date, time or timestamp valueConversionException - thrown if the value could not be converted to a DateJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existDate getTime(int index)
Date object containing a time value. In case that
the field is of TYPE_UTCLONG the returned Date object contains a full timestamp.Date object containing a timestamp has a reduced precision with the split
seconds from the TYPE_UTCLONG field always being rounded down to milliseconds.index - the index of the fieldDate object containing a time or timestamp valueConversionException - thrown if the value could not be converted to a DateIndexOutOfBoundsException - thrown if the index is out of rangeDate getTime(String fieldName)
Date object containing a time value. In case that
the field is of TYPE_UTCLONG the returned Date object contains a full timestamp.Date object containing a timestamp has a reduced precision with the split
seconds from the TYPE_UTCLONG field always being rounded down to milliseconds.fieldName - the name of the fieldDate object containing a time or timestamp valueConversionException - thrown if the value could not be converted to a DateJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existInputStream getBinaryStream(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a java.io.InputStreamIndexOutOfBoundsException - thrown if the index is out of rangeInputStream getBinaryStream(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a java.io.InputStreamJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existReader getCharacterStream(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a java.io.ReaderIndexOutOfBoundsException - thrown if the index is out of rangeReader getCharacterStream(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a java.io.ReaderJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existJCoStructure getStructure(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a JCoStructureIndexOutOfBoundsException - thrown if the index is out of rangeJCoStructureJCoStructure getStructure(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a JCoStructureJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existJCoTable getTable(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a JCoTableIndexOutOfBoundsException - thrown if the index is out of rangeJCoTableJCoTable getTable(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a JCoTableJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existJCoAbapObject getAbapObject(int index)
JCoAbapObject.index - the index of the fieldJCoAbapObjectJCoAbapObject getAbapObject(String fieldName)
JCoAbapObject.fieldName - the name of the fieldJCoAbapObjectString getClassNameOfValue(String fieldName)
fieldName - the name of the fieldJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
String value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationvoid setValue(String name, String value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
char value)
value - the value to set for the fieldindex - the index of the fieldIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, char value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
char[] value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, char[] value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
char[] value,
int from,
int length)
value - the array to copy the character sequence from for setting the fieldfrom - index of the first character in the char[] to copy fromlength - the number of characters to copyindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, char[] value, int from, int length)
value - the array to copy the character sequence from for setting the fieldname - the name of the field to setfrom - index of the first character in the char[] to copy fromlength - the number of characters to copyConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
short value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, short value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
int value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, int value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
long value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, long value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
float value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, float value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
double value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, double value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
byte value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, byte value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
byte[] value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, byte[] value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
BigDecimal value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, BigDecimal value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
JCoStructure value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, JCoStructure value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
JCoTable value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, JCoTable value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existvoid setValue(int index,
JCoAbapObject abapObject)
JCoAbapObject.index - the index of the fieldabapObject - the value, a JCoAbapObjectvoid setValue(String fieldName, JCoAbapObject abapObject)
JCoAbapObject.fieldName - the name of the fieldabapObject - the value, a JCoAbapObjectvoid setValue(int index,
Object value)
value - the value to set for the fieldindex - the index of the fieldConversionException - thrown if the value could not be converted to its internal representationIndexOutOfBoundsException - thrown if the index is out of rangevoid setValue(String name, Object value)
value - the value to set for the fieldname - the name of the field to setConversionException - thrown if the value could not be converted to its internal representationJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existboolean isInitialized(int index)
index - of field that will be checkedIndexOutOfBoundsException - thrown if the index is out of rangeboolean isInitialized(String fieldName)
fieldName - of field that will be checkedJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existString toXML(int index)
index - the index of the fieldConversionException - thrown if the value could not be converted to a StringIndexOutOfBoundsException - thrown if the index is out of rangeString toXML(String fieldName)
fieldName - the name of the fieldConversionException - thrown if the value could not be converted to a StringJCoRuntimeException - thrown with group JCO_ERROR_FIELD_NOT_FOUND if a field with the specified name does not existString toXML()
ConversionException - thrown if the value could not be converted to a StringString toJSON()
The format is the one as produced by a Simple Transformation for the corresponding data type in ABAP.
void toJSON(Writer writer) throws IOException
Note: JCo will not close the writer. The format is the one as produced by a Simple Transformation for the corresponding data type in ABAP.
writer - a writer instance to which the document is writtenIOException - if the underlying writer throws an IOExceptionvoid fromJSON(Reader reader)
JCoRecord from a Reader.
Note: JCo will not close the reader.
reader - Reader to read the values from.void fromJSON(String data)
JCoRecord.data - the input JSON as a StringWriter write(int index, Writer writer) throws IOException
| Field data type | Output to the Writer instance |
|---|---|
| JCoMetaData.TYPE_CHAR | char buffer without trailing spaces |
| JCoMetaData.TYPE_DATE | chars in format yyyyMMdd |
| JCoMetaData.TYPE_TIME | chars in format HHmmss |
| JCoMetaData.TYPE_UTCLONG | chars in format yyyy-MM-ddTHH:mm:ss.SSSSSS |
| JCoMetaData.TYPE_NUM | char buffer |
| JCoMetaData.TYPE_STRING | string chars buffer |
| JCoMetaData.TYPE_XSTRING | hexadecimal representation of the xstring byte buffer |
| JCoMetaData.TYPE_BYTE | hexadecimal representation of the byte buffer |
| JCoMetaData.TYPE_BCD | char based representation of the number |
| JCoMetaData.TYPE_FLOAT | char based representation of the number |
| JCoMetaData.TYPE_INT1 | char based representation of the number |
| JCoMetaData.TYPE_INT2 | char based representation of the number |
| JCoMetaData.TYPE_INT | char based representation of the number |
| JCoMetaData.TYPE_INT8 | char based representation of the number |
| JCoMetaData.TYPE_DECF16 | char based representation of the number |
| JCoMetaData.TYPE_DECF34 | char based representation of the number |
| JCoMetaData.TYPE_STRUCTURE | not possible, exception will be thrown |
| JCoMetaData.TYPE_TABLE | not possible, exception will be thrown |
| JCoMetaData.TYPE_ABAPOBJECT | not possible, exception will be thrown |
index - of the field that should be written to outwriter - writer instance used to writeConversionException - if the field is complexJCoRuntimeException - with the key JCoException.JCO_ERROR_FIELD_NOT_FOUND if the field with the name is not availableIOException - if writer throws IOExceptionWriter write(String fieldName, Writer writer) throws IOException
| Field data type | Output to the Writer instance |
|---|---|
| JCoMetaData.TYPE_CHAR | char buffer without trailing spaces |
| JCoMetaData.TYPE_DATE | chars in format yyyyMMdd |
| JCoMetaData.TYPE_TIME | chars in format HHmmss |
| JCoMetaData.TYPE_UTCLONG | chars in format yyyy-MM-ddTHH:mm:ss.SSSSSS |
| JCoMetaData.TYPE_NUM | char buffer |
| JCoMetaData.TYPE_STRING | string chars buffer |
| JCoMetaData.TYPE_XSTRING | hexadecimal representation of the xstring byte buffer |
| JCoMetaData.TYPE_BYTE | hexadecimal representation of the byte buffer |
| JCoMetaData.TYPE_BCD | char based representation of the number |
| JCoMetaData.TYPE_FLOAT | char based representation of the number |
| JCoMetaData.TYPE_INT1 | char based representation of the number |
| JCoMetaData.TYPE_INT2 | char based representation of the number |
| JCoMetaData.TYPE_INT | char based representation of the number |
| JCoMetaData.TYPE_INT8 | char based representation of the number |
| JCoMetaData.TYPE_DECF16 | char based representation of the number |
| JCoMetaData.TYPE_DECF34 | char based representation of the number |
| JCoMetaData.TYPE_STRUCTURE | not possible, exception will be thrown |
| JCoMetaData.TYPE_TABLE | not possible, exception will be thrown |
| JCoMetaData.TYPE_ABAPOBJECT | not possible, exception will be thrown |
fieldName - name of the fieldwriter - write that is used to write operationConversionException - if the field is complexJCoRuntimeException - with the key JCoException.JCO_ERROR_FIELD_NOT_FOUND if the field with the name is not availableIOException - if writer throws IOExceptionwrite(int, Writer)JCoFieldIterator getFieldIterator()
Copyright © 2022 SAP. All rights reserved.