Top Description Inners Fields Constructors Methods
org.eclipse.persistence.queries

public Class ReportQueryResult

extends Object
implements Serializable, Map
Class Inheritance
All Implemented Interfaces
java.util.Map, java.io.Serializable
Imports
java.io.Serializable, java.lang.reflect.Constructor, java.security.AccessController, .PrivilegedActionException, java.util.AbstractSet, .ArrayList, .Collection, .Iterator, .List, .Map, .NoSuchElementException, .Set, .Vector, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.QueryException, org.eclipse.persistence.expressions.ExpressionOperator, org.eclipse.persistence.internal.expressions.FunctionExpression, .MapEntryExpression, org.eclipse.persistence.internal.helper.ConversionManager, .DatabaseField, .NonSynchronizedSubVector, org.eclipse.persistence.internal.queries.JoinedAttributeManager, .ReportItem, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedInvokeConstructor, org.eclipse.persistence.internal.sessions.AbstractRecord, org.eclipse.persistence.mappings.AggregateObjectMapping, .Association, .DatabaseMapping, .DirectCollectionMapping, org.eclipse.persistence.mappings.foundation.AbstractColumnMapping, org.eclipse.persistence.sessions.DatabaseRecord, .Session

Purpose: A single row (type) result for a ReportQuery

Description: Represents a single row of attribute values (converted using mapping) for a ReportQuery. The attributes can be from various objects. Responsibilities:

Author
Doug Clarke
Since
TOPLink/Java 2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
ReportQueryResult.EntryIterator

Defines the virtual entrySet iterator.

protected class
ReportQueryResult.EntrySet

Defines the virtual entrySet.

protected class
ReportQueryResult.KeyIterator

Defines the virtual keySet iterator.

protected class
ReportQueryResult.KeySet

Defines the virtual keySet.

protected static class
ReportQueryResult.RecordEntry

Entry class for implementing Map interface.

Field Summary

Modifier and TypeField and Description
protected StringBuffer
key

If an objectLevel distinct is used then generate unique key for this result

protected List<String>
names

Item names to lookup result values

protected Object
primaryKey

Id value if the retrievPKs flag was set on the ReportQuery.

protected List<Object>
results

Actual converted attribute values

Constructor Summary

AccessConstructor and Description
public
ReportQueryResult(List<Object> results, Object primaryKeyValues)

INTERNAL: Used to create test results

public
ReportQueryResult(ReportQuery query, AbstractRecord row, Vector<E> toManyResults)

Method Summary

Modifier and TypeMethod and Description
protected void
buildResult(ReportQuery query, AbstractRecord row, Vector<E> toManyData)

INTERNAL: Create an array of attribute values (converted from raw field values using the mapping).

public void
clear()

Implements java.util.Map.clear.

PUBLIC: Clear the contents of the result.
public boolean
contains(Object value)

PUBLIC: Check if the value is contained in the result.

public boolean
containsKey(Object
key whose presence in this map is to be tested
key
)

Implements java.util.Map.containsKey.

PUBLIC: Check if the key is contained in the result.
public boolean
containsValue(Object
value whose presence in this map is to be tested
value
)

Implements java.util.Map.containsValue.

PUBLIC: Check if the value is contained in the result.
public Set<E>
entrySet()

Implements java.util.Map.entrySet.

PUBLIC: Returns a set of the keys.
public boolean
equals(Object
object to be compared for equality with this map
anObject
)

Overrides java.lang.Object.equals.

Implements java.util.Map.equals.

PUBLIC: Compare if the two results are equal.
public boolean
equals(ReportQueryResult result)

INTERNAL: Used in testing to compare if results are correct.

public Object
get(Object
the key whose associated value is to be returned
name
)

Implements java.util.Map.get.

PUBLIC: Return the value for given item name.
public Object
get(String name)

PUBLIC: Return the value for given item name.

public Object
getByIndex(int index)

PUBLIC: Return the indexed value from result.

public Object
getId()

PUBLIC: Return the Id for the result or null if not requested.

public List<String>
getNames()

PUBLIC: Return the names of report items, provided to ReportQuery.

public String
getResultKey()

INTERNAL: Return the unique key for this result

public List<Object>
getResults()

PUBLIC: Return the results.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements java.util.Map.hashCode.

Returns the hash code value for this map.
public boolean
isEmpty()

Implements java.util.Map.isEmpty.

PUBLIC: Return if the result is empty.
public Set<E>
keySet()

Implements java.util.Map.keySet.

PUBLIC: Returns a set of the keys.
private Object
protected Object
processItem(ReportQuery query, AbstractRecord row, Vector<E> toManyData, ReportItem item)

INTERNAL: Return a value from an item and database row (converted from raw field values using the mapping).

private Object
public Object
put(Object
key with which the specified value is to be associated
name
,
Object
value to be associated with the specified key
value
)

Implements java.util.Map.put.

ADVANCED: Set the value for given item name.
public void
putAll(Map<K, V>
mappings to be stored in this map
map
)

Implements java.util.Map.putAll.

PUBLIC: Add all of the elements.
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.

public Object
remove(Object
key whose mapping is to be removed from the map
name
)

Implements java.util.Map.remove.

INTERNAL: Remove the name key and value from the result.
protected void
setId(Object primaryKey)

INTERNAL: Set the Id for the result row's object.

protected void
public void
setResults(List<Object> results)

INTERNAL: Set the results.

public int
size()

Implements java.util.Map.size.

PUBLIC: Return the number of name/value pairs in the result.
public Object[]
toArray()

INTERNAL: Converts the ReportQueryResult to a simple array of values.

public List<E>
toList()

INTERNAL: Converts the ReportQueryResult to a simple list of values.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public Collection<E>
values()

Implements java.util.Map.values.

PUBLIC: Returns an collection of the values.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait