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 | |
| protected Class | |
| protected List | |
| protected List | |
| private static final String | TO_STR_ARRAY
String to separate name and items array of |
| private static final String | TO_STR_PREFIX
String prefix of |
| private static final String | TO_STR_SUFFIX
String suffix of |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ConstructorReportItem(String
string used to look up this result in the ReportQueryResult. name)Create a new constructor item. |
| Modifier and Type | Method and Description |
|---|---|
| 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. |
| public void | addAttribute(String attributeName, Expression attributeExpression, List<E> joinedExpressions)
Add the attribute with joining. |
| public void | |
| public Constructor | |
| public Class | |
| public List | |
| public List | |
| public void | initialize(ReportQuery query)
Overrides org. |
| public boolean | |
| public void | |
| public void | |
| public void | setConstructorMappings(List<DatabaseMapping> constructorMappings)
INTERNAL: Return the mappings for the items. |
| public void | |
| public String | toString()
Overrides org. |
| constructor | back to summary |
|---|---|
| protected Constructor<T> constructor | |
| constructorArgTypes | back to summary |
|---|---|
| protected Class<?>[] constructorArgTypes | |
| constructorMappings | back to summary |
|---|---|
| protected List<DatabaseMapping> constructorMappings | |
| reportItems | back to summary |
|---|---|
| protected List<ReportItem> reportItems | |
| TO_STR_ARRAY | back to summary |
|---|---|
| private static final String TO_STR_ARRAY String to separate name and items array of | |
| TO_STR_PREFIX | back to summary |
|---|---|
| private static final String TO_STR_PREFIX String prefix of | |
| TO_STR_SUFFIX | back to summary |
|---|---|
| private static final String TO_STR_SUFFIX String suffix of | |
| ConstructorReportItem | back to summary |
|---|---|
| public ConstructorReportItem() Create a new constructor item. | |
| ConstructorReportItem | back to summary |
|---|---|
| public ConstructorReportItem(String name) Create a new constructor item.
| |
| addAttribute | back to summary |
|---|---|
| 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 | back to summary |
|---|---|
| public void addAttribute(String attributeName, Expression attributeExpression, List<E> joinedExpressions) Add the attribute with joining. | |
| addItem | back to summary |
|---|---|
| public void addItem(ReportItem item) | |
| getConstructor | back to summary |
|---|---|
| public Constructor INTERNAL: Return the constructor. | |
| getConstructorArgTypes | back to summary |
|---|---|
| public Class | |
| getConstructorMappings | back to summary |
|---|---|
| public List INTERNAL: Return the mappings for the items. | |
| getReportItems | back to summary |
|---|---|
| public List | |
| initialize | back to summary |
|---|---|
| public void initialize(ReportQuery query) throws QueryException Overrides org. INTERNAL: Looks up mapping for attribute during preExecute of ReportQuery
| |
| isConstructorItem | back to summary |
|---|---|
| public boolean isConstructorItem() Overrides org.
| |
| setConstructor | back to summary |
|---|---|
| public void setConstructor(Constructor<T> constructor) INTERNAL: Set the constructor. | |
| setConstructorArgTypes | back to summary |
|---|---|
| public void setConstructorArgTypes(Class<?>[] constructorArgTypes) | |
| setConstructorMappings | back to summary |
|---|---|
| public void setConstructorMappings(List<DatabaseMapping> constructorMappings) INTERNAL: Return the mappings for the items. | |
| setReportItems | back to summary |
|---|---|
| public void setReportItems(List<ReportItem> reportItems) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object. | |