public class ConstructorReportItem
extends org.eclipse.persistence.internal.queries.ReportItem
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.
Modifier and Type | Field and Description |
---|---|
protected Constructor |
constructor |
protected Class[] |
constructorArgTypes |
protected List<DatabaseMapping> |
constructorMappings |
protected List<org.eclipse.persistence.internal.queries.ReportItem> |
reportItems |
Constructor and Description |
---|
ConstructorReportItem()
Create a new constructor item.
|
ConstructorReportItem(String name)
Create a new constructor item.
|
Modifier and Type | Method and Description |
---|---|
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(String attributeName,
Expression attributeExpression,
List joinedExpressions)
Add the attribute with joining.
|
void |
addItem(org.eclipse.persistence.internal.queries.ReportItem item) |
Constructor |
getConstructor()
INTERNAL:
Return the constructor.
|
Class[] |
getConstructorArgTypes() |
List<DatabaseMapping> |
getConstructorMappings()
INTERNAL:
Return the mappings for the items.
|
List<org.eclipse.persistence.internal.queries.ReportItem> |
getReportItems() |
void |
initialize(ReportQuery query)
INTERNAL:
Looks up mapping for attribute during preExecute of ReportQuery
|
boolean |
isConstructorItem() |
void |
setConstructor(Constructor constructor)
INTERNAL:
Set the constructor.
|
void |
setConstructorArgTypes(Class[] constructorArgTypes) |
void |
setConstructorMappings(List<DatabaseMapping> constructorMappings)
INTERNAL:
Return the mappings for the items.
|
void |
setReportItems(List<org.eclipse.persistence.internal.queries.ReportItem> reportItems) |
String |
toString() |
clone, getAttributeExpression, getDescriptor, getJoinedAttributeManager, getJoinedAttributeManagerInternal, getMapping, getName, getResultIndex, getResultType, hasJoining, setAttributeExpression, setDescriptor, setJoinedAttributeManager, setMapping, setResultIndex, setResultType
protected Class[] constructorArgTypes
protected List<DatabaseMapping> constructorMappings
protected List<org.eclipse.persistence.internal.queries.ReportItem> reportItems
protected Constructor constructor
public ConstructorReportItem()
public ConstructorReportItem(String name)
name
- string used to look up this result in the ReportQueryResult.public void addAttribute(Expression attributeExpression)
public void addAttribute(String attributeName, Expression attributeExpression, List joinedExpressions)
public void addItem(org.eclipse.persistence.internal.queries.ReportItem item)
public Class[] getConstructorArgTypes()
public List<DatabaseMapping> getConstructorMappings()
public Constructor getConstructor()
public void setConstructor(Constructor constructor)
public List<org.eclipse.persistence.internal.queries.ReportItem> getReportItems()
public void initialize(ReportQuery query) throws QueryException
initialize
in class org.eclipse.persistence.internal.queries.ReportItem
QueryException
public boolean isConstructorItem()
isConstructorItem
in class org.eclipse.persistence.internal.queries.ReportItem
public void setConstructorArgTypes(Class[] constructorArgTypes)
public void setConstructorMappings(List<DatabaseMapping> constructorMappings)
public void setReportItems(List<org.eclipse.persistence.internal.queries.ReportItem> reportItems)
public String toString()
toString
in class org.eclipse.persistence.internal.queries.ReportItem
Copyright © 2007–2020 Eclipse.org - EclipseLink Project. All rights reserved.