Package org.eclipse.persistence.queries
Class ReportQueryResult
- java.lang.Object
-
- org.eclipse.persistence.queries.ReportQueryResult
-
- All Implemented Interfaces:
java.io.Serializable,java.util.Map
public class ReportQueryResult extends java.lang.Object implements java.io.Serializable, java.util.MapPurpose: 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(java.util.List<java.lang.Object> results, java.lang.Object primaryKeyValues)INTERNAL: Used to create test resultsReportQueryResult(ReportQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord row, java.util.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(java.lang.Object value)PUBLIC: Check if the value is contained in the result.booleancontainsKey(java.lang.Object key)PUBLIC: Check if the key is contained in the result.booleancontainsValue(java.lang.Object value)PUBLIC: Check if the value is contained in the result.java.util.Enumerationelements()OBSOLETE: Return an enumeration of the result values.java.util.SetentrySet()PUBLIC: Returns a set of the keys.booleanequals(java.lang.Object anObject)PUBLIC: Compare if the two results are equal.booleanequals(ReportQueryResult result)INTERNAL: Used in testing to compare if results are correct.java.lang.Objectget(java.lang.Object name)PUBLIC: Return the value for given item name.java.lang.Objectget(java.lang.String name)PUBLIC: Return the value for given item name.java.lang.ObjectgetByIndex(int index)PUBLIC: Return the indexed value from result.java.lang.ObjectgetId()PUBLIC: Return the Id for the result or null if not requested.java.util.List<java.lang.String>getNames()PUBLIC: Return the names of report items, provided to ReportQuery.java.util.Vector<java.lang.Object>getPrimaryKeyValues()Deprecated.since 2.1, replaced by getId()java.lang.StringgetResultKey()INTERNAL: Return the unique key for this resultjava.util.List<java.lang.Object>getResults()PUBLIC: Return the results.booleanisEmpty()PUBLIC: Return if the result is empty.java.util.Enumerationkeys()OBSOLETE: Return an enumeration of the result names.java.util.SetkeySet()PUBLIC: Returns a set of the keys.java.lang.Objectput(java.lang.Object name, java.lang.Object value)ADVANCED: Set the value for given item name.voidputAll(java.util.Map map)PUBLIC: Add all of the elements.java.lang.ObjectreadObject(java.lang.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.java.lang.Objectremove(java.lang.Object name)INTERNAL: Remove the name key and value from the result.voidsetResults(java.util.List<java.lang.Object> results)INTERNAL: Set the results.intsize()PUBLIC: Return the number of name/value pairs in the result.java.lang.Object[]toArray()INTERNAL: Converts the ReportQueryResult to a simple array of values.java.util.ListtoList()INTERNAL: Converts the ReportQueryResult to a simple list of values.java.lang.StringtoString()java.util.Collectionvalues()PUBLIC: Returns an collection of the values.
-
-
-
Constructor Detail
-
ReportQueryResult
public ReportQueryResult(java.util.List<java.lang.Object> results, java.lang.Object primaryKeyValues)INTERNAL: Used to create test results
-
ReportQueryResult
public ReportQueryResult(ReportQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord row, java.util.Vector toManyResults)
-
-
Method Detail
-
clear
public void clear()
PUBLIC: Clear the contents of the result.- Specified by:
clearin interfacejava.util.Map
-
contains
public boolean contains(java.lang.Object value)
PUBLIC: Check if the value is contained in the result.
-
containsKey
public boolean containsKey(java.lang.Object key)
PUBLIC: Check if the key is contained in the result.- Specified by:
containsKeyin interfacejava.util.Map
-
containsValue
public boolean containsValue(java.lang.Object value)
PUBLIC: Check if the value is contained in the result.- Specified by:
containsValuein interfacejava.util.Map
-
elements
public java.util.Enumeration elements()
OBSOLETE: Return an enumeration of the result values.- See Also:
values()
-
entrySet
public java.util.Set entrySet()
PUBLIC: Returns a set of the keys.- Specified by:
entrySetin interfacejava.util.Map
-
equals
public boolean equals(java.lang.Object anObject)
PUBLIC: Compare if the two results are equal.- Specified by:
equalsin interfacejava.util.Map- Overrides:
equalsin classjava.lang.Object
-
equals
public boolean equals(ReportQueryResult result)
INTERNAL: Used in testing to compare if results are correct.
-
get
public java.lang.Object get(java.lang.Object name)
PUBLIC: Return the value for given item name.- Specified by:
getin interfacejava.util.Map
-
get
public java.lang.Object get(java.lang.String name)
PUBLIC: Return the value for given item name.
-
getByIndex
public java.lang.Object getByIndex(int index)
PUBLIC: Return the indexed value from result.
-
getResultKey
public java.lang.String getResultKey()
INTERNAL: Return the unique key for this result
-
getNames
public java.util.List<java.lang.String> getNames()
PUBLIC: Return the names of report items, provided to ReportQuery.
-
getId
public java.lang.Object getId()
PUBLIC: Return the Id for the result or null if not requested.
-
getPrimaryKeyValues
@Deprecated public java.util.Vector<java.lang.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()
-
getResults
public java.util.List<java.lang.Object> getResults()
PUBLIC: Return the results.
-
isEmpty
public boolean isEmpty()
PUBLIC: Return if the result is empty.- Specified by:
isEmptyin interfacejava.util.Map
-
keys
public java.util.Enumeration keys()
OBSOLETE: Return an enumeration of the result names.- See Also:
keySet()
-
keySet
public java.util.Set keySet()
PUBLIC: Returns a set of the keys.- Specified by:
keySetin interfacejava.util.Map
-
put
public java.lang.Object put(java.lang.Object name, java.lang.Object value)ADVANCED: Set the value for given item name.- Specified by:
putin interfacejava.util.Map
-
putAll
public void putAll(java.util.Map map)
PUBLIC: Add all of the elements.- Specified by:
putAllin interfacejava.util.Map
-
readObject
public java.lang.Object readObject(java.lang.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.
-
remove
public java.lang.Object remove(java.lang.Object name)
INTERNAL: Remove the name key and value from the result.- Specified by:
removein interfacejava.util.Map
-
setResults
public void setResults(java.util.List<java.lang.Object> results)
INTERNAL: Set the results.
-
size
public int size()
PUBLIC: Return the number of name/value pairs in the result.- Specified by:
sizein interfacejava.util.Map
-
toArray
public java.lang.Object[] toArray()
INTERNAL: Converts the ReportQueryResult to a simple array of values.
-
toList
public java.util.List toList()
INTERNAL: Converts the ReportQueryResult to a simple list of values.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
values
public java.util.Collection values()
PUBLIC: Returns an collection of the values.- Specified by:
valuesin interfacejava.util.Map
-
-