public class AttributeValueTable extends Object
Constructor and Description |
---|
AttributeValueTable()
Constructs an empty AttributeValueTable.
|
AttributeValueTable(AttributeValue[] values)
Constructs an AttributeValueTable from an array of AttributeValues.
|
AttributeValueTable(AttributeValueTable avt)
Constructs an AttributeValueTable from another AttributeValueTable.
|
AttributeValueTable(boolean caseSensitive)
Constructs an empty AttributeValueTable, with case sensitivity specified
|
AttributeValueTable(List list)
Constructs an AttributeValueTable from a list of AttributeValues.
|
AttributeValueTable(ParameterTable pt)
Constructs an AttributeValueTable from a ParameterTable.
|
AttributeValueTable(Property[] props)
Constructs an AttributeValueTable from an array of Property.
|
AttributeValueTable(PropertyBundle pb)
Constructs an AttributeValueTable from a PropertyBundle.
|
AttributeValueTable(SimpleProperty[] props)
Constructs an AttributeValueTable from a set of SimpleProperty.
|
Modifier and Type | Method and Description |
---|---|
void |
captureSession(LibrarySessionInterface session)
Use the specified session as this object's session context.
|
SimpleProperty[] |
createSimpleProperties(LibraryObject refObj)
Creates SimpleProperty objects
|
AttributeValue |
get(String key)
Gets a value matching the specified key.
|
AttributeValue |
get(String[] keys)
Gets a value matching one of the specified keys.
|
AttributeValue |
getAttributeValue()
Gets the representative value contained by this table.
|
AttributeValueGetter |
getAttributeValueGetter()
Gets the AttributeValueGetter, if any.
|
Boolean |
getBoolean(String key)
Gets a Boolean value matching the specified key.
|
boolean |
getBoolean(String key,
boolean defValue)
Gets an boolean value matching the specified key
Returns null if no value exists for the specified key, or if the value
stored represents a null Boolean value.
|
Boolean[] |
getBooleanArray(String key)
Gets an Boolean array value matching the specified key.
|
AttributeValue |
getBooleanValue(String key)
Gets an AttributeValue representing the Boolean value
matching the specified key.
|
Date |
getDate(String key)
Gets an Date value matching the specified key.
|
Date[] |
getDateArray(String key)
Gets a Date array value matching the specified key.
|
AttributeValue |
getDateValue(String key)
Gets an AttributeValue representing the Date value
matching the specified key.
|
DirectoryObject |
getDirectoryObject(String key,
LibrarySession session)
Gets a DirectoryObject value matching the specified key.
|
Double |
getDouble(String key)
Gets an Double value matching the specified key.
|
double |
getDouble(String key,
double defValue)
Gets an double value matching the specified key
Returns null if no value exists for the specified key, or if the value
stored represents a null Double value.
|
Double[] |
getDoubleArray(String key)
Gets an Double array value matching the specified key.
|
AttributeValue |
getDoubleValue(String key)
Gets an AttributeValue representing the Double value
matching the specified key.
|
AttributeValue |
getFixedAttributeValue()
Gets the "fixed value" for this table, if one was set.
|
List<AttributeValueTable> |
getFixedTableList()
Gets the "fixed list of AttributeValueTables" for this table, if one was set.
|
Integer |
getInteger(String key)
Gets an Integer value matching the specified key.
|
int |
getInteger(String key,
int defValue)
Gets an int value matching the specified key
Returns null if no value exists for the specified key, or if the value
stored represents a null Integer value.
|
Integer[] |
getIntegerArray(String key)
Gets an Integer array value matching the specified key.
|
AttributeValue |
getIntegerValue(String key)
Gets an AttributeValue representing the Integer value
matching the specified key.
|
String[] |
getKeys()
Gets all value keys in the table.
|
Long |
getLong(String key)
Gets an Long value matching the specified key.
|
long |
getLong(String key,
long defValue)
Gets an long value matching the specified key
Returns null if no value exists for the specified key, or if the value
stored represents a null Long value.
|
Long[] |
getLongArray(String key)
Gets an Long array value matching the specified key.
|
AttributeValue |
getLongValue(String key)
Gets an AttributeValue representing the Long value
matching the specified key.
|
PropertyBundleDefinition |
getPropertyBundleDefinition(LibrarySession session)
Gets all values in the table, represented as a PropertyBundleDefinition.
|
PropertyDefinition[] |
getPropertyDefinitions(LibrarySession session)
Gets all values in the table, represented as an
array of PropertyDefinitions.
|
PublicObject |
getPublicObject(String key,
LibrarySession session)
Gets a PublicObject value matching the specified key.
|
SchemaObject |
getSchemaObject(String key,
LibrarySession session)
Gets a SchemaObject value matching the specified key.
|
LibrarySessionInterface |
getSession()
Gets the session context for this table, if any.
|
SimpleObject |
getSimpleObject(String key,
LibrarySession session)
Gets a SimpleObject value matching the specified key.
|
String |
getString(String key)
Gets a String value matching the specified key.
|
String |
getString(String[] keys)
Gets a String value matching one of the specified keys.
|
String |
getString(String[] keys,
String defValue)
Gets a String value matching one of the specified keys, or return the
specified default value if none of the keys match a stored value
or if the value stored is a null String.
|
String |
getString(String key,
String defValue)
Gets a String value matching the specified key, or return the
specified default value if the key does not match a stored value
or if the value stored is a null String.
|
String[] |
getStringArray(String key)
Gets an String array value matching the specified key.
|
AttributeValue |
getStringArrayValue(String key)
Gets an AttributeValue representing the StringArray value
matching the specified key.
|
AttributeValue |
getStringValue(String key)
Gets an AttributeValue representing the String value
matching the specified key.
|
AttributeValue |
getStringValue(String[] keys)
Gets an AttributeValue representing the String value
matching one of the specified keys.
|
SystemObject |
getSystemObject(String key,
LibrarySession session)
Gets a SystemObject value matching the specified key.
|
AttributeValueTable |
getTable(String key)
Gets a table matching the specified key.
|
int |
getTableCount()
Gets the number of tables defined in the table.
|
String[] |
getTableKeys()
Gets all table keys in the table.
|
List<AttributeValueTable> |
getTableList(String key)
Gets a tablelist matching the specified key.
|
int |
getTableListCount()
Gets the number of tablelists defined in the table.
|
String[] |
getTableListKeys()
Gets all tablelist keys in the table.
|
List<AttributeValueTable>[] |
getTableLists()
Gets all tablelists (each represented by a List
|
AttributeValueTable[] |
getTables()
Gets all tables (each represented by a AttributeValueTable)
in the table map.
|
int |
getValueCount()
Gets the number of values defined in the table.
|
AttributeValue[] |
getValues()
Gets all values in the table.
|
boolean |
isFixedAttributeValue()
Checks if a "fixed value" has been set for this table.
|
boolean |
isFixedTableList()
Checks if a "fixed list of AttributeValueTables" has been set for this table.
|
void |
put(AttributeValue av)
Stores a new value, using an implicit key of the value's name.
|
void |
put(AttributeValue[] values)
Applies values from the specified array of AttributeValues.
|
void |
put(AttributeValueTable avt)
Applies the values from the specified table to the target one, overriding
values previously in the target table with ones in the specified table.
|
void |
put(List list)
Applies values from the specified list of AttributeValues.
|
void |
put(ParameterTable pt)
Applies values from the specified ParameterTable.
|
void |
put(Property[] props)
Applies values from the specified array of Property objects.
|
void |
put(PropertyBundle pb)
Applies values from the specified PropertyBundle.
|
void |
put(SimpleProperty[] props)
Applies values from the specified array of SimpleProperty objects.
|
void |
put(String key,
AttributeValue av)
Stores a new value, using an explicit key.
|
void |
put(String key,
boolean value)
Stores a new boolean value, using an explicit key.
|
void |
put(String key,
double value)
Stores a new double value, using an explicit key.
|
void |
put(String key,
int value)
Stores a new integer value, using an explicit key.
|
void |
put(String key,
long value)
Stores a new long value, using an explicit key.
|
void |
put(String key,
String value)
Stores a new String value, using an explicit key.
|
void |
put(String key,
String[] value)
Stores a new String array value, using an explicit key.
|
void |
putTable(String key,
AttributeValueTable avt)
Stores a new table, using an explicit key.
|
void |
putTableList(String key,
AttributeValueTable table)
Stores a new tablelist from the specified table, using an explicit key.
|
void |
putTableList(String key,
List<AttributeValueTable> list)
Stores a new tablelist, using an explicit key.
|
AttributeValue |
remove(String key)
Removes a value from the target table.
|
AttributeValueTable |
removeTable(String key)
Removes a table from the target table.
|
List<AttributeValueTable> |
removeTableList(String key)
Removes a tablelist from the target table.
|
void |
setAttributeValueGetter(AttributeValueGetter avGetter)
Sets the AttributeValueGetter for this table.
|
void |
setFixedAttributeValue(AttributeValue val)
Sets a "fixed value" for this table.
|
void |
setFixedTableList(List<AttributeValueTable> val)
Sets a "fixed list of AttributeValueTables" for this table.
|
void |
setSession(LibrarySessionInterface session)
Sets the session context for this table.
|
String |
toDisplayString(AttributeValue av,
LibrarySessionInterface session)
Provide String representation of the specified AttributeValue.
|
Map<Long,Long> |
toLongLongMap()
Generate a map, using the keys as Longs and the values as Longs.
|
Map<Long,Long> |
toLongLongMap(LibrarySession session)
Generate a map, using the keys as Longs and the values as Longs.
|
Map<Long,String> |
toLongStringMap()
Generate a map, using the keys as Longs and the values as Strings.
|
Map<Long,String> |
toLongStringMap(LibrarySession session)
Generate a map, using the keys as Longs and the values as Strings.
|
String |
toString()
Provide String representation of this object.
|
String |
toString(LibrarySessionInterface session,
String indent)
Provide String representation of this object, using session context and
indentation.
|
Map<String,Double> |
toStringDoubleMap()
Generate a map, using the values as Doubles.
|
Map<String,Double> |
toStringDoubleMap(LibrarySession session)
Generate a map, using the values as Doubles.
|
Map<String,Long> |
toStringLongMap()
Generate a map, using the values as Longs.
|
Map<String,Long> |
toStringLongMap(LibrarySession session)
Generate a map, using the values as Longs.
|
Map<String,String> |
toStringStringMap()
Generate a map, using the values as Strings.
|
Map<String,String> |
toStringStringMap(LibrarySession session)
Generate a map, using the values as Strings.
|
public AttributeValueTable()
public AttributeValueTable(boolean caseSensitive)
caseSensitive
- true if the keys are intended to be case sensitive;
false for case insensitive (the default)public AttributeValueTable(SimpleProperty[] props) throws IfsException
props
- the source SimpleProperty objectsIfsException
- if the operation failspublic AttributeValueTable(PropertyBundle pb) throws IfsException
pb
- the source PropertyBundleIfsException
- if the operation failspublic AttributeValueTable(Property[] props) throws IfsException
props
- the source Property objectsIfsException
- if the operation failspublic AttributeValueTable(List list) throws IfsException
list
- the List of AttributeValuesIfsException
- if the operation failspublic AttributeValueTable(AttributeValue[] values) throws IfsException
values
- the array of AttributeValuesIfsException
- if the operation failspublic AttributeValueTable(AttributeValueTable avt) throws IfsException
avt
- the source AttributeValueTableIfsException
- if the operation failspublic AttributeValueTable(ParameterTable pt) throws IfsException
pt
- the source ParameterTableIfsException
- if the operation failspublic LibrarySessionInterface getSession()
The session context is used for certain data type conversions, such as from String to Date, where the session's Localizer is used in the conversion.
public void setSession(LibrarySessionInterface session)
session
- the session contextpublic void captureSession(LibrarySessionInterface session)
session
- the session contextpublic AttributeValueGetter getAttributeValueGetter()
public void setAttributeValueGetter(AttributeValueGetter avGetter)
avGetter
- the AttributeValueGetterpublic void setFixedAttributeValue(AttributeValue val)
val
- the fixed valuepublic boolean isFixedAttributeValue()
public AttributeValue getFixedAttributeValue()
public void setFixedTableList(List<AttributeValueTable> val)
val
- the fixed list of AttributeValueTablepublic boolean isFixedTableList()
public List<AttributeValueTable> getFixedTableList()
public AttributeValue getAttributeValue() throws IfsException
This typically delegates to the AttributeValueGetter defined. If no AttributeValueGetter is defined, return the value for the "VALUE" key.
IfsException
- if the operation failspublic AttributeValue get(String key) throws IfsException
Returns null if no value exists for the specified key.
key
- the keyIfsException
- if the operation failspublic AttributeValue get(String[] keys) throws IfsException
Returns null if no value exists for any of the specified keys.
keys
- the keysIfsException
- if the operation failspublic String getString(String key) throws IfsException
Returns null if no value exists for the specified key, or if the value stored represents a null String value.
key
- the keyIfsException
- if the operation failspublic String getString(String[] keys) throws IfsException
Returns null if no value exists for any of the specified keys, or if the value stored represents a null String value.
keys
- the keysIfsException
- if the operation failspublic AttributeValue getStringValue(String key) throws IfsException
Returns null if no value exists for the specified key.
key
- the keyIfsException
- if the operation failspublic AttributeValue getStringValue(String[] keys) throws IfsException
Returns null if no value exists for any of the specified keys, or if the value stored represents a null String value.
keys
- the keysIfsException
- if the operation failspublic String getString(String key, String defValue) throws IfsException
Returns the specified default value if no value exists for the specified key or if the value is null.
key
- the keydefValue
- the default value to return if the key does not match
a stored value or if the stored value is nullIfsException
- if the operation failspublic String getString(String[] keys, String defValue) throws IfsException
Returns the specified default value if no value exists for any of the specified keys, or if the value is null.
keys
- the keysdefValue
- the default value to return if the keys do not match
a stored value or if the stored value is nullIfsException
- if the operation failspublic Integer getInteger(String key) throws IfsException
Returns null if no value exists for the specified key, or if the value stored represents a null Integer value.
key
- the keyIfsException
- if the operation failspublic AttributeValue getIntegerValue(String key) throws IfsException
Returns null if no value exists for the specified key.
key
- the keyIfsException
- if the operation failspublic int getInteger(String key, int defValue) throws IfsException
Returns null if no value exists for the specified key, or if the value stored represents a null Integer value.
key
- the keydefValue
- the default value to return if the key
does not match a stored valueIfsException
- if the operation failspublic Long getLong(String key) throws IfsException
Returns null if no value exists for the specified key, or if the value stored represents a null Long value.
key
- the keyIfsException
- if the operation failspublic AttributeValue getLongValue(String key) throws IfsException
Returns null if no value exists for the specified key.
key
- the keyIfsException
- if the operation failspublic long getLong(String key, long defValue) throws IfsException
Returns null if no value exists for the specified key, or if the value stored represents a null Long value.
key
- the keydefValue
- the default value to return if the key
does not match a stored valueIfsException
- if the operation failspublic Double getDouble(String key) throws IfsException
Returns null if no value exists for the specified key, or if the value stored represents a null Double value.
key
- the keyIfsException
- if the operation failspublic AttributeValue getDoubleValue(String key) throws IfsException
Returns null if no value exists for the specified key.
key
- the keyIfsException
- if the operation failspublic double getDouble(String key, double defValue) throws IfsException
Returns null if no value exists for the specified key, or if the value stored represents a null Double value.
key
- the keydefValue
- the default value to return if the key
does not match a stored valueIfsException
- if the operation failspublic Boolean getBoolean(String key) throws IfsException
Returns null if no value exists for the specified key, or if the value stored represents a null Boolean value.
key
- the keyIfsException
- if the operation failspublic AttributeValue getBooleanValue(String key) throws IfsException
Returns null if no value exists for the specified key.
key
- the keyIfsException
- if the operation failspublic boolean getBoolean(String key, boolean defValue) throws IfsException
Returns null if no value exists for the specified key, or if the value stored represents a null Boolean value.
key
- the keydefValue
- the default value to return if the key
does not match a stored valueIfsException
- if the operation failspublic Date getDate(String key) throws IfsException
Returns null if no value exists for the specified key, or if the value stored represents a null Date value.
key
- the keyIfsException
- if the operation failspublic AttributeValue getDateValue(String key) throws IfsException
Returns null if no value exists for the specified key.
key
- the keyIfsException
- if the operation failspublic String[] getStringArray(String key) throws IfsException
Returns null if no value exists for the specified key. Returns an empty array if the value stored represents a null String array value.
key
- the keyIfsException
- if the operation failspublic Long[] getLongArray(String key) throws IfsException
Returns null if no value exists for the specified key. Returns an empty array if the value stored represents a null Long array value.
key
- the keyIfsException
- if the operation failspublic Integer[] getIntegerArray(String key) throws IfsException
Returns null if no value exists for the specified key. Returns an empty array if the value stored represents a null Integer array value.
key
- the keyIfsException
- if the operation failspublic Double[] getDoubleArray(String key) throws IfsException
Returns null if no value exists for the specified key. Returns an empty array if the value stored represents a null Double array value.
key
- the keyIfsException
- if the operation failspublic Boolean[] getBooleanArray(String key) throws IfsException
Returns null if no value exists for the specified key. Returns an empty array if the value stored represents a null Boolean array value.
key
- the keyIfsException
- if the operation failspublic Date[] getDateArray(String key) throws IfsException
Returns null if no value exists for the specified key. Returns an empty array if the value stored represents a null Date array value.
key
- the keyIfsException
- if the operation failspublic AttributeValue getStringArrayValue(String key) throws IfsException
Returns null if no value exists for the specified key.
key
- the keyIfsException
- if the operation failspublic PublicObject getPublicObject(String key, LibrarySession session) throws IfsException
Returns null if no value exists for the specified key, or if the value represents a null PublicObject.
key
- the keysession
- the session contextIfsException
- if the operation failspublic DirectoryObject getDirectoryObject(String key, LibrarySession session) throws IfsException
Returns null if no value exists for the specified key, or if the value represents a null DirectoryObject.
key
- the keysession
- the session contextIfsException
- if the operation failspublic SystemObject getSystemObject(String key, LibrarySession session) throws IfsException
Returns null if no value exists for the specified key, or if the value represents a null SystemObject.
key
- the keysession
- the session contextIfsException
- if the operation failspublic SimpleObject getSimpleObject(String key, LibrarySession session) throws IfsException
Returns null if no value exists for the specified key, or if the value represents a null SimpleObject.
key
- the keysession
- the session contextIfsException
- if the operation failspublic SchemaObject getSchemaObject(String key, LibrarySession session) throws IfsException
Returns null if no value exists for the specified key, or if the value represents a null SchemaObject.
key
- the keysession
- the session contextIfsException
- if the operation failspublic AttributeValue[] getValues() throws IfsException
The returned array is sorted in the order the values were added.
IfsException
- if the operation failspublic PropertyBundleDefinition getPropertyBundleDefinition(LibrarySession session) throws IfsException
session
- session contextIfsException
- if the operation failspublic PropertyDefinition[] getPropertyDefinitions(LibrarySession session) throws IfsException
session
- session contextIfsException
- if the operation failspublic int getValueCount() throws IfsException
IfsException
- if the operation failspublic String[] getKeys() throws IfsException
The returned array is sorted in the order the values were added.
IfsException
- if the operation failspublic SimpleProperty[] createSimpleProperties(LibraryObject refObj) throws IfsException
refObj
- the referencing objectIfsException
- if the operation failspublic void put(String key, AttributeValue av) throws IfsException
The AttributeValue's name may not match the key specified. The value stored in the table will override the value's name if necesary.
key
- the keyav
- the valueIfsException
- if the operation failspublic void put(String key, String value) throws IfsException
key
- the keyvalue
- the valueIfsException
- if the operation failspublic void put(String key, int value) throws IfsException
key
- the keyvalue
- the valueIfsException
- if the operation failspublic void put(String key, boolean value) throws IfsException
key
- the keyvalue
- the valueIfsException
- if the operation failspublic void put(String key, long value) throws IfsException
key
- the keyvalue
- the valueIfsException
- if the operation failspublic void put(String key, double value) throws IfsException
key
- the keyvalue
- the valueIfsException
- if the operation failspublic void put(String key, String[] value) throws IfsException
key
- the keyvalue
- the valueIfsException
- if the operation failspublic void put(AttributeValue av) throws IfsException
av
- the value, with the key defined as the value's nameIfsException
- if the operation failspublic void put(PropertyBundle pb) throws IfsException
pb
- the source PropertyBundleIfsException
- if the operation failspublic void put(Property[] props) throws IfsException
props
- the source Property objectsIfsException
- if the operation failspublic void put(SimpleProperty[] props) throws IfsException
props
- the source SimpleProperty objectsIfsException
- if the operation failspublic void put(List list) throws IfsException
list
- the List of AttributeValuesIfsException
- if the operation failspublic void put(AttributeValue[] values) throws IfsException
values
- the array of AttributeValuesIfsException
- if the operation failspublic void put(ParameterTable pt) throws IfsException
pt
- the source ParameterTableIfsException
- if the operation failspublic void put(AttributeValueTable avt)
avt
- the source tablepublic AttributeValue remove(String key)
key
- the value keypublic void putTable(String key, AttributeValueTable avt) throws IfsException
key
- the keyavt
- the tableIfsException
- if the operation failspublic void putTableList(String key, List<AttributeValueTable> list) throws IfsException
key
- the keylist
- the tablelistIfsException
- if the operation failspublic void putTableList(String key, AttributeValueTable table) throws IfsException
key
- the keytable
- the table which will be the only entry in the listIfsException
- if the operation failspublic AttributeValueTable getTable(String key) throws IfsException
Returns null if no table exists for the specified key.
key
- the keyIfsException
- if the operation failspublic List<AttributeValueTable> getTableList(String key) throws IfsException
Returns null if no tablelist exists for the specified key.
key
- the keyIfsException
- if the operation failspublic int getTableCount() throws IfsException
IfsException
- if the operation failspublic int getTableListCount() throws IfsException
IfsException
- if the operation failspublic String[] getTableKeys() throws IfsException
The returned array is sorted in the order the tables were added.
IfsException
- if the operation failspublic String[] getTableListKeys() throws IfsException
The returned array is sorted in the order the tablelists were added.
IfsException
- if the operation failspublic AttributeValueTable[] getTables() throws IfsException
The returned array is sorted in the order the values were added.
IfsException
- if the operation failspublic List<AttributeValueTable>[] getTableLists() throws IfsException
The returned array is sorted in the order the values were added.
IfsException
- if the operation failspublic AttributeValueTable removeTable(String key)
key
- the table keypublic List<AttributeValueTable> removeTableList(String key)
key
- the tablelist keypublic Map<String,String> toStringStringMap() throws IfsException
IfsException
- if the operation failspublic Map<String,String> toStringStringMap(LibrarySession session) throws IfsException
session
- session contextIfsException
- if the operation failspublic Map<String,Long> toStringLongMap() throws IfsException
IfsException
- if the operation failspublic Map<String,Long> toStringLongMap(LibrarySession session) throws IfsException
session
- session contextIfsException
- if the operation failspublic Map<String,Double> toStringDoubleMap() throws IfsException
IfsException
- if the operation failspublic Map<String,Double> toStringDoubleMap(LibrarySession session) throws IfsException
session
- session contextIfsException
- if the operation failspublic Map<Long,String> toLongStringMap() throws IfsException
IfsException
- if the operation failspublic Map<Long,String> toLongStringMap(LibrarySession session) throws IfsException
session
- session contextIfsException
- if the operation failspublic Map<Long,Long> toLongLongMap() throws IfsException
IfsException
- if the operation failspublic Map<Long,Long> toLongLongMap(LibrarySession session) throws IfsException
session
- session contextIfsException
- if the operation failspublic String toString()
public String toString(LibrarySessionInterface session, String indent)
session
- session contextindent
- indentation to use at the start of each linepublic String toDisplayString(AttributeValue av, LibrarySessionInterface session)
session
- session contextCopyright © 2023. All rights reserved.