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

public Class ReportItem

extends Object
implements Cloneable, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, java.lang.Cloneable
Known Direct Subclasses
org.eclipse.persistence.queries.ConstructorReportItem
Imports
org.eclipse.persistence.exceptions.*, org.eclipse.persistence.expressions.*, org.eclipse.persistence.mappings.*, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.queries.*, org.eclipse.persistence.internal.expressions.FunctionExpression, .QueryKeyExpression

Purpose: represents an item requested (i.e. field for SELECT)
Author
Doug Clarke
Since
2.0

Field Summary

Modifier and TypeField and Description
protected Expression
attributeExpression

Expression (partial) describing the attribute wanted

protected ClassDescriptor
descriptor

Descriptor for object result that is not based on an expression

protected JoinedAttributeManager
joinedAttributeManager

Stores the Join information for this item

protected DatabaseMapping
mapping

Mapping which relates field to attribute, used to convert value and determine reference descriptor

protected String
name

Name given for item, can be used to retrieve value from result.

protected int
resultIndex

Stores the row index for this item, given multiple results and joins

protected Class<?>
resultType

Result type for this report item.

Constructor Summary

AccessConstructor and Description
public
public
ReportItem(String name, Expression attributeExpression)

Method Summary

Modifier and TypeMethod and Description
public Object
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.
public Expression
public ClassDescriptor
public JoinedAttributeManager
getJoinedAttributeManager()

INTERNAL: Set the list of expressions that represent elements that are joined because of their mapping for this query.

public JoinedAttributeManager
public DatabaseMapping
public String
public int
public Class<?>
public boolean
hasJoining()

INTERNAL: Return if any attributes are joined.

public void
initialize(ReportQuery query)

INTERNAL: Looks up mapping for attribute during preExecute of ReportQuery

public boolean
public void
setAttributeExpression(Expression attributeExpression)

public void
public void
public void
public void
setResultIndex(int resultIndex)

public void
setResultType(Class<?> resultType)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

attributeExpressionback to summary
protected Expression attributeExpression

Expression (partial) describing the attribute wanted

descriptorback to summary
protected ClassDescriptor descriptor

Descriptor for object result that is not based on an expression

joinedAttributeManagerback to summary
protected JoinedAttributeManager joinedAttributeManager

Stores the Join information for this item

mappingback to summary
protected DatabaseMapping mapping

Mapping which relates field to attribute, used to convert value and determine reference descriptor

nameback to summary
protected String name

Name given for item, can be used to retrieve value from result. Useful if same field retrieved multiple times

resultIndexback to summary
protected int resultIndex

Stores the row index for this item, given multiple results and joins

resultTypeback to summary
protected Class<?> resultType

Result type for this report item.

Constructor Detail

ReportItemback to summary
public ReportItem()
ReportItemback to summary
public ReportItem(String name, Expression attributeExpression)

Method Detail

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:Object

a clone of this instance.

Annotations
@Override
getAttributeExpressionback to summary
public Expression getAttributeExpression()
getDescriptorback to summary
public ClassDescriptor getDescriptor()
getJoinedAttributeManagerback to summary
public JoinedAttributeManager getJoinedAttributeManager()

INTERNAL: Set the list of expressions that represent elements that are joined because of their mapping for this query.

getJoinedAttributeManagerInternalback to summary
public JoinedAttributeManager getJoinedAttributeManagerInternal()
getMappingback to summary
public DatabaseMapping getMapping()
getNameback to summary
public String getName()
getResultIndexback to summary
public int getResultIndex()
getResultTypeback to summary
public Class<?> getResultType()
hasJoiningback to summary
public boolean hasJoining()

INTERNAL: Return if any attributes are joined. To avoid the initialization of the JoinedAttributeManager this should be first checked before accessing.

initializeback to summary
public void initialize(ReportQuery query) throws QueryException

INTERNAL: Looks up mapping for attribute during preExecute of ReportQuery

isConstructorItemback to summary
public boolean isConstructorItem()
setAttributeExpressionback to summary
public void setAttributeExpression(Expression attributeExpression)
setDescriptorback to summary
public void setDescriptor(ClassDescriptor descriptor)
setJoinedAttributeManagerback to summary
public void setJoinedAttributeManager(JoinedAttributeManager joinManager)
setMappingback to summary
public void setMapping(DatabaseMapping mapping)
setResultIndexback to summary
public void setResultIndex(int resultIndex)
setResultTypeback to summary
public void setResultType(Class<?> resultType)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override