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

public Class ConstructorResult

extends SQLResult
Class Inheritance
Imports
java.lang.reflect.Constructor, java.security.AccessController, .PrivilegedActionException, java.util.ArrayList, .List, org.eclipse.persistence.exceptions.QueryException, .ValidationException, org.eclipse.persistence.internal.helper.ConversionManager, .DatabaseField, org.eclipse.persistence.internal.localization.ExceptionLocalization, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedClassForName, .PrivilegedGetConstructorFor, .PrivilegedInvokeConstructor, org.eclipse.persistence.sessions.DatabaseRecord

Purpose: Concrete class to represent the ConstructorResult structure as defined by the JPA 2.1 Persistence specification.

Author
Guy Pelletier
Since
EclipseLink 2.4

Field Summary

Modifier and TypeField and Description
protected List<ColumnResult>
columnResults

Stored the column results of this constructor result

protected transient Constructor<?>
protected Class<?>[]
protected transient Class<?>
protected String
targetClassName

Stores the class of result

Inherited from org.eclipse.persistence.queries.SQLResult:
sqlResultSetMapping

Constructor Summary

AccessConstructor and Description
protected
ConstructorResult()

Default constructor is protected.

public
ConstructorResult(Class<?> targetClass)

Constructor accepting target class.

public
ConstructorResult(String targetClassName)

Constructor accepting target class name.

Method Summary

Modifier and TypeMethod and Description
public void
addColumnResult(ColumnResult columnResult)

Add a column result to this constructor result.

public void
convertClassNamesToClasses(ClassLoader classLoader)

Overrides org.eclipse.persistence.queries.SQLResult.convertClassNamesToClasses.

INTERNAL: Convert all the class-name-based settings in this query to actual class-based settings.
public List<ColumnResult>
getColumnResults()

Return the columns result of this constructor result.

public Object
getValueFromRecord(DatabaseRecord record, ResultSetMappingQuery query)

Implements abstract org.eclipse.persistence.queries.SQLResult.getValueFromRecord.

INTERNAL: This method is a convenience method for extracting values from results/
protected void
public boolean
isConstructorResult()

Overrides org.eclipse.persistence.queries.SQLResult.isConstructorResult.

Return true if this is a constructor result.
public void
setColumnResults(List<ColumnResult> columnResults)

Set columns result of this constructor result.

Inherited from org.eclipse.persistence.queries.SQLResult:
getSQLResultMappingisColumnResultisEntityResultsetSQLResultMapping

Field Detail

columnResultsback to summary
protected List<ColumnResult> columnResults

Stored the column results of this constructor result

constructorback to summary
protected transient Constructor<?> constructor
constructorArgTypesback to summary
protected Class<?>[] constructorArgTypes
targetClassback to summary
protected transient Class<?> targetClass
targetClassNameback to summary
protected String targetClassName

Stores the class of result

Constructor Detail

ConstructorResultback to summary
protected ConstructorResult()

Default constructor is protected. Users must initialize the constructor result with a target class.

ConstructorResultback to summary
public ConstructorResult(Class<?> targetClass)

Constructor accepting target class.

ConstructorResultback to summary
public ConstructorResult(String targetClassName)

Constructor accepting target class name.

Method Detail

addColumnResultback to summary
public void addColumnResult(ColumnResult columnResult)

Add a column result to this constructor result.

convertClassNamesToClassesback to summary
public void convertClassNamesToClasses(ClassLoader classLoader)

Overrides org.eclipse.persistence.queries.SQLResult.convertClassNamesToClasses.

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.

Annotations
@Override
getColumnResultsback to summary
public List<ColumnResult> getColumnResults()

Return the columns result of this constructor result.

getValueFromRecordback to summary
public Object getValueFromRecord(DatabaseRecord record, ResultSetMappingQuery query)

Implements abstract org.eclipse.persistence.queries.SQLResult.getValueFromRecord.

INTERNAL: This method is a convenience method for extracting values from results/

Annotations
@Override
initializeback to summary
protected void initialize(DatabaseRecord record, ResultSetMappingQuery query)

INTERNAL:

isConstructorResultback to summary
public boolean isConstructorResult()

Overrides org.eclipse.persistence.queries.SQLResult.isConstructorResult.

Return true if this is a constructor result.

Annotations
@Override
setColumnResultsback to summary
public void setColumnResults(List<ColumnResult> columnResults)

Set columns result of this constructor result.