Package org.eclipse.persistence.queries
Class ReportQueryResult
- java.lang.Object
-
- org.eclipse.persistence.queries.ReportQueryResult
-
- All Implemented Interfaces:
Serializable,Map
public class ReportQueryResult extends Object implements Serializable, Map
Purpose: A single row (type) result for a ReportQueryDescription: Represents a single row of attribute values (converted using mapping) for a ReportQuery. The attributes can be from various objects. Responsibilities:
- Converted field values into object attribute values.
- Provide access to values by index or item name
- Since:
- TOPLink/Java 2.0
- Author:
- Doug Clarke
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReportQueryResult(List<Object> results, Object primaryKeyValues)INTERNAL: Used to create test resultsReportQueryResult(ReportQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord row, Vector toManyResults)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclear()PUBLIC: Clear the contents of the result.booleancontains(Object value)PUBLIC: Check if the value is contained in the result.booleancontainsKey(Object key)PUBLIC: Check if the key is contained in the result.booleancontainsValue(Object value)PUBLIC: Check if the value is contained in the result.Enumerationelements()OBSOLETE: Return an enumeration of the result values.SetentrySet()PUBLIC: Returns a set of the keys.booleanequals(Object anObject)PUBLIC: Compare if the two results are equal.booleanequals(ReportQueryResult result)INTERNAL: Used in testing to compare if results are correct.Objectget(Object name)PUBLIC: Return the value for given item name.Objectget(String name)PUBLIC: Return the value for given item name.ObjectgetByIndex(int index)PUBLIC: Return the indexed value from result.ObjectgetId()PUBLIC: Return the Id for the result or null if not requested.List<String>getNames()PUBLIC: Return the names of report items, provided to ReportQuery.Vector<Object>getPrimaryKeyValues()Deprecated.since 2.1, replaced by getId()StringgetResultKey()INTERNAL: Return the unique key for this resultList<Object>getResults()PUBLIC: Return the results.booleanisEmpty()PUBLIC: Return if the result is empty.Enumerationkeys()OBSOLETE: Return an enumeration of the result names.SetkeySet()PUBLIC: Returns a set of the keys.Objectput(Object name, Object value)ADVANCED: Set the value for given item name.voidputAll(Map map)PUBLIC: Add all of the elements.ObjectreadObject(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.Objectremove(Object name)INTERNAL: Remove the name key and value from the result.voidsetResults(List<Object> results)INTERNAL: Set the results.intsize()PUBLIC: Return the number of name/value pairs in the result.Object[]toArray()INTERNAL: Converts the ReportQueryResult to a simple array of values.ListtoList()INTERNAL: Converts the ReportQueryResult to a simple list of values.StringtoString()Collectionvalues()PUBLIC: Returns an collection of the values.-
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
ReportQueryResult
public ReportQueryResult(List<Object> results, Object primaryKeyValues)
INTERNAL: Used to create test results
-
ReportQueryResult
public ReportQueryResult(ReportQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord row, Vector toManyResults)
-
-
Method Detail
-
clear
public void clear()
PUBLIC: Clear the contents of the result.
-
contains
public boolean contains(Object value)
PUBLIC: Check if the value is contained in the result.
-
containsKey
public boolean containsKey(Object key)
PUBLIC: Check if the key is contained in the result.- Specified by:
containsKeyin interfaceMap
-
containsValue
public boolean containsValue(Object value)
PUBLIC: Check if the value is contained in the result.- Specified by:
containsValuein interfaceMap
-
elements
public Enumeration elements()
OBSOLETE: Return an enumeration of the result values.- See Also:
values()
-
entrySet
public Set entrySet()
PUBLIC: Returns a set of the keys.
-
equals
public boolean equals(Object anObject)
PUBLIC: Compare if the two results are equal.
-
equals
public boolean equals(ReportQueryResult result)
INTERNAL: Used in testing to compare if results are correct.
-
getByIndex
public Object getByIndex(int index)
PUBLIC: Return the indexed value from result.
-
getResultKey
public String getResultKey()
INTERNAL: Return the unique key for this result
-
getNames
public List<String> getNames()
PUBLIC: Return the names of report items, provided to ReportQuery.
-
getId
public Object getId()
PUBLIC: Return the Id for the result or null if not requested.
-
getPrimaryKeyValues
@Deprecated public Vector<Object> getPrimaryKeyValues()
Deprecated.since 2.1, replaced by getId()PUBLIC: Return the PKs for the corresponding object or null if not requested.- See Also:
getId()
-
isEmpty
public boolean isEmpty()
PUBLIC: Return if the result is empty.
-
keys
public Enumeration keys()
OBSOLETE: Return an enumeration of the result names.- See Also:
keySet()
-
putAll
public void putAll(Map map)
PUBLIC: Add all of the elements.
-
readObject
public 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.
-
size
public int size()
PUBLIC: Return the number of name/value pairs in the result.
-
toArray
public Object[] toArray()
INTERNAL: Converts the ReportQueryResult to a simple array of values.
-
toList
public List toList()
INTERNAL: Converts the ReportQueryResult to a simple list of values.
-
values
public Collection values()
PUBLIC: Returns an collection of the values.
-
-