- java.lang.Object
-
- org.eclipse.persistence.queries.SQLResult
-
- org.eclipse.persistence.queries.ConstructorResult
-
- All Implemented Interfaces:
Serializable
public class ConstructorResult extends SQLResult
Purpose: Concrete class to represent the ConstructorResult structure as defined by the JPA 2.1 Persistence specification.
- Since:
- EclipseLink 2.4
- Author:
- Guy Pelletier
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ColumnResult>columnResultsStored the column results of this constructor resultprotected Constructor<?>constructorprotected Class<?>[]constructorArgTypesprotected Class<?>targetClassprotected StringtargetClassNameStores the class of result-
Fields inherited from class org.eclipse.persistence.queries.SQLResult
sqlResultSetMapping
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedConstructorResult()Default constructor is protected.ConstructorResult(Class<?> targetClass)Constructor accepting target class.ConstructorResult(String targetClassName)Constructor accepting target class name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddColumnResult(ColumnResult columnResult)Add a column result to this constructor result.voidconvertClassNamesToClasses(ClassLoader classLoader)INTERNAL: Convert all the class-name-based settings in this query to actual class-based settings.List<ColumnResult>getColumnResults()Return the columns result of this constructor result.ObjectgetValueFromRecord(DatabaseRecord record, ResultSetMappingQuery query)INTERNAL: This method is a convenience method for extracting values from results/protected voidinitialize(DatabaseRecord record, ResultSetMappingQuery query)INTERNAL:booleanisConstructorResult()Return true if this is a constructor result.voidsetColumnResults(List<ColumnResult> columnResults)Set columns result of this constructor result.-
Methods inherited from class org.eclipse.persistence.queries.SQLResult
getSQLResultMapping, isColumnResult, isEntityResult, setSQLResultMapping
-
-
-
-
Field Detail
-
targetClassName
protected String targetClassName
Stores the class of result
-
targetClass
protected transient Class<?> targetClass
-
columnResults
protected List<ColumnResult> columnResults
Stored the column results of this constructor result
-
constructor
protected transient Constructor<?> constructor
-
constructorArgTypes
protected Class<?>[] constructorArgTypes
-
-
Constructor Detail
-
ConstructorResult
protected ConstructorResult()
Default constructor is protected. Users must initialize the constructor result with a target class.
-
ConstructorResult
public ConstructorResult(Class<?> targetClass)
Constructor accepting target class.
-
ConstructorResult
public ConstructorResult(String targetClassName)
Constructor accepting target class name.
-
-
Method Detail
-
addColumnResult
public void addColumnResult(ColumnResult columnResult)
Add a column result to this constructor result.
-
convertClassNamesToClasses
public void convertClassNamesToClasses(ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this query to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.- Overrides:
convertClassNamesToClassesin classSQLResult
-
getColumnResults
public List<ColumnResult> getColumnResults()
Return the columns result of this constructor result.
-
getValueFromRecord
public Object getValueFromRecord(DatabaseRecord record, ResultSetMappingQuery query)
INTERNAL: This method is a convenience method for extracting values from results/- Specified by:
getValueFromRecordin classSQLResult
-
initialize
protected void initialize(DatabaseRecord record, ResultSetMappingQuery query)
INTERNAL:
-
isConstructorResult
public boolean isConstructorResult()
Return true if this is a constructor result.- Overrides:
isConstructorResultin classSQLResult
-
setColumnResults
public void setColumnResults(List<ColumnResult> columnResults)
Set columns result of this constructor result.
-
-