public interface JCoMetaData extends Serializable, Cloneable
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_ABAPOBJECT
ABAP object.
|
static int |
TYPE_BCD
Packed BCD number, any length between 1 and 16 bytes.
|
static int |
TYPE_BOX
ABAP boxed component.
|
static int |
TYPE_BYTE
Raw data, binary, fixed length, zero padded.
|
static int |
TYPE_CDAY
Date representing a month and a day of the month without specifying a year.
|
static int |
TYPE_CHAR
1-byte or multi-byte character.Fixed sized, blank padded.
|
static int |
TYPE_DATE
Date ( YYYYYMMDD ).
|
static int |
TYPE_DECF16
decimal floating point.
|
static int |
TYPE_DECF34
decimal floating point.
|
static int |
TYPE_DTDAY
Date representing year, month, and day.
|
static int |
TYPE_DTMONTH
Date representing a year and a month.
|
static int |
TYPE_DTWEEK
Date representing a year and a week of the year.
|
static int |
TYPE_EXCEPTION
ABAP exception.
|
static int |
TYPE_FLOAT
Floating point,double precision.
|
static int |
TYPE_GENERIC_BOX
ABAP boxed generic component.
|
static int |
TYPE_INT
4-byte integer.
|
static int |
TYPE_INT1
1-byte integer.
|
static int |
TYPE_INT2
2-byte integer.
|
static int |
TYPE_INT8
8-byte integer, corresponds to ABAP type '8'.
|
static int |
TYPE_INVALID
The field info does not contain a valid JCO type.
|
static int |
TYPE_ITAB
Internal table.
|
static int |
TYPE_NUM
Digits, fixed size,'0' padded.
|
static int |
TYPE_STRING
UTF8 encoded string of variable length.
|
static int |
TYPE_STRUCTURE
A heterogeneous structure.
|
static int |
TYPE_TABLE
A JCoTable.
|
static int |
TYPE_TIME
Time (HHMMSS).
|
static int |
TYPE_TMINUTE
Time representing hours and minutes.
|
static int |
TYPE_TSECOND
Time representing hours, minutes, and seconds.
|
static int |
TYPE_UTCLONG
Timestamp with high precision.
|
static int |
TYPE_UTCMINUTE
Timestamp with a precision of one minute.
|
static int |
TYPE_UTCSECOND
Timestamp with a precision of one second.
|
static int |
TYPE_XSTRING
Byte array of variable length.
|
static int |
UNINITIALIZED
The field info was not initialized yet.
|
Modifier and Type | Method and Description |
---|---|
int |
getByteLength(int index)
Returns the byte length of the data field for non-Unicode layout
at the specified index.
|
int |
getByteLength(String fieldName)
Returns the byte length of the field for non-Unicode layout
with the specified name.
|
String |
getClassNameOfField(int index)
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.
|
String |
getClassNameOfField(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.
|
int |
getDecimals(int index)
Returns the number of decimals of the data field at the specified index.
|
int |
getDecimals(String fieldName)
Returns the number of decimals for the field with the specified name
Decimals are only necessary for the JCO data types TYPE_BCD and TYPE_FLOAT, respectively.
|
String |
getDescription(int index)
Returns the descriptive text of the data field at the specified index.
|
String |
getDescription(String fieldName)
Returns the descriptive text for the field with the specified name.
|
JCoExtendedFieldMetaData |
getExtendedFieldMetaData(int index)
Returns the extended field metadata object at the specified index.
|
JCoExtendedFieldMetaData |
getExtendedFieldMetaData(String fieldName)
Returns the extended metadata object for the field with the specified name.
|
int |
getFieldCount()
Returns the number of entries (fields).
|
int |
getLength(int index)
Returns the max length of the data field at the specified index.
|
int |
getLength(String fieldName)
Returns the max length of the data field at the specified index.
|
String |
getName()
Returns the name of the table/structure this metadata describes.
|
String |
getName(int index)
Returns the field name of the data field at the specified index.
|
JCoRecordMetaData |
getRecordMetaData(int index)
Returns the metadata object for the field, if the specified field is a
table or structure and was defined with a reference to a metadata object.
|
JCoRecordMetaData |
getRecordMetaData(String fieldName)
Returns the metadata object for the field, if the specified field is a
table or structure and was defined with a reference to a metadata object.
|
String |
getRecordTypeName(int index)
Returns the table/structure name of the data field or
null if no table name is available. |
String |
getRecordTypeName(String fieldName)
Returns the table/structure or data element name of the data field or
null
if no table name or data element name is available. |
int |
getType(int index)
Returns the JCo data type of the data field at the specified index.
|
int |
getType(String fieldName)
Returns the JCo data type of the data for the field with the specified name.
|
String |
getTypeAsString(int index)
Returns a String representation of the JCo data type of the data field at the specified index.
|
String |
getTypeAsString(String fieldName)
Returns a String representation of the JCo data type of the data field for the field with the specified name.
|
int |
getUnicodeByteLength(int index)
Returns the length of the data field at the specified index for Unicode layout.
|
int |
getUnicodeByteLength(String fieldName)
Returns the length of the field with the specified name for Unicode layout.
|
boolean |
hasField(String fieldName)
Checks whether a named field exists.
|
int |
indexOf(String fieldName)
Returns the index of the named field info.
|
boolean |
isAbapObject(int index)
Checks whether the field with the specified index is an ABAP object.
|
boolean |
isAbapObject(String fieldName)
Checks whether the field with the specified name is an ABAP object.
|
boolean |
isLocked()
Returns whether this metadata instance is locked.
|
boolean |
isNestedType1Structure(int index)
Checks whether the field at the specified index is a nested TYPE1 structure, which is a
structure with a fixed length in memory, but with a nested layout.
|
boolean |
isNestedType1Structure(String fieldName)
Checks whether the field with the specified name is a nested TYPE1 structure, which is a
structure with a fixed length in memory, but with a nested layout.
|
boolean |
isStructure(int index)
Checks whether the field at the specified index is a structure parameter.
|
boolean |
isStructure(String fieldName)
Checks whether the field with the specified name is a structure parameter.
|
boolean |
isTable(int index)
Checks whether the field is a table parameter.
|
boolean |
isTable(String fieldName)
Checks whether the field with the specified name is a table parameter.
|
void |
lock()
Locks the metadata to prevent further changes.
|
void |
setName(String name)
Sets the name of the table/structure this metadata describes.
|
static final int UNINITIALIZED
static final int TYPE_INVALID
static final int TYPE_CHAR
static final int TYPE_DATE
static final int TYPE_BCD
static final int TYPE_TIME
static final int TYPE_BYTE
static final int TYPE_ITAB
static final int TYPE_NUM
static final int TYPE_FLOAT
static final int TYPE_INT
static final int TYPE_INT2
static final int TYPE_INT1
static final int TYPE_STRUCTURE
static final int TYPE_DECF16
static final int TYPE_DECF34
static final int TYPE_STRING
static final int TYPE_XSTRING
static final int TYPE_INT8
static final int TYPE_UTCLONG
static final int TYPE_UTCSECOND
static final int TYPE_UTCMINUTE
static final int TYPE_DTDAY
static final int TYPE_DTWEEK
static final int TYPE_DTMONTH
static final int TYPE_TSECOND
static final int TYPE_TMINUTE
static final int TYPE_CDAY
static final int TYPE_TABLE
static final int TYPE_EXCEPTION
static final int TYPE_ABAPOBJECT
static final int TYPE_BOX
static final int TYPE_GENERIC_BOX
int indexOf(String fieldName)
fieldName
- the name of the field for which the index is being returnedJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existboolean hasField(String fieldName)
fieldName
- the name of the field to check for existencetrue
if the field with the specified name exist,
false
otherwiseString getName()
void setName(String name)
name
- the name for the record metadataint getFieldCount()
String getName(int index)
index
- the index of the fieldString getRecordTypeName(int index)
null
if no table name is available.index
- the index of the fieldString getRecordTypeName(String fieldName)
null
if no table name or data element name is available.fieldName
- the name of the fieldJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existJCoRecordMetaData getRecordMetaData(int index)
null
if no metadata is available.
This is the case if the definition was done with type name or the metadata
object was not obtained from repository.
Note: To get the proper metadata object for the field it is possible to call
JCoRepository repository; ... repository.getRecordMetaData(metaDataInstance.getRecordTypeName(index));
index
- the index of the fieldnull
getRecordTypeName(int)
JCoRecordMetaData getRecordMetaData(String fieldName)
null
if no metadata are available.
This is the case if the definition was done with type name or the metadata
object was not obtained from repository.
Note: To get the proper metadata object for the field it is possible to call
JCoRepository repository; ... repository.getRecordMetaData(metaDataInstance.getRecordTypeName(fieldName));
fieldName
- the name of the fieldnull
JCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existgetRecordTypeName(String)
JCoExtendedFieldMetaData getExtendedFieldMetaData(int index)
index
- the index of the fieldnull
if not availableJCoExtendedFieldMetaData getExtendedFieldMetaData(String fieldName)
fieldName
- the name of the fieldnull
if not availableJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existint getUnicodeByteLength(int index)
index
- the index of the fieldint getUnicodeByteLength(String fieldName)
fieldName
- the name of the fieldJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existint getByteLength(int index)
index
- the index of the fieldint getByteLength(String fieldName)
fieldName
- the name of the fieldJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existint getLength(int index)
index
- the index of the fieldint getLength(String fieldName)
fieldName
- the name of the fieldJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existint getType(int index)
index
- the index of the fieldint getType(String fieldName)
fieldName
- the name of the fieldJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existString getTypeAsString(int index)
index
- the index of the fieldString getTypeAsString(String fieldName)
fieldName
- the name of the fieldJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existString getClassNameOfField(String fieldName)
fieldName
- the name of the fieldJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existString getClassNameOfField(int index)
index
- the field indexint getDecimals(int index)
index
- the index of the fieldint getDecimals(String fieldName)
fieldName
- the name of the fieldJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existString getDescription(int index)
index
- the index of the fieldString getDescription(String fieldName)
fieldName
- the name of the fieldJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existboolean isStructure(int index)
index
- the index of the fieldtrue
if the specified field is a structure parameter, false
otherwiseboolean isStructure(String fieldName)
fieldName
- the name of the fieldtrue
if the specified field is a structure parameter, false
otherwiseJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existboolean isNestedType1Structure(int index)
index
- the index of the fieldtrue
if the specified field is a nested TYPE1 structure, false
otherwiseboolean isNestedType1Structure(String fieldName)
fieldName
- the name of the fieldtrue
if the specified field is a nested TYPE1 structure, false
otherwiseJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existboolean isTable(int index)
index
- the index of the fieldtrue
if the specified field is a table parameter, false
otherwiseboolean isTable(String fieldName)
fieldName
- the name of the fieldtrue
if the specified field is a table parameter, false
otherwiseJCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND, if a field with this name does not existboolean isAbapObject(String fieldName)
fieldName
- the name of the fieldtrue
if the specified field is an ABAP object, false
otherwiseboolean isAbapObject(int index)
index
- the index of the fieldtrue
if the specified field is an ABAP object, false
otherwisevoid lock()
UnsupportedOperationException
from then on.boolean isLocked()
true
if the metadata instance is locked, false
otherwise.lock()
Copyright © 2017 SAP. All Rights Reserved.