|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.sap.mw.jco.JCO.MetaData
Implements the meta data for a data structure, i.e. table, structure, or parameter list, respectively. Meta data describe the layout of a table, structure or parameter list.
| Fields inherited from interface com.sap.mw.jco.IMetaData |
EXPORT_PARAMETER, IMPORT_PARAMETER, INACTIVE_PARAMETER, NESTED_TYPE1_STRUCTURE, OPTIONAL_PARAMETER, TYPE_BCD, TYPE_BYTE, TYPE_CHAR, TYPE_DATE, TYPE_EXCEPTION, TYPE_FLOAT, TYPE_INT, TYPE_INT1, TYPE_INT2, TYPE_INVALID, TYPE_ITAB, TYPE_NUM, TYPE_STRING, TYPE_STRUCTURE, TYPE_TABLE, TYPE_TIME, TYPE_XSTRING, UNINITIALIZED, UNINITIALIZED_PARAMETER |
| Constructor Summary | |
JCO.MetaData(IMetaData obj)
Creates an instance of the meta data object |
|
JCO.MetaData(java.lang.String rec_name)
Creates an instance of the meta data object |
|
JCO.MetaData(java.lang.String rec_name,
int capacity)
Creates an instance of the meta data object and preallocates data structures for the specifed number of entries. |
|
| Method Summary | |
void |
addInfo(java.lang.String name,
char type,
int offset,
int length)
Deprecated. Only used internally. This method might be removed or changed in the next release without notice. Use public void addInfo(String name, int type, int length, int offset) instead. |
void |
addInfo(java.lang.String name,
char type,
int offset,
int length,
int decimals)
Deprecated. Only used internally. This method might be removed or changed in the next release without notice. Use public void addInfo(String name, int type, int length, int offset, int decimals) instead. |
void |
addInfo(java.lang.String name,
int type,
int length)
Adds a new field descriptor to the meta data object |
void |
addInfo(java.lang.String name,
int type,
int length,
int offset)
Adds a new field descriptor to the meta data object |
void |
addInfo(java.lang.String name,
int type,
int length,
int offset,
int decimals)
Adds a new field descriptor to the meta data object |
void |
addInfo(java.lang.String name,
int type,
int length,
int offset,
int decimals,
int flags,
java.lang.Object tab_meta)
Adds a new field descriptor to the meta data object |
void |
addInfo(java.lang.String name,
int type,
int charlength,
int length,
int offset,
int decimals,
java.lang.String sdefault,
java.lang.String description,
int flags,
java.lang.Object tab_meta,
com.sap.mw.jco.IExtendedFieldMetaData extended)
Adds a new field descriptor to the meta data object |
void |
addInfo(java.lang.String name,
int type,
int length,
int offset,
int decimals,
java.lang.String sdefault,
java.lang.String description,
int flags,
java.lang.Object tab_meta,
com.sap.mw.jco.IExtendedFieldMetaData extended)
Adds a new field descriptor to the meta data object |
java.lang.Object |
clone()
Creates an returns a copy of the MetaData object. |
boolean |
equals(java.lang.Object obj)
Compares the specified object with this meta data object for equality. |
int |
getCapacity()
Returns the capacity of the internal buffers |
int |
getDecimals(int index)
Returns the number of decimals of the field Decimals are only necessary for the data types JCO.TYPE_BCD and JCO.TYPE_FLOAT. |
int |
getDecimals(java.lang.String field_name)
Returns the number of decimals of the field Decimals are only necessary for the data types JCO.TYPE_BCD and JCO.TYPE_FLOAT. |
java.lang.String |
getDefault(int index)
Returns the default value for the specified field |
java.lang.String |
getDefault(java.lang.String field_name)
Returns the default value for the specified field |
java.lang.String |
getDescription(int index)
Returns a textual description for the specified field |
java.lang.String |
getDescription(java.lang.String field_name)
Returns a textual description for the specified field |
com.sap.mw.jco.IExtendedFieldMetaData |
getExtendedFieldMetaData(int index)
Returns the extended field meta data object |
com.sap.mw.jco.IExtendedFieldMetaData |
getExtendedFieldMetaData(java.lang.String field_name)
Returns the extended field meta data object |
int |
getFieldCount()
Returns the number of fields. |
int |
getFlags(int index)
Returns the flags for the specified field |
int |
getFlags(java.lang.String field_name)
Returns the flags for the specified field |
int |
getInternalLength(int index)
Returns the length of the field |
int |
getInternalLength(java.lang.String field_name)
Returns the length of the field |
int |
getLength(int index)
Returns the length of the field |
int |
getLength(java.lang.String field_name)
Returns the length of the field |
IMetaData |
getMetaData()
Returns the MetaData object |
IMetaData |
getMetaData(int index)
Returns the meta data if this data field is a table or structure or null if no meta data are available |
IMetaData |
getMetaData(java.lang.String field_name)
Returns the meta data if this data field is a table or structure or null if no meta data are available |
java.lang.String |
getName()
Returns the name of the record |
java.lang.String |
getName(int index)
Returns the field name of the data field The field name is used for identfying a field in a structure or table row. |
int |
getNumFields()
Returns the number of fields. |
int |
getOffset(int index)
Returns the offset of the field. |
int |
getOffset(java.lang.String field_name)
Returns the offset of the field. |
int |
getTabLength()
Returns the total length of a structure or single row of a table |
java.lang.String |
getTabName(int index)
Returns the table/structure name of the data field or null if no table name is available |
java.lang.String |
getTabName(java.lang.String field_name)
Returns the table/structure name of the data field or null if no table name is available |
int |
getType(int index)
Returns the data type of the field |
int |
getType(java.lang.String field_name)
Returns the data type of the field |
java.lang.String |
getTypeAsString(int index)
Returns the data type of the field as a string |
java.lang.String |
getTypeAsString(java.lang.String field_name)
Returns the data type of the field as a string |
boolean |
hasField(java.lang.String field_name)
Checks whether a named field exists |
int |
hashCode()
Returns the hash code value for this record |
int |
indexOf(java.lang.String field_name)
Returns the index of the named field |
boolean |
isActive(int index)
Checks whether the specified field is active |
boolean |
isActive(java.lang.String field_name)
Checks whether the specified field is active |
boolean |
isException(int index)
Checks whether this field is a exception |
boolean |
isException(java.lang.String field_name)
Checks whether this field is a exception |
boolean |
isExport(int index)
Checks whether this field is an export parameter |
boolean |
isExport(java.lang.String field_name)
Checks whether this field is an export parameter |
boolean |
isImport(int index)
Checks whether this field is an import parameter |
boolean |
isImport(java.lang.String field_name)
Checks whether this field is an import parameter |
boolean |
isInitialized(int index)
Checks whether this field has been initialized |
boolean |
isInitialized(java.lang.String field_name)
Checks whether this field has been initialized |
boolean |
isNestedType1Structure()
Checks whether this MetaData is a nested TYPE1 structure, which is a structure with a fixed length in memory, but with a nested layout |
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(java.lang.String field_name)
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 |
isOptional(int index)
Checks whether this field is an optional parameter |
boolean |
isOptional(java.lang.String field_name)
Checks whether this field is an optional parameter |
boolean |
isStructure(int index)
Checks whether this field is a structure parameter |
boolean |
isStructure(java.lang.String field_name)
Checks whether this field is a structure parameter |
boolean |
isTable(int index)
Checks whether this field is a table parameter |
boolean |
isTable(java.lang.String field_name)
Checks whether this field is a table parameter |
void |
setExtendedFieldMetaData(com.sap.mw.jco.IExtendedFieldMetaData extended_field_meta_data,
int index)
Sets the extended field meta data object |
void |
setExtendedFieldMetaData(com.sap.mw.jco.IExtendedFieldMetaData extended_field_meta_data,
java.lang.String field_name)
Sets the extended field meta data object |
void |
setFlags(int index,
int value)
Sets the flags for the specified field |
void |
setNestedType1Structure(boolean isType1)
Sets that this MetaData is a nested TYPE1 structure, which is a structure with a fixed length in memory, but with a nested layout |
void |
setTabLength(int tab_length)
Sets the total length of a structure or single row of a table |
java.lang.String |
toString()
Converts to a string |
void |
writeHTML(java.lang.String html_filename)
Dump the meta data to a file This method comes in handy for debugging purposes. |
void |
writeHTML(java.io.Writer writer)
Dump the meta data to a stream This method comes in handy for debugging purposes. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public JCO.MetaData(java.lang.String rec_name)
rec_name - the name of the table/structure
public JCO.MetaData(java.lang.String rec_name,
int capacity)
rec_name - the name of the table/structurecapacity - no. of data fields to preallocatepublic JCO.MetaData(IMetaData obj)
obj - the MetaData object to copy the values from| Method Detail |
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare for equality with this objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
clone in interface IMetaDatapublic final int indexOf(java.lang.String field_name)
indexOf in interface IMetaDatafield_name - the name of the field for which the index is being returnedJCO.Exception - thrown if a field with the specified name does not existpublic final boolean hasField(java.lang.String field_name)
hasField in interface IMetaDatafield_name - the name of the field to check for existencepublic java.lang.String getName()
getName in interface IMetaDatapublic int getFieldCount()
getFieldCount in interface IMetaDatapublic int getNumFields()
public int getCapacity()
public IMetaData getMetaData()
public void addInfo(java.lang.String name,
int type,
int length)
name - Field name for identifying this data fieldtype - Data field typelength - Data field internal length in bytes
public void addInfo(java.lang.String name,
int type,
int length,
int offset)
name - Field name for identifying this data fieldtype - Data field typelength - Data field internal length in bytesoffset - Data field offset in the internal JCO data buffer
public void addInfo(java.lang.String name,
int type,
int length,
int offset,
int decimals)
name - Field name for identifying this data fieldtype - Data field typelength - Data field internal length in bytesoffset - Data field offset in the internal JCO data bufferdecimals - Data field number of decimals (only necessary for the data types JCO.TYPE_BCD and JCO.TYPE_FLOAT)
public void addInfo(java.lang.String name,
int type,
int length,
int offset,
int decimals,
int flags,
java.lang.Object tab_meta)
addInfo in interface IMetaDataname - Field name for identifying this data fieldtype - Data field typelength - Data field internal length in bytesoffset - Data field offset in the internal JCO data bufferdecimals - Data field number of decimals (only necessary for the data types JCO.TYPE_BCD and JCO.TYPE_FLOAT)flags - Bit-vector for additional attributes of the field. The vector can be ORed together from| Flag | Description |
|---|---|
| IMPORT_PARAMETER | The field is an import parameter |
| EXPORT_PARAMETER | The field is an export parameter |
| OPTIONAL_PARAMETER | The field is optional parameter |
| INACTIVATE_PARAMETER | Only used for table parameter, indicating that the content of the table will not be sent to the server |
tab_meta - Meta-data if the field is a complex field, i.e. structure or table, null otherwise
If this field is a structure or table object only the meta data of those objects will we copied
not reference to the objects ! Use setValue(...) to actually set the container object.
public void addInfo(java.lang.String name,
int type,
int length,
int offset,
int decimals,
java.lang.String sdefault,
java.lang.String description,
int flags,
java.lang.Object tab_meta,
com.sap.mw.jco.IExtendedFieldMetaData extended)
addInfo in interface IMetaDataname - Field name for identifying this data fieldtype - Data field typelength - Data field internal length in bytesoffset - Data field offset in the internal JCO data bufferdecimals - Data field number of decimals (only necessary for the data types JCO.TYPE_BCD and JCO.TYPE_FLOAT)sdefault - Data Field default valuedescription - Description of data fieldflags - Bit-vector for additional attributes of the field. The vector can be ORed together from| Flag | Description |
|---|---|
| IMPORT_PARAMETER | The field is an import parameter |
| EXPORT_PARAMETER | The field is an export parameter |
| OPTIONAL_PARAMETER | The field is optional parameter |
| INACTIVATE_PARAMETER | Only used for table parameter, indicating that the content of the table will not be sent to the server |
tab_meta - Meta-data if the field is a complex field, i.e. structure or table, null otherwise.
If this field is a structure or table object only the meta data of those objects will we copied
not reference to the objects ! Use setValue(...) to actually set the container object.extended - extended meta data for this field or null if none available.
public void addInfo(java.lang.String name,
int type,
int charlength,
int length,
int offset,
int decimals,
java.lang.String sdefault,
java.lang.String description,
int flags,
java.lang.Object tab_meta,
com.sap.mw.jco.IExtendedFieldMetaData extended)
name - Field name for identifying this data fieldtype - Data field typecharlength - Data field length in character unitslength - Data field internal length in bytesoffset - Data field offset in the internal JCO data bufferdecimals - Data field number of decimals (only necessary for the data types JCO.TYPE_BCD and JCO.TYPE_FLOAT)sdefault - Data Field default valuedescription - Description of data fieldflags - Bit-vector for additional attributes of the field. The vector can be ORed together from| Flag | Description |
|---|---|
| IMPORT_PARAMETER | The field is an import parameter |
| EXPORT_PARAMETER | The field is an export parameter |
| OPTIONAL_PARAMETER | The field is optional parameter |
| INACTIVATE_PARAMETER | Only used for table parameter, indicating that the content of the table will not be sent to the server |
tab_meta - Meta-data if the field is a complex field, i.e. structure or table, null otherwise.
If this field is a structure or table object only the meta data of those objects will we copied
not reference to the objects ! Use setValue(...) to actually set the container object.extended - extended meta data for this field or null if none available.
public void addInfo(java.lang.String name,
char type,
int offset,
int length)
name - Field name for identifying this data fieldtype - ABAP field type as characteroffset - Data field offset in the internal JCO data bufferlength - Data field internal length in bytes
public void addInfo(java.lang.String name,
char type,
int offset,
int length,
int decimals)
name - Field name for identifying this data fieldtype - ABAP field type as a characteroffset - Data field offset in the internal JCO data bufferlength - Data field internal length in bytesdecimals - Data field number of decimals (only necessary for the data types JCO.TYPE_BCD and JCO.TYPE_FLOAT)public java.lang.String getName(int index)
getName in interface IMetaDataindex - the index of the fieldpublic java.lang.String getTabName(int index)
getTabName in interface IMetaDataindex - the index of the fieldpublic java.lang.String getTabName(java.lang.String field_name)
getTabName in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic IMetaData getMetaData(int index)
getMetaData in interface IMetaDataindex - the index of the fieldpublic IMetaData getMetaData(java.lang.String field_name)
getMetaData in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic int getLength(int index)
getLength in interface IMetaDataindex - the index of the fieldpublic int getLength(java.lang.String field_name)
getLength in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic int getInternalLength(int index)
getInternalLength in interface IMetaDataindex - the index of the fieldpublic int getInternalLength(java.lang.String field_name)
getInternalLength in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic int getOffset(int index)
getOffset in interface IMetaDataindex - the index of the fieldpublic int getOffset(java.lang.String field_name)
getOffset in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic int getType(int index)
getType in interface IMetaDataindex - the index of the fieldpublic int getType(java.lang.String field_name)
getType in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic java.lang.String getTypeAsString(int index)
getTypeAsString in interface IMetaDataindex - the index of the fieldpublic java.lang.String getTypeAsString(java.lang.String field_name)
getTypeAsString in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic int getDecimals(int index)
getDecimals in interface IMetaDataindex - the index of the fieldpublic int getDecimals(java.lang.String field_name)
getDecimals in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic java.lang.String getDefault(int index)
getDefault in interface IMetaDataindex - the index of the fieldpublic java.lang.String getDefault(java.lang.String field_name)
getDefault in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic java.lang.String getDescription(int index)
getDescription in interface IMetaDataindex - the index of the fieldpublic java.lang.String getDescription(java.lang.String field_name)
getDescription in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic int getFlags(int index)
index - the index of the fieldpublic int getFlags(java.lang.String field_name)
field_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic com.sap.mw.jco.IExtendedFieldMetaData getExtendedFieldMetaData(int index)
getExtendedFieldMetaData in interface IMetaDataindex - the index of the fieldpublic com.sap.mw.jco.IExtendedFieldMetaData getExtendedFieldMetaData(java.lang.String field_name)
getExtendedFieldMetaData in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not exist
public void setExtendedFieldMetaData(com.sap.mw.jco.IExtendedFieldMetaData extended_field_meta_data,
int index)
index - the index of the field
public void setExtendedFieldMetaData(com.sap.mw.jco.IExtendedFieldMetaData extended_field_meta_data,
java.lang.String field_name)
field_name - the name of the fieldpublic boolean isOptional(int index)
isOptional in interface IMetaDataindex - the index of the fieldpublic boolean isOptional(java.lang.String field_name)
isOptional in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic boolean isImport(int index)
isImport in interface IMetaDataindex - the index of the fieldpublic boolean isImport(java.lang.String field_name)
isImport in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic boolean isExport(int index)
isExport in interface IMetaDataindex - the index of the fieldpublic boolean isExport(java.lang.String field_name)
isExport in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic boolean isStructure(int index)
isStructure in interface IMetaDataindex - the index of the fieldpublic boolean isStructure(java.lang.String field_name)
isStructure in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic boolean isNestedType1Structure(int index)
isNestedType1Structure in interface IMetaDataindex - the index of the fieldtrue if the specified field is a nested TYPE1 structure, false otherwisepublic boolean isNestedType1Structure(java.lang.String field_name)
isNestedType1Structure in interface IMetaDatafield_name - the name of the fieldtrue if the specified field is a nested TYPE1 structure, false otherwisepublic boolean isTable(int index)
isTable in interface IMetaDataindex - the index of the fieldpublic boolean isTable(java.lang.String field_name)
isTable in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic boolean isException(int index)
isException in interface IMetaDataindex - the index of the fieldpublic boolean isException(java.lang.String field_name)
isException in interface IMetaDatafield_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic int getTabLength()
getTabLength in interface IMetaDatapublic boolean isNestedType1Structure()
isNestedType1Structure in interface IMetaDatafield_name - the name of the fieldtrue if the MetaData is a nested TYPE1 structure, false otherwisepublic boolean isActive(int index)
index - the index of the fieldpublic boolean isActive(java.lang.String field_name)
field_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not existpublic boolean isInitialized(int index)
index - the index of the fieldpublic boolean isInitialized(java.lang.String field_name)
field_name - the name of the fieldJCO.Exception - thrown if a field with the specified name does not exist
public void setFlags(int index,
int value)
index - the index of the fieldflags - the flags to set for the fieldpublic void setTabLength(int tab_length)
tab_length - the new tab lengthpublic void setNestedType1Structure(boolean isType1)
isType1 - true if the MetaData is a nested TYPE1 structure, false otherwisepublic java.lang.String toString()
toString in interface IMetaDatatoString in class java.lang.Objectcom.sap.mw.jco.IMetaDatapublic void writeHTML(java.lang.String html_filename)
html_filename - the file to write toJCO.Exception - thrown if something went wrong
public void writeHTML(java.io.Writer writer)
throws java.io.IOException
writer - the stream to write tojava.io.IOException - thrown if an I/O error occurredJCO.Exception - thrown if something else went wrong
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||