public class FList
extends java.util.Hashtable
implements java.io.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 java.lang.String |
NEWLINE |
static java.lang.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. |
java.lang.String |
asString()
Creates a string representation of the
FList. |
FList |
createFromJsonObject(JsonNode jsonNode)
This method allows you to obtain FList from JsonNode Object.
|
FList |
createFromJsonString(java.lang.String jsonString)
This method allows you to obtain FList from JSON String.
|
static FList |
createFromString(java.lang.String str)
Creates a new
FList from a string representation. |
static FList |
createFromString(java.lang.String str,
long defDB)
Creates a new
FList from a string representation. |
static FList |
createFromXML(java.io.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(java.io.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. |
java.math.BigDecimal |
get(DecimalField field)
Returns a
BigDecimal value associated with a field of type
DecimalField. |
java.lang.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. |
java.lang.Integer |
get(IntField field)
Returns the
Integer value associated with a field of type
IntField. |
java.lang.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. |
java.lang.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. |
java.util.Date |
get(TStampField field)
Returns the
Date value associated with a field of type
TStampField. |
java.lang.Integer |
get(UIntField field)
Deprecated.
Uint is no longer supported.
|
java.util.Set<Field> |
getAllFields()
Returns a set of the fields in the
FList. |
java.util.Collection<java.lang.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. |
java.lang.Object |
getField(Field field)
Returns an
Object value associated with a field of type
field. |
java.util.Enumeration<Field> |
getFields()
Deprecated.
see getAllFields()
|
int |
getSize()
Returns the number of fields in the
FList. |
java.util.Enumeration<java.lang.Object> |
getValues()
Deprecated.
see getAllValues()
|
boolean |
hasField(Field field)
Checks the
FList keys for a specified field. |
void |
readExternal(java.io.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,
java.math.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,
java.lang.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,
java.lang.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,
java.lang.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,
java.lang.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,
java.util.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,
java.lang.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,
java.lang.Object value)
Deprecated.
This method is public to ensure operability. It's for
internal use only as it provides no type protection.
|
JsonNode |
toJsonObject()
This method allows you to obtain this FList as a JSON object.
|
JsonNode |
toJsonObject(java.util.Map<java.lang.String,java.lang.String> fieldMap)
This method allows you to obtain this FList as a JSON object.
|
java.lang.String |
toJsonString()
This method allows you to obtain this FList as a JSON beautified string.
|
java.lang.String |
toJsonString(java.util.Map<java.lang.String,java.lang.String> fieldMap)
This method allows you to obtain this FList as a JSON beautified string.
|
java.lang.String |
toJsonStringCompact()
This method allows you to obtain this FList as a JSON compact string.
|
java.lang.String |
toJsonStringCompact(java.util.Map<java.lang.String,java.lang.String> fieldMap)
This method allows you to obtain this FList as a JSON compact string.
|
java.lang.String |
toString()
Deprecated.
use asString() in stead.
|
org.w3c.dom.Document |
toXMLDocument()
This method allows you to obtain this FList as an XML Document
|
org.w3c.dom.Document |
toXMLDocument(int xmlType,
boolean newStyle)
An extended toXMLDocument method to support multiple XML formats.
|
org.w3c.dom.Document |
toXMLDocument(int xmlType,
boolean newStyle,
java.util.Map<java.lang.String,java.lang.String> fieldMap)
An extended toXMLDocument method to support multiple XML formats.
|
org.w3c.dom.Document |
toXMLDocument(java.util.Map<java.lang.String,java.lang.String> fieldMap)
This method allows you to obtain this FList as an XML Document
|
java.lang.String |
toXMLString()
This method allows you to obtain this FList as an XML string
|
java.lang.String |
toXMLString(int xmlType,
boolean newStyle)
An extended toXMLString method to support multiple XML formats.
|
java.lang.String |
toXMLString(int xmlType,
boolean newStyle,
java.util.Map<java.lang.String,java.lang.String> fieldMap)
An extended toXMLString method to support multiple XML formats.
|
java.lang.String |
toXMLString(java.util.Map<java.lang.String,java.lang.String> fieldMap)
This method allows you to obtain this FList as an XML string
|
void |
writeExternal(java.io.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, valuespublic static java.lang.Object nullObj
protected static final java.lang.String NEWLINE
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 FLists.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(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - The destination for the output.java.io.IOException - thrown when an error occurs.public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException,
java.io.InvalidClassException
writeExternal method.
It's unlikely you will need to use this method.readExternal in interface java.io.Externalizablein - The object containing the saved data.java.io.IOException - thrown when an error occurs.java.lang.ClassNotFoundException - thrown when the class can't be found.java.io.InvalidClassException - thrown when deserialization is happening to a class that is not allowed by the filter.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 java.util.Enumeration<Field> getFields()
FList.public java.util.Enumeration<java.lang.Object> getValues()
FList.public java.util.Set<Field> getAllFields()
FList.public java.util.Collection<java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.util.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, java.math.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.util.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 java.math.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 java.lang.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, java.lang.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(java.io.InputStream is) throws EBufException
is - The input stream containing an XML representation of an FListEBufExceptionpublic static FList createFromXML(java.io.Reader reader) throws EBufException
reader - - The Reader object containing the XML representation of an FListEBufExceptionpublic java.lang.String toXMLString()
throws EBufException
EBufExceptionpublic java.lang.String toXMLString(java.util.Map<java.lang.String,java.lang.String> fieldMap)
throws EBufException
fieldMap - A mapping between PIN_FLD names and custom names. To be used
during XML transformation.EBufExceptionpublic java.lang.String toXMLString(int xmlType,
boolean newStyle)
throws EBufException
xmlType - The possible values are PIN_XML_TYPE, PIN_XML_BY_SHORT_NAME and PIN_XML_NOTIFICATION.newStyle - If yes,
the fields are represented in Hungarian/Cammel Case notation. i.e BillInfo
else
the fields are represented as BILL_INFOEBufException - of different types.public java.lang.String toXMLString(int xmlType,
boolean newStyle,
java.util.Map<java.lang.String,java.lang.String> fieldMap)
throws EBufException
xmlType - The possible values are PIN_XML_TYPE, PIN_XML_BY_SHORT_NAME and PIN_XML_NOTIFICATION.newStyle - If yes,
the fields are represented in Hungarian/Cammel Case notation. i.e BillInfo
else
the fields are represented as BILL_INFOfieldMap - A mapping between PIN_FLD names and custom names. To be used
during XML transformation.EBufException - of different types.public org.w3c.dom.Document toXMLDocument()
throws EBufException
EBufExceptionpublic org.w3c.dom.Document toXMLDocument(java.util.Map<java.lang.String,java.lang.String> fieldMap)
throws EBufException
fieldMap - A mapping between PIN_FLD names and custom names. To be used
during XML transformation.EBufExceptionpublic org.w3c.dom.Document toXMLDocument(int xmlType,
boolean newStyle)
throws EBufException
xmlType - The possible values are PIN_XML_TYPE, PIN_XML_BY_SHORT_NAME and PIN_XML_NOTIFICATION.newStyle - If yes,
the fields are represented in Hungarian/Cammel Case notation. i.e BillInfo
else
the fields are represented as BILL_INFOEBufException - of different types.public org.w3c.dom.Document toXMLDocument(int xmlType,
boolean newStyle,
java.util.Map<java.lang.String,java.lang.String> fieldMap)
throws EBufException
xmlType - The possible values are PIN_XML_TYPE, PIN_XML_BY_SHORT_NAME and PIN_XML_NOTIFICATION.newStyle - If yes,
the fields are represented in Hungarian/Cammel Case notation. i.e BillInfo
else
the fields are represented as BILL_INFOfieldMap - A mapping between PIN_FLD names and custom names. To be used
during XML transformation.EBufException - of different types.public FList createFromJsonString(java.lang.String jsonString) throws EBufException
jsonString - Input json string.EBufExceptionpublic FList createFromJsonObject(JsonNode jsonNode) throws EBufException
jsonNode - Input JsonNode object representing flist.EBufExceptionpublic java.lang.String toJsonString()
throws EBufException
EBufExceptionpublic java.lang.String toJsonString(java.util.Map<java.lang.String,java.lang.String> fieldMap)
throws EBufException
fieldMap - A mapping between PIN_FLD names and custom names. To be used
during XML transformation.EBufExceptionpublic java.lang.String toJsonStringCompact()
throws EBufException
EBufExceptionpublic java.lang.String toJsonStringCompact(java.util.Map<java.lang.String,java.lang.String> fieldMap)
throws EBufException
fieldMap - A mapping between PIN_FLD names and custom names. To be used
during XML transformation.EBufExceptionpublic JsonNode toJsonObject()
throws EBufException
EBufExceptionpublic JsonNode toJsonObject(java.util.Map<java.lang.String,java.lang.String> fieldMap)
throws EBufException
fieldMap - A mapping between PIN_FLD names and custom names. To be used
during XML transformation.EBufExceptionpublic java.lang.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 filetoString in class java.util.HashtableFList.public java.lang.String asString()
FList.
This is un-restricted in the way if called it will return String conversion of FList.FList.public static FList createFromString(java.lang.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(java.lang.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.