Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-03

oracle.toplink.queryframework
Class ConstructorReportItem

java.lang.Object
  extended by oracle.toplink.internal.queryframework.ReportItem
      extended by oracle.toplink.queryframework.ConstructorReportItem
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class ConstructorReportItem
extends oracle.toplink.internal.queryframework.ReportItem

Purpose: An item specifying a class constructor method to be used in a ReportQuery's returned results.

Example:

      ConstructorReportItem item = new ConstructorReportItem("Employee");
      item.setResultType(Employee.class);
      item.addAttribute("firstName", employees.get("firstName"));
      query.addConstructorReportItem(item);
 

When executed will return a collection of ReportQueryResults that contain Employee objects created using the new Employee(firstname) constructor.

Since:
TopLink Essentials 1.0
See Also:
Serialized Form

Constructor Summary
ConstructorReportItem()
          Create a new constructor item.
ConstructorReportItem(java.lang.String name)
          Create a new constructor item.
 
Method Summary
 void addAttribute(Expression attributeExpression)
          Method to add an expression to be used to return the parameter that is then passed into the constructor method.
 void addAttribute(java.lang.String attributeName, Expression attributeExpression, java.util.List joinedExpressions)
          Add the attribute with joining.
 void addItem(oracle.toplink.internal.queryframework.ReportItem item)
           
 java.lang.Class[] getConstructorArgTypes()
           
 java.util.List getReportItems()
           
 boolean isConstructorItem()
           
 void setConstructorArgTypes(java.lang.Class[] constructorArgTypes)
           
 void setReportItems(java.util.List reportItems)
           
 java.lang.String toString()
           
 
Methods inherited from class oracle.toplink.internal.queryframework.ReportItem
clone, getAttributeExpression, getDescriptor, getJoinedAttributeManagerInternal, getMapping, getName, getResultIndex, getResultType, isPlaceHolder, setDescriptor, setJoinedAttributeManager, setMapping, setResultIndex, setResultType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstructorReportItem

public ConstructorReportItem()
Create a new constructor item.


ConstructorReportItem

public ConstructorReportItem(java.lang.String name)
Create a new constructor item.

Parameters:
name - string used to look up this result in the ReportQueryResult.
Method Detail

addAttribute

public void addAttribute(Expression attributeExpression)
Method to add an expression to be used to return the parameter that is then passed into the constructor method. Similar to ReportQuery's addAttribute method, but name is not needed.


addAttribute

public void addAttribute(java.lang.String attributeName,
                         Expression attributeExpression,
                         java.util.List joinedExpressions)
Add the attribute with joining.


addItem

public void addItem(oracle.toplink.internal.queryframework.ReportItem item)

getConstructorArgTypes

public java.lang.Class[] getConstructorArgTypes()

getReportItems

public java.util.List getReportItems()

isConstructorItem

public boolean isConstructorItem()
Overrides:
isConstructorItem in class oracle.toplink.internal.queryframework.ReportItem

setConstructorArgTypes

public void setConstructorArgTypes(java.lang.Class[] constructorArgTypes)

setReportItems

public void setReportItems(java.util.List reportItems)

toString

public java.lang.String toString()
Overrides:
toString in class oracle.toplink.internal.queryframework.ReportItem

Copyright © 1998, 2010, Oracle. All Rights Reserved.