|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sap.mw.jco.JCO.MetaData
com.sap.mw.jco.JCO.Record
Base class for all data-structures used throughout the JCO toolkit. The class takes care of internal bookkeeping of buffers, meta data, etc. In addition it provides a rich set of get/set methods which allow a convenient access to the individual fields that make up a record. Getters and Setters support conversion of field values which are summarized by the following table:
| method/type | JCO.TYPE_CHAR | JCO.TYPE_INT1 | JCO.TYPE_INT2 | JCO.TYPE_INT | JCO.TYPE_NUM | JCO.TYPE_BCD | JCO.TYPE_FLOAT | JCO.TYPE_BYTE | JCO.TYPE_DATE | JCO.TYPE_TIME | JCO.TYPE_STRING | JCO.TYPE_XSTRING | JCO.TYPE_STRUCTURE | JCO.TYPE_TABLE |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Object getValue() | String | Integer | Integer | Integer | String | String | Double | byte[] | Date | Date | String | byte[] | JCO.Structure | JCO.Table |
| String getString() | String | String | String | String | String | String | String | String (hex) | String | String | String | String (hex) | String (Name) | String (Name) |
| char getChar() | char | --- | --- | --- | --- | --- | --- | --- | --- | --- | char | --- | --- | --- |
| char getCharArray() | char[] | --- | --- | --- | --- | --- | --- | --- | --- | --- | char[] | --- | --- | --- |
| short getShort() | short | short | short | short | short | --- | --- | short | --- | --- | short | short | --- | --- |
| int getInt() | int | int | int | int | int | --- | --- | int | --- | --- | int | int | --- | --- |
| long getLong() | long | long | long | long | long | --- | --- | long | --- | --- | long | long | --- | --- |
| BigInteger getBigInteger() | BigInteger | BigInteger | BigInteger | BigInteger | BigInteger | BigInteger | --- | --- | --- | --- | BigInteger | --- | --- | --- |
| double getDouble() | double | double | double | double | double | double | double | --- | --- | --- | double | --- | --- | --- |
| BigDecimal getBigDecimal() | BigDecimal | BigDecimal | BigDecimal | BigDecimal | BigDecimal | BigDecimal | BigDecimal | --- | --- | --- | BigDecimal | --- | --- | --- |
| Date getDate() | Date | --- | --- | --- | --- | --- | --- | --- | Date | Date | Date | --- | --- | --- |
| Date getTime() | Date | --- | --- | --- | --- | --- | --- | --- | Date | Date | Date | --- | --- | --- |
| byte[] getByteArray() | byte[] | --- | --- | --- | --- | --- | --- | byte[] | --- | --- | byte[] | byte[] | --- | --- |
| JCO.Structure getStructure() | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | JCO.Structure | --- |
| JCO.Table getTable() | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | JCO.Table |
| Nested Class Summary | |
protected class |
JCO.Record.Type1Record
|
protected static class |
JCO.Record.XMLReader
Converts an XML document into a record |
protected static class |
JCO.Record.XMLWriter
Converts a record to an XML document |
| Nested classes inherited from class com.sap.mw.jco.JCO.MetaData |
JCO.MetaData.Type1Data |
| Field Summary | |
protected char[] |
data
Buffer that holds the actual data |
protected int[] |
delta
|
protected boolean |
modified
Flag that indicates whether this tables has been modified |
protected int |
num_rows
No. of rows encoded in the data buffer |
protected Object[] |
odata
Buffer that holds complex data like structures and tables |
protected byte[] |
opcode
|
protected static byte |
PARAMETER
This record represents a JCO parameter |
protected byte |
rec_type
Specifies the type of this record |
protected static byte |
REQUEST
This record represents a request |
protected static byte |
RESPONSE
This record represents a response |
protected int |
row
Currently active row |
protected int |
row_length
Length of a single row of data in chars |
protected static byte |
SEGMENT
This record represents a JCO IDOC segment |
protected static byte |
STRUCTURE
This record represents a JCO structure |
protected static byte |
TABLE
This record represents a JCO table |
protected JCO.Record.Type1Record |
type1_record
|
| Fields inherited from class com.sap.mw.jco.JCO.MetaData |
blength, boffset, decimals, defaults, description, extended_field_meta_data, flags, hash_of_indices, last_active_timestamp, length, name, num_fields, num_odata, offset, oindex, PRINT_HEADER_ALL, PRINT_HEADER_DECIMALS, PRINT_HEADER_DEFAULT, PRINT_HEADER_INTERNAL_LENGTH, PRINT_HEADER_INTERNAL_OFFSET, PRINT_HEADER_LENGTH, PRINT_HEADER_NAME, PRINT_HEADER_OFFSET, PRINT_HEADER_TYPE, rec_name, tab_length, tab_meta, type, type_handle, type_name, type1_data, unicode_type |
| 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.Record(IMetaData meta_data)
Creates a record with a layout as specified by the meta data |
|
JCO.Record(int type)
Creates a record of the specified type |
|
JCO.Record(int rec_type,
IMetaData meta_data)
Creates a record with a layout as specified by the meta data |
protected |
JCO.Record(int rec_type,
String rec_name)
Creates a record with a layout as specified by the meta data |
protected |
JCO.Record(JCO.Record value)
Creates an new instance of a record which has the same contents as the record argument |
| Method Summary | |
void |
addInfo(String name,
int type,
int length,
int offset,
int decimals,
String sdefault,
String description,
int flags,
Object tab_meta,
com.sap.mw.jco.IExtendedFieldMetaData extended)
Adds a new field descriptor to the meta data object. |
protected boolean |
checkIfInitialized()
Checks for initialized parameters |
protected void |
checkRowCapacity()
Check if the rows have been allocated properly. |
void |
clear()
Clears the record, i.e. resets everything to its initial state |
Object |
clone()
Creates a clone of this record |
protected void |
copyContent(JCO.Record src,
JCO.Record dest)
Copies the data from src to dest |
int |
copyFrom(JCO.Record source)
Copies the matching fields from the source record into this record Data fields are considered to be equivalent if the name and type of two fields match. |
protected JCO.ConversionException |
createConversionException(int index,
String to_type)
Creates a conversion exception |
protected JCO.ConversionException |
createConversionException(int index,
String from_type,
String value)
Creates a conversion exception |
protected void |
encodeGENERIC(char[] value,
int voffset,
int vlength,
int index)
Generic encoder used by XML parser |
protected void |
ensureBufferCapacity()
Checks the size of the buffer and allocates new memory if necessary. |
boolean |
equals(Object obj)
Compares the specified object with this record for equality. |
JCO.FieldIterator |
fields()
Returns an iterator for the fields |
protected void |
finalize()
|
void |
fromXML(String data)
Sets the whole record from an XML string. |
BigDecimal |
getBigDecimal(int index)
Returns the value of the i'th field as a BigDecimal object |
BigDecimal |
getBigDecimal(String field_name)
Returns the value of the i'th field as a BigDecimal object |
BigInteger |
getBigInteger(int index)
Returns the value of the i'th field as a BigInteger object |
BigInteger |
getBigInteger(String field_name)
Returns the value of the i'th field as a BigInteger object |
InputStream |
getBinaryStream(int index)
Returns the value of the i'th field as a stream of uninterpreted bytes, i.e. an java.io.InputStream object |
InputStream |
getBinaryStream(String field_name)
Returns the value of the named field as a stream of uninterpreted bytes, i.e. a java.io.InputStream object |
byte |
getByte(int index)
Returns the value of the i'th field as a byte |
byte |
getByte(String field_name)
Returns the value of the named field as a byte |
byte[] |
getByteArray(int index)
Returns the value of the i'th field as a byte array |
byte[] |
getByteArray(String field_name)
Returns the value of the i'th field as a byte[] array |
char |
getChar(int index)
Returns the value of the i'th field as a char |
char |
getChar(String field_name)
Returns the value of the named field as a char |
Reader |
getCharacterStream(int index)
Returns the value of the i'th field as a java.io.Reader object |
Reader |
getCharacterStream(String field_name)
Returns the value of the named field as a stream of characters, i.e. a java.io.Reader object |
char[] |
getCharArray(int index)
Returns the value of the i'th field as a char array |
char[] |
getCharArray(String field_name)
Returns the value of the i'th field as a char[] array |
String |
getClassNameOfValue(int index)
Returns the fully-qualified name of the Java class whose instances are manufactured if the methods getValue(int index) or getValue(String field_name) are called to retrieve a calue from the field. |
String |
getClassNameOfValue(String field_name)
Returns the fully-qualified name of the Java class whose instances are manufactured if the methods getValue(int index) or getValue(String field_name) are called to retrieve a calue from the field. |
protected char[] |
getDataBuffer()
This method is for internal use only. |
protected int |
getDataBufferOffset(int index)
This method is for internal use only. |
protected int |
getDataBufferRowLength()
This method is for internal use only. |
Date |
getDate(int index)
Returns the value of the i'th field as a date |
Date |
getDate(String field_name)
Returns the value of the named field as a Date object |
double |
getDouble(int index)
Returns the value of the i'th field as a double |
double |
getDouble(String field_name)
Returns the value of the named field as a double |
JCO.Field |
getField(int index)
Returns the i'th field as an JCO.Field object |
JCO.Field |
getField(String field_name)
Returns the named field as a JCO.Field object |
float |
getFloat(int index)
Returns the value of the i'th field as a float Please use setValue(float value, ...) and getFloat(...) methods only if you operate with float values. |
float |
getFloat(String field_name)
Returns the value of the named field as a float Please use setValue(float value, ...) and getFloat(...) methods only if you operate with float values. |
protected String |
getHTMLString(int index)
Note:All documents generated here are comply strictly to the encoding scheme as described for the method toXML(). |
int |
getInt(int index)
Returns the value of the i'th field as an integer |
int |
getInt(String field_name)
Returns the value of the named field as an integer |
long |
getLong(int index)
Returns the value of the i'th field as a long |
long |
getLong(String field_name)
Returns the value of the named field as a long |
short |
getShort(int index)
Returns the value of the i'th field as a short |
short |
getShort(String field_name)
Returns the value of the named field as a short |
String |
getString(int index)
Returns the value of the i'th field as a string. |
String |
getString(String field_name)
Returns the value of the named field as a java.lang.String object |
JCO.Structure |
getStructure(int index)
Returns the value of the i'th field as a JCO.Structure |
JCO.Structure |
getStructure(String field_name)
Returns the value of the named field as a JCO.Structure object |
JCO.Table |
getTable(int index)
Returns the value of the i'th field as a table |
JCO.Table |
getTable(String field_name)
Returns the value of the named field as a JCO.Table object |
Date |
getTime(int index)
Returns the value of the i'th field as a date |
Date |
getTime(String field_name)
Returns the value of the named field as a Date object |
Object |
getValue(int index)
Generic method that returns the value of the i'th field as an object. |
Object |
getValue(String field_name)
Returns the value of the named field as an object |
int |
hashCode()
Returns the hash code value for this record |
protected void |
initializeRow(int irow)
Initializes a row |
protected void |
internalSize(com.sap.mw.jco.JCO.DataSize size)
|
protected void |
printHTML(PrintWriter os)
Outputs record as a HTML table |
protected void |
printHTML(PrintWriter os,
String text,
int level)
Outputs record as a HTML table |
protected void |
printHTML(PrintWriter os,
String text,
int level,
int print_flags)
Outputs record as a HTML table |
void |
readXML(Reader reader)
Read the |
void |
readXML(String xml_filename)
Loads the request or response and all parameters and tables from the specified XML file. |
protected void |
setDefault(int index)
Sets the default value for a field |
protected void |
setModified(int row)
Sets the modified flag for the current row |
void |
setValue(byte[] value,
int index)
Sets the byte array as the value for the i'th field |
void |
setValue(byte[] value,
String name)
Sets the byte array as the value for the named field |
void |
setValue(byte value,
int index)
Sets the byte as the value for the i'th field |
void |
setValue(byte value,
String name)
Sets the byte as the value for the named field |
void |
setValue(char[] value,
int index)
Sets the specified character array as the field's value. |
void |
setValue(char[] value,
int from,
int length,
int index)
Sets the specified character array as the field's value. |
void |
setValue(char[] value,
int from,
int length,
String name)
Sets the specified character array as the value for the named field. |
void |
setValue(char[] value,
String name)
Sets the specified character array as the value for the named field. |
void |
setValue(char value,
int index)
Sets the specified character as the field's value. |
void |
setValue(char value,
String name)
Sets the character as the value for the named field. |
void |
setValue(double value,
int index)
Sets the double as the value for the i'th field |
void |
setValue(double value,
String name)
Sets the double as the value for the named field |
void |
setValue(float value,
int index)
Sets the float as the value for the i'th field Please use setValue(float value, ...) and getFloat(...) methods only if you operate with float values. |
void |
setValue(float value,
String name)
Sets the float as the value for the named field Please use setValue(float value, ...) and getFloat(...) methods only if you operate with float values. |
void |
setValue(int value,
int index)
Sets the int as the value for the i'th field |
void |
setValue(int value,
String name)
Sets the int as the value for the named field |
void |
setValue(JCO.Structure value,
int index)
Sets the structure as the value for the i'th field |
void |
setValue(JCO.Structure value,
String name)
Sets the structure as the value for the named field |
void |
setValue(JCO.Table value,
int index)
Sets the table as the value for the i'th field |
void |
setValue(JCO.Table value,
String name)
Sets the table as the value for the named field |
void |
setValue(long value,
int index)
Sets the long as the value for the i'th field |
void |
setValue(long value,
String name)
Sets the long as the value for the named field. |
void |
setValue(Object value,
int index)
Sets the object as the value for the i'th field |
void |
setValue(Object value,
String name)
Sets the object as the value for the named field |
void |
setValue(short value,
int index)
Sets the short as the value for the i'th field |
void |
setValue(short value,
String name)
Sets the short as the value for the named field. |
void |
setValue(String value,
int index)
Sets the specified string as the field's value. |
void |
setValue(String value,
String name)
Sets the string as the value for the named field. |
String |
toString()
Returns the record as a string |
String |
toXML()
Returns the whole record in XML format. |
String |
toXML(int index)
Returns the value of the i'th field as a XML string. |
String |
toXML(String field_name)
Returns the value of named field as a XML string. |
void |
writeHTML(String html_filename)
Dump the table to a file. |
void |
writeHTML(Writer writer)
Dump the table to a file. |
void |
writeXML(String xml_filename)
Dump the request or response and all parameters and tables to the specified XML file. |
void |
writeXML(Writer writer)
Constructs an XML document from the record and writes it to the specified output writer |
void |
writeXML(Writer writer,
boolean with_header)
Constructs an XML document from the record and writes it to the specified output writer |
void |
writeXML(Writer writer,
String namespace_urn,
boolean with_header)
Constructs an XML document from the record and writes it to the specified output writer |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final byte PARAMETER
protected static final byte STRUCTURE
protected static final byte TABLE
protected static final byte SEGMENT
protected static final byte REQUEST
protected static final byte RESPONSE
protected byte rec_type
protected char[] data
protected Object[] odata
protected byte[] opcode
protected int[] delta
protected JCO.Record.Type1Record type1_record
protected int row_length
protected int num_rows
protected int row
protected boolean modified
| Constructor Detail |
public JCO.Record(int type)
type - the type of the recordpublic JCO.Record(IMetaData meta_data)
meta_data - the meta data which describe the layout of the record
public JCO.Record(int rec_type,
IMetaData meta_data)
rec_type - the type of the recordmeta_data - the meta data which describe the layout of the record
protected JCO.Record(int rec_type,
String rec_name)
rec_type - the type of the recordrec_name - the name of the recordprotected JCO.Record(JCO.Record value)
value - the initial value of the record| Method Detail |
protected void finalize()
throws Throwable
Throwablepublic Object clone()
clone in interface IMetaDataclone in class JCO.MetaDatapublic boolean equals(Object obj)
equals in class JCO.MetaDataobj - the object to compare for equality with this record
public int hashCode()
hashCode in class JCO.MetaData
protected void copyContent(JCO.Record src,
JCO.Record dest)
src - the source record
protected JCO.ConversionException createConversionException(int index,
String to_type)
index - the index of the field for which the conversion failedto_type - the data type which was the target of the conversion
protected JCO.ConversionException createConversionException(int index,
String from_type,
String value)
index - the index of the field for which the conversion failedfrom_type - the data type which was the target of the conversionvalue - the value whuch could not be converted
public void addInfo(String name,
int type,
int length,
int offset,
int decimals,
String sdefault,
String description,
int flags,
Object tab_meta,
com.sap.mw.jco.IExtendedFieldMetaData extended)
IMetaData structureMD = new JCO.MetaData("structure name");
structureMD.addInfo(...);
...
structureMD.addInfo(...);
// create a structure from the metadata ...
JCO.Structure structure = new JCO.Structure(structureMD);
// ... or a table
JCO.Table table = new JCO.Table(structureMD);
It is possible to create more than one record instance from one metadata object.
addInfo in interface IMetaDataaddInfo in class JCO.MetaDataname - 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 otherwiseextended - extended meta data for this field or null if none available.JCO.MetaData.addInfo(String name, int type, int charlength, int length, int offset, int decimals, String sdefault, String description, int flags,Object tab_meta, IExtendedFieldMetaData extended),
JCO.Repositoryprotected void setModified(int row)
protected final boolean checkIfInitialized()
protected void initializeRow(int irow)
irow - the row pointer to the row which must be initializedprotected void ensureBufferCapacity()
protected final void checkRowCapacity()
JCO.Exception - if no rows have not been allocated so farpublic void clear()
public int copyFrom(JCO.Record source)
source - the source record from which to copy the data
JCO.Exception - if something went wrongpublic final JCO.Field getField(int index)
index - the field index
public final String getClassNameOfValue(int index)
index - the field index
public Object getValue(int index)
| type | JCO.TYPE_CHAR | JCO.TYPE_INT1 | JCO.TYPE_INT2 | JCO.TYPE_INT | JCO.TYPE_NUM | JCO.TYPE_BCD | JCO.TYPE_FLOAT | JCO.TYPE_BYTE | JCO.TYPE_DATE | JCO.TYPE_TIME | JCO.TYPE_STRING | JCO.TYPE_XSTRING | JCO.TYPE_STRUCTURE | JCO.TYPE_TABLE |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| object | String | Integer | Integer | Integer | String | String | Double | byte[] | Date | Date | String | byte[] | JCO.Structure | JCO.Table |
index - the field index
JCO.ConversionException - thrown if the value could not be converted to an objectpublic String getString(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a Stringpublic char getChar(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a char,
i.e. if the underlying field contained more than one characterpublic byte getByte(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a bytepublic final byte getByte(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a byte
JCO.Exception - thrown if a field with the specified name does not existpublic float getFloat(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a floatpublic final float getFloat(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a float
JCO.Exception - thrown if a field with the specified name does not existpublic short getShort(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a shortpublic int getInt(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to an intpublic long getLong(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to an longpublic BigInteger getBigInteger(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a BigIntegerpublic double getDouble(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a doublepublic BigDecimal getBigDecimal(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a BigDecimalpublic Date getDate(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a Datepublic Date getTime(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a Datepublic byte[] getByteArray(int index)
index - the field index
JCO.ConversionException - thrown if the value could not be converted to a byte arraypublic char[] getCharArray(int index)
index - the field index
JCO.ConversionException - thrown if the value could not be converted to a byte arraypublic InputStream getBinaryStream(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be
converted to an java.io.InputStreampublic Reader getCharacterStream(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a java.io.Readerpublic JCO.Table getTable(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a JCO.TableJCO.Tablepublic JCO.Structure getStructure(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a JCO.StructureJCO.Structureprotected String getHTMLString(int index)
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a Stringpublic String toXML(int index)
Note:All documents generated here are comply strictly to the encoding scheme as described for the method toXML().
index - the index of the field
JCO.ConversionException - thrown if the value could not be converted to a String
JCO.Exception - thrown if another error occurredfromXML(java.lang.String)public String toXML(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a String
JCO.Exception - thrown if another error occurredfromXML(java.lang.String)public String toXML()
Note:All documents generated here are comply strictly to the encoding scheme as described for the method toXML().
JCO.ConversionException - thrown if the value could not be converted to a String
JCO.Exception - thrown if another error occurredfromXML(java.lang.String)public void fromXML(String data)
XML data := ELEMENT* |
ELEMENT := VALUE |
VALUE := LITERAL* | TABLE_ROW* | ELEMENT*
TABLE_ROW := - VALUE
LITERAL := literal | &html_entity; | hex_coded_literal;
Field names in SAP system may contain characters which are illegal in XML element names.
data - the XML data
JCO.Exception - thrown if an error occurred such as invalid XML format.toXML(int)
public void setValue(String value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representationpublic final JCO.Field getField(String field_name)
field_name - the name of the field
JCO.Exception - thrown if a field with the specified name does not existpublic final String getClassNameOfValue(String field_name)
field_name - the name of the field
JCO.Exception - thrown if a field with the specified name does not existpublic final Object getValue(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to an Object
JCO.Exception - thrown if a field with the specified name does not existpublic final String getString(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a String
JCO.Exception - thrown if a field with the specified name does not existpublic final char getChar(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a char
JCO.Exception - thrown if a field with the specified name does not existpublic final short getShort(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a short
JCO.Exception - thrown if a field with the specified name does not existpublic final int getInt(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to an int
JCO.Exception - thrown if a field with the specified name does not existpublic final long getLong(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a long
JCO.Exception - thrown if a field with the specified name does not existpublic final BigInteger getBigInteger(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a BigInteger
JCO.Exception - thrown if a field with the specified name does not existpublic final double getDouble(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a double
JCO.Exception - thrown if a field with the specified name does not existpublic final BigDecimal getBigDecimal(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a BigDecimal
JCO.Exception - thrown if a field with the specified name does not existpublic final Date getDate(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a Date
JCO.Exception - thrown if a field with the specified name does not existpublic final Date getTime(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a Date
JCO.Exception - thrown if a field with the specified name does not existpublic final byte[] getByteArray(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a byte[] array
JCO.Exception - thrown if a field with the specified name does not existpublic final char[] getCharArray(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a byte[] array
JCO.Exception - thrown if a field with the specified name does not existpublic final InputStream getBinaryStream(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a java.io.InputStreampublic final Reader getCharacterStream(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a java.io.Readerpublic final JCO.Table getTable(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a JCO.Table
JCO.Exception - thrown if a field with the specified name does not existpublic final JCO.Structure getStructure(String field_name)
field_name - the name of the field
JCO.ConversionException - thrown if the value could not be converted to a JCO.Structure
JCO.Exception - thrown if a field with the specified name does not existprotected void setDefault(int index)
index - the index of the field
public void setValue(char value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(char[] value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(char[] value,
int from,
int length,
int index)
value - the value to set for the fieldfrom - offset in the char arraylength - count of chars that will be set as field's valueindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(short value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(int value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(long value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(double value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(byte[] value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(JCO.Structure value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(JCO.Table value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(Object value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(String value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(char[] value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(char[] value,
int from,
int length,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(char value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(short value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(int value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(long value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(double value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(float value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(float value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(byte value,
int index)
value - the value to set for the fieldindex - the index of the field
JCO.ConversionException - thrown if the value could not be converted to its internal representation
public void setValue(byte value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(byte[] value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(JCO.Structure value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(JCO.Table value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not exist
public void setValue(Object value,
String name)
value - the value to set for the fieldname - the name of the field to set
JCO.ConversionException - thrown if the value could not be converted to its internal representation
JCO.Exception - thrown if a field with the specified name does not existprotected char[] getDataBuffer()
protected int getDataBufferOffset(int index)
getDataBufferOffset in class JCO.MetaDataindex - the index of the field whose internal data
buffer offset is to be returned.protected int getDataBufferRowLength()
protected final void encodeGENERIC(char[] value,
int voffset,
int vlength,
int index)
voffset - the offset into the value arrayvlength - the length of data to encode from the value arrayindex - the field indexprotected void internalSize(com.sap.mw.jco.JCO.DataSize size)
internalSize in class JCO.MetaDatapublic final JCO.FieldIterator fields()
public void writeHTML(String html_filename)
writeHTML in class JCO.MetaDatahtml_filename - the file to write to
JCO.Exception - thrown if something went wrong
public void writeHTML(Writer writer)
throws IOException
writeHTML in class JCO.MetaDatawriter - the stream to write to
IOException - thrown in case of an I/O error
JCO.Exception - thrown if something else went wrongprotected void printHTML(PrintWriter os)
os - the PrintWriter output stream
protected void printHTML(PrintWriter os,
String text,
int level)
os - the PrintWriter output stream
protected void printHTML(PrintWriter os,
String text,
int level,
int print_flags)
os - the PrintWriter output streamtext - the name of the recordpublic String toString()
toString in interface IMetaDatatoString in class JCO.MetaData
public void readXML(Reader reader)
throws IOException
reader - the stream to read the xml document from
IOException - thrown if an I/O error occurred
JCO.Exception - thrown if another error occurred
public void readXML(String xml_filename)
throws IOException
xml_filename - the file to read from
IOException - thrown if an I/O error occurred
JCO.Exception - thrown if another error occurred
public void writeXML(Writer writer)
throws IOException
writer - the stream to dump the XML document to
IOException - thrown if an I/O error occurred
JCO.Exception - thrown if another error occurred
public void writeXML(Writer writer,
boolean with_header)
throws IOException
writer - the stream to dump the XML document towith_header - if true prepends the XML header,IOException - thrown if an I/O error occurred
JCO.Exception - thrown if another error occurred
public void writeXML(Writer writer,
String namespace_urn,
boolean with_header)
throws IOException
writer - the stream to dump the XML document towith_header - if true prepends the XML header,IOException - thrown if an I/O error occurred
JCO.Exception - thrown if another error occurred
public void writeXML(String xml_filename)
throws IOException
xml_filename - the file to write to
IOException - thrown if an I/O error occurred
JCO.Exception - thrown if another error occurred
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||