com.sap.mw.jco
Class JCO.MetaData

java.lang.Object
  |
  +--com.sap.mw.jco.JCO.MetaData
All Implemented Interfaces:
java.lang.Cloneable, IMetaData, java.io.Serializable
Direct Known Subclasses:
JCO.Record
Enclosing class:
JCO

public static class JCO.MetaData
extends java.lang.Object
implements IMetaData, java.lang.Cloneable, java.io.Serializable

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.

See Also:
Serialized Form

Fields inherited from interface com.sap.mw.jco.IMetaData
EXPORT_PARAMETER, IMPORT_PARAMETER, INACTIVE_PARAMETER, 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 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 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

JCO.MetaData

public JCO.MetaData(java.lang.String rec_name)
Creates an instance of the meta data object
Parameters:
rec_name - the name of the table/structure

JCO.MetaData

public 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.
Parameters:
rec_name - the name of the table/structure
capacity - no. of data fields to preallocate

JCO.MetaData

public JCO.MetaData(IMetaData obj)
Creates an instance of the meta data object
Parameters:
obj - the MetaData object to copy the values from
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compares the specified object with this meta data object for equality. Meta data are considered equal if they contain the same field names, types, lengths and decimals.
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare for equality with this object
Returns:
true if the meta data are equal, false otherwise.
Since:
JCo 2.0

hashCode

public int hashCode()
Returns the hash code value for this record
Overrides:
hashCode in class java.lang.Object
Returns:
the hash code for the record
Since:
JCo 2.0

clone

public java.lang.Object clone()
Creates an returns a copy of the MetaData object.
Specified by:
clone in interface IMetaData
Returns:
A clone of this MetaData object.

indexOf

public final int indexOf(java.lang.String field_name)
Returns the index of the named field
Specified by:
indexOf in interface IMetaData
Parameters:
field_name - the name of the field for which the index is being returned
Returns:
the index of the named field in the fields list
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

hasField

public final boolean hasField(java.lang.String field_name)
Checks whether a named field exists
Specified by:
hasField in interface IMetaData
Parameters:
field_name - the name of the field to check for existence
Returns:
true if the field with the specified name exist, false otherwise
Since:
JCo 1.1

getName

public java.lang.String getName()
Returns the name of the record
Specified by:
getName in interface IMetaData
Returns:
the name of the record

getFieldCount

public int getFieldCount()
Returns the number of fields.
Specified by:
getFieldCount in interface IMetaData
Returns:
the number of entries in the record.

getNumFields

public int getNumFields()
Returns the number of fields. This is just a convenience function and returns the same value as getFieldCount().
Returns:
the number of entries in the record.

getCapacity

public int getCapacity()
Returns the capacity of the internal buffers
Returns:
the current capacity of the internal buffers

getMetaData

public IMetaData getMetaData()
Returns the MetaData object
Returns:
the meta data object

addInfo

public void addInfo(java.lang.String name,
                    int type,
                    int length)
Adds a new field descriptor to the meta data object
Parameters:
name - Field name for identifying this data field
type - Data field type
length - Data field internal length in bytes

addInfo

public void addInfo(java.lang.String name,
                    int type,
                    int length,
                    int offset)
Adds a new field descriptor to the meta data object
Parameters:
name - Field name for identifying this data field
type - Data field type
length - Data field internal length in bytes
offset - Data field offset in the internal JCO data buffer

addInfo

public void addInfo(java.lang.String name,
                    int type,
                    int length,
                    int offset,
                    int decimals)
Adds a new field descriptor to the meta data object
Parameters:
name - Field name for identifying this data field
type - Data field type
length - Data field internal length in bytes
offset - Data field offset in the internal JCO data buffer
decimals - Data field number of decimals (only necessary for the data types JCO.TYPE_BCD and JCO.TYPE_FLOAT)

addInfo

public 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
Specified by:
addInfo in interface IMetaData
Parameters:
name - Field name for identifying this data field
type - Data field type
length - Data field internal length in bytes
offset - Data field offset in the internal JCO data buffer
decimals - 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_PARAMETEROnly 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.

addInfo

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)
Adds a new field descriptor to the meta data object
Specified by:
addInfo in interface IMetaData
Parameters:
name - Field name for identifying this data field
type - Data field type
length - Data field internal length in bytes
offset - Data field offset in the internal JCO data buffer
decimals - Data field number of decimals (only necessary for the data types JCO.TYPE_BCD and JCO.TYPE_FLOAT)
sdefault - Data Field default value
description - Description of data field
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_PARAMETEROnly 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.

addInfo

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)
Adds a new field descriptor to the meta data object
Parameters:
name - Field name for identifying this data field
type - Data field type
charlength - Data field length in character units
length - Data field internal length in bytes
offset - Data field offset in the internal JCO data buffer
decimals - Data field number of decimals (only necessary for the data types JCO.TYPE_BCD and JCO.TYPE_FLOAT)
sdefault - Data Field default value
description - Description of data field
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_PARAMETEROnly 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.

addInfo

public 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.

