|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JCoRecordMetaData
Encapsulates the metadata of either a structure or a table. Each element of metadata describes a field of these record oriented data containers in terms of name, type, length, offsets, etc. JCoRecordMetadata objects are mainly used to create structures and tables of a certain layout. JCoRecordMetadata contains all the metadata which is specific to records
JCoStructure
,
JCoTable
Field Summary |
---|
Fields inherited from interface com.sap.conn.jco.JCoMetaData |
---|
TYPE_ABAPOBJECT, TYPE_BCD, TYPE_BOX, TYPE_BYTE, TYPE_CDAY, TYPE_CHAR, TYPE_DATE, TYPE_DECF16, TYPE_DECF34, TYPE_DTDAY, TYPE_DTMONTH, TYPE_DTWEEK, TYPE_EXCEPTION, TYPE_FLOAT, TYPE_GENERIC_BOX, TYPE_INT, TYPE_INT1, TYPE_INT2, TYPE_INT8, TYPE_INVALID, TYPE_ITAB, TYPE_NUM, TYPE_STRING, TYPE_STRUCTURE, TYPE_TABLE, TYPE_TIME, TYPE_TMINUTE, TYPE_TSECOND, TYPE_UTCLONG, TYPE_UTCMINUTE, TYPE_UTCSECOND, TYPE_XSTRING, UNINITIALIZED |
Method Summary | |
---|---|
void |
add(String name,
int type,
int nucByteLength,
int nucByteOffset,
int ucByteLength,
int ucByteOffset)
Adds a new scalar field descriptor to the metadata object. |
void |
add(String name,
int type,
int nucByteLength,
int nucByteOffset,
int ucByteLength,
int ucByteOffset,
int decimals,
String description,
Object tabMetaData,
JCoExtendedFieldMetaData extended)
Adds a new field descriptor to the metadata object. |
void |
add(String name,
int type,
int nucByteOffset,
int ucByteOffset,
JCoRecordMetaData recordMetaData)
Adds a new complex field descriptor to the metadata object, i.e. |
int |
getByteOffset(int index)
Returns the offset in a non-Unicode layout of the data field at the specified index. |
int |
getByteOffset(String fieldName)
Returns the offset in a non-Unicode layout of the field with the specified name. |
String |
getLineType()
In case the JCoRecordMetaData represents a table type, getLineType() returns the
name of the structure, table or data element, which is the line type of the table. |
int |
getRecordLength()
Returns the total length of a structure or single row of a table with a non-Unicode layout. |
int |
getUnicodeByteOffset(int index)
Returns the offset in a Unicode layout of the data field at the specified index. |
int |
getUnicodeByteOffset(String fieldName)
Returns the offset in a Unicode layout of the field with the specified name. |
int |
getUnicodeRecordLength()
Returns the total length of a structure or single row of a table with a Unicode layout. |
boolean |
isNestedType1Structure()
Checks whether this JCoRecordMetaData is a nested TYPE1 structure, which is a structure with a fixed length in memory, but with a nested layout. |
void |
setLineType(String lineTypeName)
In case the JCoRecordMetaData is created for a JCoCustomRepository and represents a table type,
setLineType() allows setting the name of the structure, table or data element,
which is the line type of the table. |
void |
setRecordLength(int recordNUCLength,
int recordUCLength)
Sets the total length of a structure or single row of a table. |
Method Detail |
---|
void add(String name, int type, int nucByteLength, int nucByteOffset, int ucByteLength, int ucByteOffset)
name
- Field name for identifying this data fieldtype
- Data field typenucByteLength
- Data field length in bytes for non-Unicode layoutucByteLength
- Data field length in bytes for Unicode layoutnucByteOffset
- Data field offset in bytes for non-Unicode layoutucByteOffset
- Data field offset in bytes for Unicode layoutvoid add(String name, int type, int nucByteOffset, int ucByteOffset, JCoRecordMetaData recordMetaData)
name
- Field name for identifying this data fieldtype
- Data field typenucByteOffset
- Data field offset in bytes for non-Unicode layoutucByteOffset
- Data field offset in bytes for Unicode layoutrecordMetaData
- the metadata for the structure or tablevoid add(String name, int type, int nucByteLength, int nucByteOffset, int ucByteLength, int ucByteOffset, int decimals, String description, Object tabMetaData, JCoExtendedFieldMetaData extended)
name
- Field name for identifying this data fieldtype
- Data field typenucByteLength
- Data field length in bytes for non-Unicode layoutucByteLength
- Data field length in bytes for Unicode layoutnucByteOffset
- Data field offset in bytes for non-Unicode layoutucByteOffset
- Data field offset in bytes for Unicode layoutdecimals
- Data field number of decimals (only necessary for the data types TYPE_BCD and TYPE_FLOAT)description
- Descriptional text of the data fieldtabMetaData
- metadata if the field is a complex field, i.e. structure or table, null
otherwiseextended
- extended metadata for this field or null
if none available.int getUnicodeByteOffset(int index)
index
- the index of the field
int getUnicodeByteOffset(String fieldName)
fieldName
- the name of the field
JCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND if a field with this name does not existint getByteOffset(int index)
index
- the index of the field
int getByteOffset(String fieldName)
fieldName
- the name of the field
JCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND if a field with this name does not existint getUnicodeRecordLength()
int getRecordLength()
void setRecordLength(int recordNUCLength, int recordUCLength)
UnsupportedOperationException
will be thrown.
recordNUCLength
- the byte length of the structure with non-Unicode layoutrecordUCLength
- the byte length of the structure with Unicode layoutboolean isNestedType1Structure()
true
if the JCoRecordData is a nested TYPE1 structure, false
otherwiseString getLineType()
getLineType()
returns the
name of the structure, table or data element, which is the line type of the table. If the
metadata represents a structure, null
is returned.
null
otherwisevoid setLineType(String lineTypeName)
JCoCustomRepository
and represents a table type,
setLineType()
allows setting the name of the structure, table or data element,
which is the line type of the table. If the meta data instance has already been locked, an UnsupportedOperationException
will be thrown.
lineTypeName
- the name of the line type for table types, null
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |