public class ReportQueryResult extends Object implements Serializable, Map
Description: Represents a single row of attribute values (converted using mapping) for a ReportQuery. The attributes can be from various objects. Responsibilities:
Modifier and Type | Field and Description |
---|---|
protected StringBuffer |
key
If an objectLevel distinct is used then generate unique key for this result
|
protected Vector |
names
Item names to lookup result values
|
protected Vector |
primaryKeyValues
PK values if the retrievPKs flag was set on the ReportQuery.
|
protected Vector |
results
Actual converted attribute values
|
Constructor and Description |
---|
ReportQueryResult(ReportQuery query,
AbstractRecord row,
Vector toManyResults) |
ReportQueryResult(Vector results,
Vector primaryKeyValues)
INTERNAL:
Used to create test results
|
Modifier and Type | Method and Description |
---|---|
protected void |
buildResult(ReportQuery query,
AbstractRecord row,
Vector toManyData)
INTERNAL:
Create an array of attribute values (converted from raw field values using the mapping).
|
void |
clear()
PUBLIC:
Clear the contents of the result.
|
boolean |
contains(Object value)
PUBLIC:
Check if the value is contained in the result.
|
boolean |
containsKey(Object key)
PUBLIC:
Check if the key is contained in the result.
|
boolean |
containsValue(Object value)
PUBLIC:
Check if the value is contained in the result.
|
Enumeration |
elements()
PUBLIC:
Return an enumeration of the result values.
|
Set |
entrySet()
PUBLIC:
Returns a set of the keys.
|
boolean |
equals(Object anObject)
PUBLIC:
Compare if the two results are equal.
|
boolean |
equals(ReportQueryResult result)
INTERNAL:
Used in testing to compare if results are correct.
|
Object |
get(Object name)
PUBLIC:
Return the value for given item name.
|
Object |
get(String name)
PUBLIC:
Return the value for given item name.
|
Object |
getByIndex(int index)
PUBLIC:
Return the indexed value from result.
|
Vector |
getNames()
PUBLIC:
Return the names of report items, provided to ReportQuery.
|
Vector |
getPrimaryKeyValues()
PUBLIC:
Return the PKs for the corresponding object or null if not requested.
|
String |
getResultKey()
INTERNAL:
Return the unique key for this result
|
Vector |
getResults()
PUBLIC:
Return the results.
|
boolean |
isEmpty()
PUBLIC:
Return if the result is empty.
|
Enumeration |
keys()
PUBLIC:
Return an enumeration of the result names.
|
Set |
keySet()
PUBLIC:
Returns a set of the keys.
|
protected Object |
processItem(ReportQuery query,
AbstractRecord row,
Vector toManyData,
ReportItem item)
INTERNAL:
Return a value from an item and database row (converted from raw field values using the mapping).
|
Object |
put(Object name,
Object value)
ADVANCED:
Set the value for given item name.
|
void |
putAll(Map map)
PUBLIC:
Add all of the elements.
|
Object |
readObject(Class javaClass,
Session session)
PUBLIC:
If the PKs were retrieved with the attributes then this method can be used to read the real object from the database.
|
Object |
remove(Object name)
INTERNAL:
Remove the name key and value from the result.
|
protected void |
setNames(Vector names) |
protected void |
setPrimaryKeyValues(Vector primaryKeyValues)
INTERNAL:
Set the PK values for the result row's object.
|
void |
setResults(Vector results)
INTERNAL:
Set the results.
|
int |
size()
PUBLIC:
Return the number of name/value pairs in the result.
|
Object[] |
toArray()
INTERNAL:
Converts the ReportQueryResult to a simple array of values.
|
List |
toList()
INTERNAL:
Converts the ReportQueryResult to a simple list of values.
|
String |
toString() |
Collection |
values()
PUBLIC:
Returns an collection of the values.
|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
protected Vector names
protected Vector results
protected Vector primaryKeyValues
protected StringBuffer key
public ReportQueryResult(Vector results, Vector primaryKeyValues)
public ReportQueryResult(ReportQuery query, AbstractRecord row, Vector toManyResults)
protected void buildResult(ReportQuery query, AbstractRecord row, Vector toManyData)
protected Object processItem(ReportQuery query, AbstractRecord row, Vector toManyData, ReportItem item)
public void clear()
public boolean contains(Object value)
public boolean containsKey(Object key)
containsKey
in interface Map
public boolean containsValue(Object value)
containsValue
in interface Map
public Enumeration elements()
public Set entrySet()
public boolean equals(Object anObject)
public boolean equals(ReportQueryResult result)
public Object getByIndex(int index)
public String getResultKey()
public Vector getNames()
public Vector getPrimaryKeyValues()
public Vector getResults()
public boolean isEmpty()
public Enumeration keys()
public void putAll(Map map)
public Object readObject(Class javaClass, Session session)
protected void setNames(Vector names)
protected void setPrimaryKeyValues(Vector primaryKeyValues)
public void setResults(Vector results)
public int size()
public Object[] toArray()
public List toList()
public Collection values()
Copyright © 2023. All rights reserved.