Adds a new field descriptor to the meta data object
Parameters:
name - Field name for identifying this data field
type - ABAP field type as character
offset - Data field offset in the internal JCO data buffer
length - Data field internal length in bytes

addInfo

public 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.

Adds a new field descriptor to the meta data object
Parameters:
name - Field name for identifying this data field
type - ABAP field type as a character
offset - Data field offset in the internal JCO data buffer
length - Data field internal length in bytes
decimals - Data field number of decimals (only necessary for the data types JCO.TYPE_BCD and JCO.TYPE_FLOAT)

getName

public 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.
Specified by:
getName in interface IMetaData
Parameters:
index - the index of the field
Returns:
The field name of the data field described by this meta information object.

getTabName

public java.lang.String getTabName(int index)
Returns the table/structure name of the data field or null if no table name is available
Specified by:
getTabName in interface IMetaData
Parameters:
index - the index of the field
Returns:
The table/structure name of the data field described by this meta information object.

getTabName

public 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
Specified by:
getTabName in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
The table/structure name of the data field described by this meta information object.
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

getMetaData

public 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
Specified by:
getMetaData in interface IMetaData
Parameters:
index - the index of the field
Returns:
The table/structure meta data of the data field or null

getMetaData

public 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
Specified by:
getMetaData in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
The table/structure meta data of the data field or null
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

getLength

public int getLength(int index)
Returns the length of the field
Specified by:
getLength in interface IMetaData
Parameters:
index - the index of the field
Returns:
field length

getLength

public int getLength(java.lang.String field_name)
Returns the length of the field
Specified by:
getLength in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
field length
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

getInternalLength

public int getInternalLength(int index)
Returns the length of the field
Specified by:
getInternalLength in interface IMetaData
Parameters:
index - the index of the field
Returns:
field length
Since:
JCo 2.0

getInternalLength

public int getInternalLength(java.lang.String field_name)
Returns the length of the field
Specified by:
getInternalLength in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
field length
Throws:
JCO.Exception - thrown if a field with the specified name does not exist
Since:
JCo 2.0

getOffset

public int getOffset(int index)
Returns the offset of the field. Only used internally. This method might be removed or changed in the next release without notice.
Specified by:
getOffset in interface IMetaData
Parameters:
index - the index of the field
Returns:
field offset

getOffset

public int getOffset(java.lang.String field_name)
Returns the offset of the field. Only used internally. This method might be removed or changed in the next release without notice.
Specified by:
getOffset in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
field offset
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

getType

public int getType(int index)
Returns the data type of the field
Specified by:
getType in interface IMetaData
Parameters:
index - the index of the field
Returns:
data type

getType

public int getType(java.lang.String field_name)
Returns the data type of the field
Specified by:
getType in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
data type
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

getTypeAsString

public java.lang.String getTypeAsString(int index)
Returns the data type of the field as a string
Specified by:
getTypeAsString in interface IMetaData
Parameters:
index - the index of the field
Returns:
a string description of the data type

getTypeAsString

public java.lang.String getTypeAsString(java.lang.String field_name)
Returns the data type of the field as a string
Specified by:
getTypeAsString in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
a string description of the data type
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

getDecimals

public 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.
Specified by:
getDecimals in interface IMetaData
Parameters:
index - the index of the field
Returns:
number of decimals for the field.

getDecimals

public 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.
Specified by:
getDecimals in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
number of decimals for the field.
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

getDefault

public java.lang.String getDefault(int index)
Returns the default value for the specified field
Specified by:
getDefault in interface IMetaData
Parameters:
index - the index of the field
Returns:
the default value of the field or null if not defined

getDefault

public java.lang.String getDefault(java.lang.String field_name)
Returns the default value for the specified field
Specified by:
getDefault in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
the default value of the field or null if not defined
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

getDescription

public java.lang.String getDescription(int index)
Returns a textual description for the specified field
Specified by:
getDescription in interface IMetaData
Parameters:
index - the index of the field
Returns:
a text that describes the field or null if none available

getDescription

public java.lang.String getDescription(java.lang.String field_name)
Returns a textual description for the specified field
Specified by:
getDescription in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
a text that describes the field or null if none available
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

getFlags

public int getFlags(int index)
Returns the flags for the specified field
Parameters:
index - the index of the field

getFlags

public int getFlags(java.lang.String field_name)
Returns the flags for the specified field
Parameters:
field_name - the name of the field
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

getExtendedFieldMetaData

public com.sap.mw.jco.IExtendedFieldMetaData getExtendedFieldMetaData(int index)
Returns the extended field meta data object
Specified by:
getExtendedFieldMetaData in interface IMetaData
Parameters:
index - the index of the field
Returns:
the extended field meta data object or null if not available

getExtendedFieldMetaData

public com.sap.mw.jco.IExtendedFieldMetaData getExtendedFieldMetaData(java.lang.String field_name)
Returns the extended field meta data object
Specified by:
getExtendedFieldMetaData in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
the extended field meta data object or null if not available
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

setExtendedFieldMetaData

