EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.queries
Class EntityResult

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

public class EntityResult
extends SQLResult

Purpose: Concrete class to represent the EntityResult structure as defined by the EJB 3.0 Persistence specification. This class is a subcomponent of the SQLResultSetMapping

See Also:
SQLResultSetMapping
Author:
Gordon Yorke
Since:
TopLink Java Essentials

Field Summary
protected  org.eclipse.persistence.internal.helper.DatabaseField discriminatorColumn
          Stores the column that will contain the value to determine the correct subclass to create if applicable.
protected  java.lang.Class entityClass
           
protected  java.lang.String entityClassName
          Stores the class name of result
protected  java.util.Map fieldResults
          Stores the list of FieldResult
 
Constructor Summary
EntityResult(java.lang.Class entityClass)
           
EntityResult(java.lang.String entityClassName)
           
 
Method Summary
 void addFieldResult(FieldResult fieldResult)
           
 void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
          INTERNAL: Convert all the class-name-based settings in this query to actual class-based settings.
 org.eclipse.persistence.internal.helper.DatabaseField getDiscriminatorColumn()
          Returns the column name for the column that will store the value used to determine the subclass type if applicable.
 java.util.Map getFieldResults()
          Accessor for the internally stored list of FieldResult.
 java.lang.Object getValueFromRecord(DatabaseRecord record, ResultSetMappingQuery query)
          INTERNAL: This method is a convenience method for extracting values from Results
 void getValueFromRecordForMapping(DatabaseRecord entityRecord, DatabaseMapping mapping, FieldResult fieldResult, DatabaseRecord databaseRecord)
          INTERNAL: This method is for processing all FieldResults for a mapping.
 boolean isEntityResult()
           
 org.eclipse.persistence.internal.helper.DatabaseField processValueFromRecordForMapping(ClassDescriptor descriptor, java.lang.String[] attributeNames, int currentLoc)
          INTERNAL: This method is for processing a single FieldResult, returning the DatabaseField it refers to.
 void setDiscriminatorColumn(org.eclipse.persistence.internal.helper.DatabaseField column)
           
 void setDiscriminatorColumn(java.lang.String column)
          Sets the column name for the column that will store the value used to determine the subclass type if applicable.
 
Methods inherited from class org.eclipse.persistence.queries.SQLResult
isColumnResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entityClassName

protected java.lang.String entityClassName
Stores the class name of result


entityClass

protected java.lang.Class entityClass

fieldResults

protected java.util.Map fieldResults
Stores the list of FieldResult


discriminatorColumn

protected org.eclipse.persistence.internal.helper.DatabaseField discriminatorColumn
Stores the column that will contain the value to determine the correct subclass to create if applicable.

Constructor Detail

EntityResult

public EntityResult(java.lang.Class entityClass)

EntityResult

public EntityResult(java.lang.String entityClassName)
Method Detail

addFieldResult

public void addFieldResult(FieldResult fieldResult)

convertClassNamesToClasses

public void convertClassNamesToClasses(java.lang.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:
convertClassNamesToClasses in class SQLResult
Parameters:
classLoader -

getFieldResults

public java.util.Map getFieldResults()
Accessor for the internally stored list of FieldResult. Calling this method will result in a collection being created to store the FieldResult


getDiscriminatorColumn

public org.eclipse.persistence.internal.helper.DatabaseField getDiscriminatorColumn()
Returns the column name for the column that will store the value used to determine the subclass type if applicable.


setDiscriminatorColumn

public void setDiscriminatorColumn(java.lang.String column)
Sets the column name for the column that will store the value used to determine the subclass type if applicable.


setDiscriminatorColumn

public void setDiscriminatorColumn(org.eclipse.persistence.internal.helper.DatabaseField column)

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

isEntityResult

public boolean isEntityResult()
Overrides:
isEntityResult in class SQLResult

getValueFromRecordForMapping

public void getValueFromRecordForMapping(DatabaseRecord entityRecord,
                                         DatabaseMapping mapping,
                                         FieldResult fieldResult,
                                         DatabaseRecord databaseRecord)
INTERNAL: This method is for processing all FieldResults for a mapping. Adds DatabaseFields to the passed in entityRecord


processValueFromRecordForMapping

public org.eclipse.persistence.internal.helper.DatabaseField processValueFromRecordForMapping(ClassDescriptor descriptor,
                                                                                              java.lang.String[] attributeNames,
                                                                                              int currentLoc)
INTERNAL: This method is for processing a single FieldResult, returning the DatabaseField it refers to.


EclipseLink 2.2.0, build 'v20110202-r8913' API Reference