EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.queries
Class ConstructorResult

java.lang.Object
  extended by org.eclipse.persistence.queries.SQLResult
      extended by org.eclipse.persistence.queries.ConstructorResult

public class ConstructorResult
extends SQLResult

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
protected  java.util.List<ColumnResult> columnResults
          Stored the column results of this constructor result
protected  java.lang.reflect.Constructor constructor
           
protected  java.lang.Class[] constructorArgTypes
           
protected  java.lang.Class targetClass
          Stores the class of result
 
Fields inherited from class org.eclipse.persistence.queries.SQLResult
sqlResultSetMapping
 
Constructor Summary
protected ConstructorResult()
          Default constructor is protected.
  ConstructorResult(java.lang.Class targetClass)
          Constructor accepting target class.
 
Method Summary
 void addColumnResult(ColumnResult columnResult)
          Add a column result to this constructor result.
 java.util.List<ColumnResult> getColumnResults()
          Return the columns result of this constructor result.
 java.lang.Object getValueFromRecord(DatabaseRecord record, ResultSetMappingQuery query)
          INTERNAL: This method is a convenience method for extracting values from results/
protected  void initialize(DatabaseRecord record, ResultSetMappingQuery query)
          INTERNAL:
 boolean isConstructorResult()
          Return true if this is a constructor result.
 void setColumnResults(java.util.List<ColumnResult> columnResults)
          Set columns result of this constructor result.
 
Methods inherited from class org.eclipse.persistence.queries.SQLResult
convertClassNamesToClasses, getSQLResultMapping, isColumnResult, isEntityResult, setSQLResultMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetClass

protected java.lang.Class targetClass
Stores the class of result


columnResults

protected java.util.List<ColumnResult> columnResults
Stored the column results of this constructor result


constructor

protected java.lang.reflect.Constructor constructor

constructorArgTypes

protected java.lang.Class[] constructorArgTypes
Constructor Detail

ConstructorResult

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


ConstructorResult

public ConstructorResult(java.lang.Class targetClass)
Constructor accepting target class.

Method Detail

addColumnResult

public void addColumnResult(ColumnResult columnResult)
Add a column result to this constructor result.


getColumnResults

public java.util.List<ColumnResult> getColumnResults()
Return the columns result of this constructor result.


getValueFromRecord

public java.lang.Object getValueFromRecord(DatabaseRecord record,
                                           ResultSetMappingQuery query)
INTERNAL: This method is a convenience method for extracting values from results/

Specified by:
getValueFromRecord in class SQLResult

initialize

protected void initialize(DatabaseRecord record,
                          ResultSetMappingQuery query)
INTERNAL:


isConstructorResult

public boolean isConstructorResult()
Return true if this is a constructor result.

Overrides:
isConstructorResult in class SQLResult

setColumnResults

public void setColumnResults(java.util.List<ColumnResult> columnResults)
Set columns result of this constructor result.


EclipseLink 2.4.2, build 'v20130514-5956486' API Reference