public void setExtendedFieldMetaData(com.sap.mw.jco.IExtendedFieldMetaData extended_field_meta_data,
                                     int index)
Sets the extended field meta data object
Parameters:
index - the index of the field

setExtendedFieldMetaData

public void setExtendedFieldMetaData(com.sap.mw.jco.IExtendedFieldMetaData extended_field_meta_data,
                                     java.lang.String field_name)
Sets the extended field meta data object
Parameters:
field_name - the name of the field

isOptional

public boolean isOptional(int index)
Checks whether this field is an optional parameter
Specified by:
isOptional in interface IMetaData
Parameters:
index - the index of the field
Returns:
true if the specified field is an optional parameter, false otherwise

isOptional

public boolean isOptional(java.lang.String field_name)
Checks whether this field is an optional parameter
Specified by:
isOptional in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
true if the specified field is an optional parameter, false otherwise
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

isImport

public boolean isImport(int index)
Checks whether this field is an import parameter
Specified by:
isImport in interface IMetaData
Parameters:
index - the index of the field
Returns:
true if the specified field is an import parameter, false otherwise

isImport

public boolean isImport(java.lang.String field_name)
Checks whether this field is an import parameter
Specified by:
isImport in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
true if the specified field is an import parameter, false otherwise
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

isExport

public boolean isExport(int index)
Checks whether this field is an export parameter
Specified by:
isExport in interface IMetaData
Parameters:
index - the index of the field
Returns:
true if the specified field is an export parameter, false otherwise

isExport

public boolean isExport(java.lang.String field_name)
Checks whether this field is an export parameter
Specified by:
isExport in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
true if the specified field is an export parameter, false otherwise
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

isStructure

public boolean isStructure(int index)
Checks whether this field is a structure parameter
Specified by:
isStructure in interface IMetaData
Parameters:
index - the index of the field
Returns:
true if the specified field is structure parameter, false otherwise

isStructure

public boolean isStructure(java.lang.String field_name)
Checks whether this field is a structure parameter
Specified by:
isStructure in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
true if the specified field is structure parameter, false otherwise
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

isTable

public boolean isTable(int index)
Checks whether this field is a table parameter
Specified by:
isTable in interface IMetaData
Parameters:
index - the index of the field
Returns:
true if the specified field is table parameter, false otherwise

isTable

public boolean isTable(java.lang.String field_name)
Checks whether this field is a table parameter
Specified by:
isTable in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
true if the specified field is table parameter, false otherwise
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

isException

public boolean isException(int index)
Checks whether this field is a exception
Specified by:
isException in interface IMetaData
Parameters:
index - the index of the field
Returns:
true if the specified field is an exception parameter, false otherwise

isException

public boolean isException(java.lang.String field_name)
Checks whether this field is a exception
Specified by:
isException in interface IMetaData
Parameters:
field_name - the name of the field
Returns:
true if the specified field is an exception parameter, false otherwise
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

getTabLength

public int getTabLength()
Returns the total length of a structure or single row of a table
Specified by:
getTabLength in interface IMetaData
Returns:
The total length of the record

isActive

public boolean isActive(int index)
Checks whether the specified field is active
Parameters:
index - the index of the field
Returns:
true if the specified field is an activated parameter, false otherwise

isActive

public boolean isActive(java.lang.String field_name)
Checks whether the specified field is active
Parameters:
field_name - the name of the field
Returns:
true if the specified field is an activated parameter, false otherwise
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

isInitialized

public boolean isInitialized(int index)
Checks whether this field has been initialized
Parameters:
index - the index of the field
Returns:
true if the specified field has been initialized, false otherwise

isInitialized

public boolean isInitialized(java.lang.String field_name)
Checks whether this field has been initialized
Parameters:
field_name - the name of the field
Returns:
true if the specified field has been initialized, false otherwise
Throws:
JCO.Exception - thrown if a field with the specified name does not exist

setFlags

public void setFlags(int index,
                     int value)
Sets the flags for the specified field
Parameters:
index - the index of the field
flags - the flags to set for the field

setTabLength

public void setTabLength(int tab_length)
Sets the total length of a structure or single row of a table
Parameters:
tab_length - the new tab length
Returns:
The total length of the record

toString

public java.lang.String toString()
Converts to a string
Specified by:
toString in interface IMetaData
Overrides:
toString in class java.lang.Object
Following copied from interface: com.sap.mw.jco.IMetaData
Returns:
a printable representation of this object

writeHTML

public void writeHTML(java.lang.String html_filename)
Dump the meta data to a file This method comes in handy for debugging purposes.
Parameters:
html_filename - the file to write to
Throws:
JCO.Exception - thrown if something went wrong

writeHTML

public void writeHTML(java.io.Writer writer)
               throws java.io.IOException
Dump the meta data to a stream This method comes in handy for debugging purposes.
Parameters:
writer - the stream to write to
Throws:
java.io.IOException - thrown if an I/O error occurred
JCO.Exception - thrown if something else went wrong
Since:
JCo 2.0