Package com.sap.conn.jco
Interface JCoListMetaData
- All Superinterfaces:
Cloneable
,JCoMetaData
,Serializable
Encapsulates the metadata of either a parameter list, a request, or a response.
Each metadata element describes a field of these list oriented data containers
in terms of name, type, length, etc.
JCoListMetadata objects are mainly used to create parameter lists
of a certain layout.
JCoListMetadata contains all the metadata, which is specific to parameter lists.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Flag indicating an export parameter.static final int
Flag indicating an export parameter.static final int
Flag indicating an import parameter.static final int
Flag indicating an optional parameter.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
Modifier and TypeMethodDescriptionvoid
Adds a new scalar field descriptor to the metadata object.void
add
(String name, int type, int nucByteLength, int ucByteLength, int decimals, String defaults, String description, int flags, Object tabMetaData, JCoExtendedFieldMetaData extended) Adds a new field descriptor to the metadata object.void
add
(String name, int type, int nucByteLength, int ucByteLength, int decimals, String defaults, String description, int flags, Object tabMetaData, String recordFieldName, JCoExtendedFieldMetaData extended) Adds a new field descriptor to the metadata object.void
add
(String name, int type, JCoRecordMetaData recordMetaData, int flags) Adds a new complex field descriptor to the metadata object.getDefault
(int index) Returns the default value of the data field at the specified index.getDefault
(String fieldName) Returns the default value for the field with the specified name.getRecordFieldName
(int index) If the parameter is defined by referencing a field in a table or structure, the name of this field for the parameter field at the specified index is returned,null
otherwise.getRecordFieldName
(String fieldName) If the parameter is defined by referencing a field in a table or structure, the name of this field for the parameter field with the specified name is returned,null
otherwise.boolean
isChanging
(int index) Checks whether the field at the specified index is a changing parameter.boolean
isChanging
(String fieldName) Checks whether the field with the specified name is a changing parameter.boolean
isException
(int index) Checks whether this field is an exception.boolean
isException
(String fieldName) Checks whether this field with the specified name is an exception.boolean
isExport
(int index) Checks whether the field at the specified index is an export parameter.boolean
Checks whether the field with the specified name is an export parameter.boolean
isImport
(int index) Checks whether the field at the specified index is an import parameter.boolean
Checks whether the field with the specified name is an import parameter.boolean
isOptional
(int index) Checks whether the field at the specified index is an optional parameter.boolean
isOptional
(String fieldName) Checks whether the field with the specified name is an optional parameter.Methods inherited from interface com.sap.conn.jco.JCoMetaData
getByteLength, getByteLength, getClassMetaData, getClassMetaData, getClassNameOfField, getClassNameOfField, getDecimals, getDecimals, getDescription, getDescription, getExtendedFieldMetaData, getExtendedFieldMetaData, getFieldCount, getLength, getLength, getName, getName, getRecordMetaData, getRecordMetaData, getRecordTypeName, getRecordTypeName, getType, getType, getTypeAsString, getTypeAsString, getUnicodeByteLength, getUnicodeByteLength, hasField, indexOf, isAbapObject, isAbapObject, isLocked, isNestedType1Structure, isNestedType1Structure, isStructure, isStructure, isTable, isTable, lock, setName
-
Field Details
-
OPTIONAL_PARAMETER
static final int OPTIONAL_PARAMETERFlag indicating an optional parameter.- See Also:
-
IMPORT_PARAMETER
static final int IMPORT_PARAMETERFlag indicating an import parameter.- See Also:
-
EXPORT_PARAMETER
static final int EXPORT_PARAMETERFlag indicating an export parameter.- See Also:
-
CHANGING_PARAMETER
static final int CHANGING_PARAMETERFlag indicating an export parameter.- See Also:
-
-
Method Details
-
add
Adds a new scalar field descriptor to the metadata object.- Parameters:
name
- field name for identifying this data fieldtype
- field datatypenucByteLength
- data field length in bytes for non-Unicode layoutucByteLength
- data field length in bytes for Unicode layoutflags
- bit-vector for additional attributes of the field. The vector can be ORed together from
IMPORT_PARAMETER
- if the field is an import parameterEXPORT_PARAMETER
- if the field is an export parameterCHANGING_PARAMETER
- if the field is a changing parameterOPTIONAL_PARAMETER
- if the field is an optional parameter
-
add
Adds a new complex field descriptor to the metadata object. Complex fields are structures and tables.- Parameters:
name
- field name for identifying this data fieldtype
- field datatyperecordMetaData
- the metadata for the structure or tableflags
- bit-vector for additional attributes of the field. The vector can be ORed together fromIMPORT_PARAMETER
- if the field is an import parameterEXPORT_PARAMETER
- if the field is an export parameterCHANGING_PARAMETER
- if the field is a changing parameterOPTIONAL_PARAMETER
- if the field is an optional parameter
-
add
void add(String name, int type, int nucByteLength, int ucByteLength, int decimals, String defaults, String description, int flags, Object tabMetaData, JCoExtendedFieldMetaData extended) Adds a new field descriptor to the metadata object.- Parameters:
name
- field name for identifying this data fieldtype
- field datatypenucByteLength
- data field length in bytes for non-Unicode layoutucByteLength
- data field length in bytes for Unicode layoutdecimals
- data field number of decimals (only necessary for the data types TYPE_BCD and TYPE_FLOAT)defaults
- data field default valuedescription
- descriptive text of the data fieldflags
- bit-vector for additional attributes of the field. The vector can be ORed together fromIMPORT_PARAMETER
- if the field is an import parameterEXPORT_PARAMETER
- if the field is an export parameterCHANGING_PARAMETER
- if the field is a changing parameterOPTIONAL_PARAMETER
- if the field is an optional parameter
tabMetaData
- metadata for a complex field, if the field is a structure or a tableextended
- extended metadata for this field ornull
if none is available
-
add
void add(String name, int type, int nucByteLength, int ucByteLength, int decimals, String defaults, String description, int flags, Object tabMetaData, String recordFieldName, JCoExtendedFieldMetaData extended) Adds a new field descriptor to the metadata object.- Parameters:
name
- field name for identifying this data fieldtype
- field datatypenucByteLength
- data field length in bytes for non-Unicode layoutucByteLength
- data field length in bytes for Unicode layoutdecimals
- data field number of decimals (only necessary for the data types TYPE_BCD and TYPE_FLOAT)defaults
- data field default valuedescription
- descriptive text of the data fieldflags
- bit-vector for additional attributes of the field. The vector can be ORed together fromIMPORT_PARAMETER
- if the field is an import parameterEXPORT_PARAMETER
- if the field is an export parameterCHANGING_PARAMETER
- if the field is a changing parameterOPTIONAL_PARAMETER
- if the field is an optional parameter
tabMetaData
- metadata for a complex field, if the field is a structure or a tablerecordFieldName
- associated field name in a referenced table or structure metadataextended
- extended metadata for this field ornull
if none is available
-
isException
boolean isException(int index) Checks whether this field is an exception.- Parameters:
index
- the index of the field- Returns:
true
if the specified field is an exception,false
otherwise
-
isException
Checks whether this field with the specified name is an exception.- Parameters:
fieldName
- the name of the field- Returns:
true
if the specified field is an exception,false
otherwise- Throws:
JCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND if a field with this name does not exist
-
getDefault
Returns the default value of the data field at the specified index.- Parameters:
index
- the index of the field- Returns:
- data field default value
-
getDefault
Returns the default value for the field with the specified name.- Parameters:
fieldName
- the name of the field- Returns:
- data field default value
- Throws:
JCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND if a field with this name does not exist
-
getRecordFieldName
If the parameter is defined by referencing a field in a table or structure, the name of this field for the parameter field at the specified index is returned,null
otherwise. In the first casegetRecordTypeName(index)
would contain the name of the enclosing record.- Parameters:
index
- the index of the parameter field- Returns:
- referenced record field name
- See Also:
-
getRecordFieldName
If the parameter is defined by referencing a field in a table or structure, the name of this field for the parameter field with the specified name is returned,null
otherwise. In the first casegetRecordTypeName(fieldName)
would contain the name of the enclosing record.- Parameters:
fieldName
- the name of the parameter field- Returns:
- referenced record field name
- Throws:
JCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND if a field with this name does not exist- See Also:
-
isOptional
boolean isOptional(int index) Checks whether the field at the specified index is an optional parameter.- Parameters:
index
- the index of the field- Returns:
true
if the specified field is an optional parameter,false
otherwise
-
isOptional
Checks whether the field with the specified name is an optional parameter.- Parameters:
fieldName
- the name of the field- Returns:
true
if the specified field is an optional parameter,false
otherwise- Throws:
JCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND if a field with this name does not exist
-
isImport
boolean isImport(int index) Checks whether the field at the specified index is an import parameter.- Parameters:
index
- the index of the field- Returns:
true
if the specified field is an import parameter,false
otherwise
-
isImport
Checks whether the field with the specified name is an import parameter.- Parameters:
fieldName
- the name of the field- Returns:
true
if the specified field is an import parameter,false
otherwise- Throws:
JCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND if a field with this name does not exist
-
isExport
boolean isExport(int index) Checks whether the field at the specified index is an export parameter.- Parameters:
index
- the index of the field- Returns:
true
if the specified field is an export parameter,false
otherwise
-
isExport
Checks whether the field with the specified name is an export parameter.- Parameters:
fieldName
- the name of the field- Returns:
true
if the specified field is an export parameter,false
otherwise- Throws:
JCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND if a field with this name does not exist
-
isChanging
boolean isChanging(int index) Checks whether the field at the specified index is a changing parameter.- Parameters:
index
- the index of the field- Returns:
true
if the specified field is a changing parameter,false
otherwise
-
isChanging
Checks whether the field with the specified name is a changing parameter.- Parameters:
fieldName
- the name of the field- Returns:
true
if the specified field is a changing parameter,false
otherwise- Throws:
JCoRuntimeException
- with group JCO_ERROR_FIELD_NOT_FOUND if a field with this name does not exist
-