public interface JCoStructure extends JCoRecord
Modifier and Type | Method and Description |
---|---|
JCoRecordFieldIterator |
getRecordFieldIterator()
Returns an iterator over JCoRecordField.
|
JCoRecordMetaData |
getRecordMetaData()
Returns the appropriated metadata object, that was used for
creation of this record.
|
String |
getString()
Returns a String containing all fields concatenated to one single String.
|
void |
setString(String fieldsAsString)
Allows to set all fields of a Structure handed by one single String containing all fields values.
|
clear, clone, copyFrom, fromJSON, fromJSON, getAbapObject, getAbapObject, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBinaryStream, getBinaryStream, getByte, getByte, getByteArray, getByteArray, getChar, getChar, getCharacterStream, getCharacterStream, getCharArray, getCharArray, getClassNameOfValue, getDate, getDate, getDouble, getDouble, getField, getField, getFieldCount, getFieldIterator, getFloat, getFloat, getInt, getInt, getLong, getLong, getMetaData, getShort, getShort, getString, getString, getStructure, getStructure, getTable, getTable, getTime, getTime, getValue, getValue, isInitialized, isInitialized, iterator, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toJSON, toJSON, toXML, toXML, toXML, write, write
forEach, spliterator
JCoRecordMetaData getRecordMetaData()
JCoRecordFieldIterator getRecordFieldIterator()
JCoRecord.iterator()
String getString()
Note: The JCoStructure must be a flat Structure with only simple char-like fields, such as CHAR, NUM, DATE, TIME. The function mimics a 'c-style memcpy'. If the last field is TYPE_CHAR, this method trims all trailing blanks from the returned string. In addition to programming convenience, it should also improve runtime performance compared to fetching each single field one-by-one.
ConversionException
- thrown if the values could not be converted to a String or the JCoStructure does contain fields
any other than CHAR, NUM, DATE, TIMEvoid setString(String fieldsAsString)
Note: The JCoStructure must be a flat Structure with only simple char-like fields, such as CHAR, NUM, DATE, TIME. The function mimics a 'c-style memcpy'. In addition to programming convenience, it should also improve runtime performance compared to setting each single field one-by-one. The function will set all fields 'up to', meaning you can provide a much shorter String to set the first fields. If the String is longer than the internal buffer of all fields, the remaining Substring will be ignored. DATE and TIME values inside the String can contain '-' or ':' as formatter.
fieldsAsString
- the string to setConversionException
- thrown if the value could not be converted to its internal representation or the JCoStructure
does contain fields any other than CHAR, NUM, DATE, TIMECopyright © 2023 SAP. All rights reserved.