|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.wtc.jatmi.StandardTypes | +--weblogic.wtc.jatmi.TypedFML32
This implements TypedFML32 in JAVA as a TypedBuffer. Fieldids are generated with the tool mkfldclass32, and then put into the buffer with the appropriate TypedFML32 methods. Note that in this implementation Fieldids must be combined into a field key, which is a combination of the Fldid32 and the occurance number. Any number of field tables can be loaded into any TypedFML32 object in order to do FldId to String conversions and String to FldId conversions.
FmlKey
,
FldTbl
,
TypedBuffer
,
mkfldclass32
, Serialized FormField Summary | |
protected java.util.HashMap |
fldid_occs
|
protected java.util.TreeMap |
flds
|
protected FldTbl[] |
fldtbls
|
protected int |
indxintvl
|
protected int |
len
|
protected int |
magic
|
protected int |
maxlen
|
protected int |
nfields
|
protected int |
nie
|
Constructor Summary | |
TypedFML32()
Default constructor. |
|
TypedFML32(FldTbl table)
Constructor which provides a single FldTbl object for mapping FldIds to Strings and Strings to FldIds Note that it is not necesary to provide FldTbls unless String/FldId mappings are required. |
|
TypedFML32(FldTbl[] tables)
Constructor which provides a list FldTbl objects for mapping FldIds to Strings and Strings to FldIds. |
|
TypedFML32(TypedFML32 copyFrom)
This constructor copies the fields from the input FML32 buffer. |
Method Summary | |
void |
_tmpostrecv(java.io.DataInputStream decoder,
int recv_size)
|
void |
_tmpresend(java.io.DataOutputStream encoder)
This function presends and encodes the given TypedBuffer object. |
void |
Fadd(int fldid32,
java.lang.Object value)
Adds the given object. |
void |
Fchg(FmlKey key,
java.lang.Object value)
Adds the given object, whose field id is contained in key to the fielded buffer. |
void |
Fchg(int fldid,
int occurance,
java.lang.Object value)
Adds the given object. |
void |
Fdel(FmlKey key)
Delete given key from fielded buffer. |
void |
Fdel(int fldid,
int occurance)
Delete given element from fielded buffer. |
java.lang.Object |
Fget(FmlKey key)
Retrieves a copy of the object stored in the FML32 buffer of the given field id and occurance number. |
java.lang.Object |
Fget(int fldid,
int occurance)
Retrieves a copy of the object stored in the FML buffer of the given field id and occurance number. |
java.util.Iterator |
Fiterator()
Returns an iterator for the start of the fielded FML32 buffer. |
int |
Fldid(java.lang.String name)
Returns the field id corresponding to the given name. |
int |
Fldno(int fldid32)
Given a fieldid, this returns the field number |
int |
Fldtype(int fldid32)
Given a fieldid, this returns the field type |
java.lang.String |
Fname(int fldid32)
Returns the string that matches the given fieldid. |
int |
Foccur(int fldid)
Returns the number of occurences of the field specified by fldid |
int |
Fused()
Returns the amount of space that this FML buffer will take when present |
FldTbl[] |
getFieldTables()
gets the current list of FldTbls that are being used by this FML32 object to do FldId/String mappings. |
protected boolean |
hasPointerFields()
Tells whether or not this buffer has any embedded pointers within it at all |
void |
setFieldTables(FldTbl[] tables)
This function sets the list of FldTbl objects that can be used for FldId/String mappings |
Methods inherited from class weblogic.wtc.jatmi.StandardTypes |
getHintIndex,
getSubtype,
getType,
hint_to_type |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected int magic
protected int len
protected int maxlen
protected int nfields
protected int nie
protected int indxintvl
protected java.util.TreeMap flds
protected java.util.HashMap fldid_occs
protected FldTbl[] fldtbls
Constructor Detail |
public TypedFML32()
public TypedFML32(FldTbl[] tables)
tables
- A list of FldTbl objects that can be used to map FldIds
and stringspublic TypedFML32(FldTbl table)
table
- A FldTbl object that can be used to map FldIds
and stringspublic TypedFML32(TypedFML32 copyFrom)
copyFrom
- The FML32 buffer to copy data fromMethod Detail |
public void setFieldTables(FldTbl[] tables)
tables
- The list of tables to use for FldId/String mappingsFldTbl
public FldTbl[] getFieldTables()
public int Fldno(int fldid32)
fldid32
- The field id from which to extract the field numberpublic int Fldtype(int fldid32)
fldid32
- The field id from which to extract the field typepublic void Fchg(FmlKey key, java.lang.Object value) throws Ferror
key
- The fieldid and occurance to add to the buffervalue
- The element to add to the buffer. Note that this object
must match the type of object expected by the field type, or an
invalid cast exception will be thrownFmlKey
public void Fchg(int fldid, int occurance, java.lang.Object value) throws Ferror
fldid
- The fieldid to add to this bufferoccurance
- The occurance number of the field to addvalue
- The element to add to the buffer. Note that this object
must match the type of object expected by the field type, or an
invalid cast exception will be thrownFmlKey
public void Fadd(int fldid32, java.lang.Object value) throws Ferror
fldid32
- The fieldid to add to this buffervalue
- The element to add to the buffer. Note that this object
must match the type of object expected by the field type, or an
invalid cast exception will be thrownFmlKey
public java.lang.Object Fget(FmlKey key) throws Ferror
key
- the field id and occurance number of the element to retrievepublic java.lang.Object Fget(int fldid, int occurance) throws Ferror
fldid
- The field id of the element to retrieveoccurance
- The occurance number of the element to retrievepublic java.util.Iterator Fiterator()
public int Foccur(int fldid)
fldid
- the field id to look for in the fielded FML32 bufferprotected boolean hasPointerFields()
public void Fdel(FmlKey key) throws Ferror
key
- The field id and occurance of the element to be removedpublic void Fdel(int fldid, int occurance) throws Ferror
fldid
- The field id of the element to be removedoccurance
- The occurance of the element to be removedpublic java.lang.String Fname(int fldid32) throws Ferror
fldid32
- The field id to map to a stringpublic int Fldid(java.lang.String name) throws Ferror
name
- the name of the field we are trying to findinteger
field idpublic int Fused()
The
- size of this buffer when presentpublic void _tmpresend(java.io.DataOutputStream encoder) throws TPException, java.io.IOException
XDR encodes the FML32 buffer
encoder
- The output stream to encode this type to. Should
not be padded.public void _tmpostrecv(java.io.DataInputStream decoder, int recv_size) throws java.io.IOException, TPException
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81b |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |