public class FList extends Hashtable implements Externalizable
FList
class is the Java expression of the Portal flist (field list)
structure and associated functions. An flist is a collection of 'Field - Value'
pairs. The field is a predefined constant, and the value is of a type determined by
the field. Flists are used by opcodes to pass data from the application to the database.
For more information and examples of flists, see Understanding Oracle BRM Flists and
Storable classes in the Oracle BRM online documentation.Modifier and Type | Field and Description |
---|---|
protected static String |
NEWLINE |
static Object |
nullObj |
Constructor and Description |
---|
FList()
Constructs an empty instance of
FList . |
Modifier and Type | Method and Description |
---|---|
void |
append(FList list)
Appends the
FList passed in onto the current FList . |
String |
asString()
Creates a string representation of the
FList . |
static FList |
createFromString(String str)
Creates a new
FList from a string representation. |
static FList |
createFromString(String str,
long defDB)
Creates a new
FList from a string representation. |
static FList |
createFromXML(InputStream is)
Deprecated.
As of 6.5SP2_EBF - this does not properly support
double byte characters. Use the Reader form of the method instead.
|
static FList |
createFromXML(Reader reader)
Converts the XML in the given stream into an FList
|
FList |
deepClone()
Copies all levels of an
FList , including array elements and
substructures. |
void |
dump()
Displays the
FList to the standard output. |
SparseArray |
get(ArrayField field)
Returns the
SparseArray value associated with a field of type
ArrayField . |
byte[] |
get(BinStrField field)
Returns a byte[] value associated with a field of type
BinStrField . |
Buffer |
get(BufField field)
Returns the
Buffer value associated with a field of type
BufField . |
BigDecimal |
get(DecimalField field)
Returns a
BigDecimal value associated with a field of type
DecimalField . |
Integer |
get(EnumField field)
Returns the
Integer value associated with a field of type
EnumField . |
EBufException |
get(ErrField field)
Returns an
EBufException value associated with a field of type
ErrField . |
Integer |
get(IntField field)
Returns the
Integer value associated with a field of type
IntField . |
Double |
get(NumField field)
Deprecated.
Num is no longer supported.
|
Poid |
get(ObjField field)
Returns a
Poid value associated with a field of type
ObjField . |
Poid |
get(PoidField field)
Returns the
Poid value associated with a field of type
PoidField . |
String |
get(StrField field)
Returns the
String value associated with a field of type
StrField . |
FList |
get(SubStructField field)
Returns an
FList value associated with a field of type
Substruct . |
Date |
get(TStampField field)
Returns the
Date value associated with a field of type
TStampField . |
Integer |
get(UIntField field)
Deprecated.
Uint is no longer supported.
|
Set<Field> |
getAllFields()
Returns a set of the fields in the
FList . |
Collection<Object> |
getAllValues()
Returns a collection of the values in the
FList . |
FList |
getElement(ArrayField field,
int elementID)
Returns an element associated with an array of type
ArrayField . |
Object |
getField(Field field)
Returns an
Object value associated with a field of type
field. |
Enumeration<Field> |
getFields()
Deprecated.
see getAllFields()
|
int |
getSize()
Returns the number of fields in the
FList . |
Enumeration<Object> |
getValues()
Deprecated.
see getAllValues()
|
boolean |
hasField(Field field)
Checks the
FList keys for a specified field. |
void |
readExternal(ObjectInput in)
Implements the java.io.Externalizable interface.
|
void |
remove(Field field)
Removes a single field from an
FList . |
void |
removeAllFields()
Clears the
FList by removing all contained objects. |
void |
set(ArrayField field,
SparseArray value)
Adds an
ArrayField and its value to the FList . |
void |
set(BinStrField field,
byte[] value)
Adds a
BinStrField and its value to the FList . |
void |
set(BufField field,
Buffer value)
Adds a
BufField and its value to the FList . |
void |
set(DecimalField field,
BigDecimal value)
Adds a
DecimalField and its value to the FList . |
void |
set(EnumField field,
int value)
Adds an
EnumField and its value to the FList . |
void |
set(EnumField field,
Integer value)
Adds an
EnumField and its value to the FList . |
void |
set(ErrField field,
EBufException value)
Adds a
ErrField and its value to the FList . |
void |
set(Field field)
Adds a field to the
FList and assigns it a null value. |
void |
set(IntField field,
int value)
Adds an
IntField and its value to the FList . |
void |
set(IntField field,
Integer value)
Adds an
IntField and its value to the FList . |
void |
set(NumField field,
double value)
Deprecated.
Num is no longer supported.
|
void |
set(NumField field,
Double value)
Deprecated.
Num is no longer supported.
|
void |
set(ObjField field,
Poid value)
Adds a
ObjField and its value to the FList . |
void |
set(PoidField field,
Poid value)
Adds a
PoidField and its value to the FList . |
void |
set(StrField field,
String value)
Adds a
StrField and its value to the FList . |
void |
set(SubStructField field,
FList value)
Adds a
SubStructField and its value to the FList . |
void |
set(TStampField field,
Date value)
Adds a
TStampField and its value to the FList . |
void |
set(UIntField field,
int value)
Deprecated.
Uint is no longer supported.
|
void |
set(UIntField field,
Integer value)
Deprecated.
Uint is no longer supported. |
void |
setElement(ArrayField field,
int elementID)
Adds a null element to an
ArrayField in the FList . |
void |
setElement(ArrayField field,
int elementID,
FList value)
Adds an element to an
ArrayField in the FList . |
void |
setField(Field fld,
int elementID,
FList value)
Deprecated.
This method is public to ensure operability. It's for
internal use only as it provides no type protection.
|
void |
setField(Field field,
Object value)
Deprecated.
This method is public to ensure operability. It's for
internal use only as it provides no type protection.
|
String |
toString()
Deprecated.
use asString() in stead.
|
Document |
toXMLDocument()
This method allows you to obtain this FList as an XML Document
|
String |
toXMLString()
This method allows you to obtain this FList as an XML string
|
void |
writeExternal(ObjectOutput out)
Implements the java.io.Externalizable interface.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, values
public FList deepClone() throws EBufException
FList
, including array elements and
substructures. The copied fields and their values are duplicated, so no memory
is shared between the two FList
s.FList
.EBufException
- results when an error occurs.public void append(FList list) throws EBufException
FList
passed in onto the current FList
.
Matching fields will be overwritten.list
- An FList
to append. It cannot be null.EBufException
- thrown if an error occurspublic void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- The destination for the output.IOException
- thrown when an error occurs.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
writeExternal
method.
It's unlikely you will need to use this method.readExternal
in interface Externalizable
in
- The object containing the saved data.IOException
- thrown when an error occurs.ClassNotFoundException
- thrown when the class can't be found.public void removeAllFields()
FList
by removing all contained objects.public void remove(Field field)
FList
. Subfields
cannot be removed, only whole arrays or substruct fields.field
- The field to remove.public Enumeration<Field> getFields()
FList
.public Enumeration<Object> getValues()
FList
.public Set<Field> getAllFields()
FList
.public Collection<Object> getAllValues()
FList
.public int getSize()
FList
. Subfields are not
counted.FList
.public boolean hasField(Field field)
FList
keys for a specified field.field
- The field being requested.true
if the FList
contains the specified
field, even if the field has a null value.public void set(Field field)
FList
and assigns it a null value.
This method must be used to add a field that does not yet have a value.
Specify the field name and type in the field object.field
- The field to add.public void set(IntField field, int value)
IntField
and its value to the FList
.field
- The field to add.value
- The new field's int type value. This value cannot be null.public void set(UIntField field, int value)
UIntField
and its value to the FList
.field
- The field to add.value
- The new field's int type value. This value cannot be null.public void set(EnumField field, int value)
EnumField
and its value to the FList
.field
- The field to add.value
- The new field's int type value. This value cannot be null.public void set(IntField field, Integer value)
IntField
and its value to the FList
.field
- The field to add.value
- The new field's Integer
type value. This value
cannot be null.public void set(UIntField field, Integer value)
Uint
is no longer supported.UIntField
and its value to the FList
.field
- The field to add.value
- The new field's Integer
type value. This value
cannot be null.public void set(EnumField field, Integer value)
EnumField
and its value to the FList
.field
- The field to add.value
- The new field's Integer
type value. This value
cannot be null.public void set(NumField field, double value)
NumField
and its value to the FList
.field
- The field to add.value
- The new field's double type value. This value cannot be null.public void set(NumField field, Double value)
NumField
and its value to the FList
.field
- The field to add.value
- The new field's Double
type value. This value
cannot be null.public void set(StrField field, String value)
StrField
and its value to the FList
.field
- The field to add.value
- The new field's String
type value. This value
cannot be null.public void set(BufField field, Buffer value)
BufField
and its value to the FList
.field
- The field to add.value
- The new field's Buffer
type value. This value
cannot be null.public void set(PoidField field, Poid value)
PoidField
and its value to the FList
.field
- The field to add.value
- The new field's Poid
type value. This value
cannot be null.public void set(TStampField field, Date value)
TStampField
and its value to the FList
.field
- The field to add.value
- The new field's Date
type value. This value
cannot be null.public void set(ArrayField field, SparseArray value)
ArrayField
and its value to the FList
.field
- The field to add.value
- The new field's SparseArray
type value. This value
cannot be null.public void setElement(ArrayField field, int elementID, FList value)
ArrayField
in the FList
.field
- The field to add.elementID
- The element ID of the field to add to the array.value
- The new element's FList
type value. This value
cannot be null.public void setElement(ArrayField field, int elementID)
ArrayField
in the FList
.field
- The field to add.elementID
- The element ID of the field to add to the array.public void set(SubStructField field, FList value)
SubStructField
and its value to the FList
.field
- The field to add.value
- The new field's FList
type value. This value
cannot be null.public void set(ObjField field, Poid value)
ObjField
and its value to the FList
.field
- The field to add.value
- The new field's Poid
type value. This value
cannot be null.public void set(BinStrField field, byte[] value)
BinStrField
and its value to the FList
.field
- The field to add.value
- The new field's byte[] type value. This value
cannot be null.public void set(ErrField field, EBufException value)
ErrField
and its value to the FList
.field
- The field to add.value
- The new field's EBufException
type value. This value
cannot be null.public void set(DecimalField field, BigDecimal value)
DecimalField
and its value to the FList
.field
- The field to add.value
- The new field's BigDecimal
type value. This value
cannot be null.public Integer get(IntField field) throws EBufException
Integer
value associated with a field of type
IntField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public Integer get(UIntField field) throws EBufException
Integer
value associated with a field of type
UIntField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public Integer get(EnumField field) throws EBufException
Integer
value associated with a field of type
EnumField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public Double get(NumField field) throws EBufException
Double
value associated with a field of type
NumField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public String get(StrField field) throws EBufException
String
value associated with a field of type
StrField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public Buffer get(BufField field) throws EBufException
Buffer
value associated with a field of type
BufField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public Poid get(PoidField field) throws EBufException
Poid
value associated with a field of type
PoidField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public Date get(TStampField field) throws EBufException
Date
value associated with a field of type
TStampField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public SparseArray get(ArrayField field) throws EBufException
SparseArray
value associated with a field of type
ArrayField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public FList getElement(ArrayField field, int elementID) throws EBufException
ArrayField
.field
- The ArrayField
object from which to retrieve the element.elementID
- The array element ID of the element to retrieve.FList
associated with the field name and element ID.
Its value can be null.EBufException
- occurs when the field doesn't exist.public FList get(SubStructField field) throws EBufException
FList
value associated with a field of type
Substruct
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public Poid get(ObjField field) throws EBufException
Poid
value associated with a field of type
ObjField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public byte[] get(BinStrField field) throws EBufException
BinStrField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public EBufException get(ErrField field) throws EBufException
EBufException
value associated with a field of type
ErrField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public BigDecimal get(DecimalField field) throws EBufException
BigDecimal
value associated with a field of type
DecimalField
.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public Object getField(Field field) throws EBufException
Object
value associated with a field of type
field.field
- The field to look up.EBufException
- occurs when the field doesn't exist.public void setField(Field field, Object value)
field
- The field to set.value
- The value of the field.public void setField(Field fld, int elementID, FList value)
fld
- The field to set.elementID
- The element to set.value
- The value of the field.public static FList createFromXML(InputStream is) throws EBufException
is
- The input stream containing an XML representation of an FListEBufException
public static FList createFromXML(Reader reader) throws EBufException
reader
- - The Reader object containing the XML representation of an FListEBufException
public String toXMLString() throws EBufException
EBufException
public Document toXMLDocument() throws EBufException
EBufException
public String toString()
FList
.
This method can be restricted not to convert FList to String by providing
the entry infranet.flist.tostring.enable=false in Infranet.properties filepublic String asString()
FList
.
This is un-restricted in the way if called it will return String conversion of FList.FList
.public static FList createFromString(String str) throws EBufException
FList
from a string representation.str
- A string descriptions of an flist. For example:
0 PIN_FLD_POID POID [0] 0.0.0.1 /account -1 0 0 PIN_FLD_LAST_NAME STR [0] "Mouse" 0 PIN_FLD_FIRST_NAME STR [0] "Mickey" 0 PIN_FLD_INT_VAL INT [0] 42 ...
FList
with the key/value pairs specified in the string.EBufException
- results when an error occurs.public static FList createFromString(String str, long defDB) throws EBufException
FList
from a string representation.str
- A String description of an FList. Specify the database portion of
the string as '$DB' if you want to use the defDB
parameter.defDB
- A specific database number. If the
str
parameter contains the substring '$DB', the database
number specified in this parameter replaces it and the FList
returned contains the database number. If the str
parameter
contains a database number, the defDB
parameter is ignored.FList
with the key/value pairs specified in the string.EBufException
- results when an error occurs.Poid.valueOf(String str, long defaultDatabase)
public void dump()
FList
to the standard output.Copyright © 2003, 2023, Oracle and/or its affiliates.