Package org.eclipse.persistence.queries
Class EntityResult
java.lang.Object
org.eclipse.persistence.queries.SQLResult
org.eclipse.persistence.queries.EntityResult
- All Implemented Interfaces:
Serializable
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:
- Author:
- Gordon Yorke
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.persistence.internal.helper.DatabaseFieldStores the column that will contain the value to determine the correct subclass to create if applicable.protected Classprotected StringStores the class name of resultprotected MapStores the list of FieldResultFields inherited from class org.eclipse.persistence.queries.SQLResult
sqlResultSetMapping -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFieldResult(FieldResult fieldResult) voidconvertClassNamesToClasses(ClassLoader classLoader) INTERNAL: Convert all the class-name-based settings in this query to actual class-based settings.org.eclipse.persistence.internal.helper.DatabaseFieldReturns the column name for the column that will store the value used to determine the subclass type if applicable.Accessor for the internally stored list of FieldResult.getValueFromRecord(DatabaseRecord record, ResultSetMappingQuery query) INTERNAL: This method is a convenience method for extracting values from ResultsvoidgetValueFromRecordForMapping(DatabaseRecord entityRecord, DatabaseMapping mapping, FieldResult fieldResult, DatabaseRecord databaseRecord) INTERNAL: This method is for processing all FieldResults for a mapping.booleanReturn true if this is an entity result.org.eclipse.persistence.internal.helper.DatabaseFieldprocessValueFromRecordForMapping(ClassDescriptor descriptor, String[] attributeNames, int currentLoc) INTERNAL: This method is for processing a single FieldResult, returning the DatabaseField it refers to.voidsetDiscriminatorColumn(String column) Sets the column name for the column that will store the value used to determine the subclass type if applicable.voidsetDiscriminatorColumn(org.eclipse.persistence.internal.helper.DatabaseField column) Methods inherited from class org.eclipse.persistence.queries.SQLResult
getSQLResultMapping, isColumnResult, isConstructorResult, setSQLResultMapping
-
Field Details
-
entityClassName
Stores the class name of result -
entityClass
-
fieldResults
Stores the list of FieldResult -
discriminatorColumn
protected org.eclipse.persistence.internal.helper.DatabaseField discriminatorColumnStores the column that will contain the value to determine the correct subclass to create if applicable.
-
-
Constructor Details
-
EntityResult
-
EntityResult
-
-
Method Details
-
addFieldResult
-
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.- Overrides:
convertClassNamesToClassesin classSQLResult- Parameters:
classLoader-
-
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
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
INTERNAL: This method is a convenience method for extracting values from Results- Specified by:
getValueFromRecordin classSQLResult
-
isEntityResult
public boolean isEntityResult()Description copied from class:SQLResultReturn true if this is an entity result.- Overrides:
isEntityResultin classSQLResult
-
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, String[] attributeNames, int currentLoc) INTERNAL: This method is for processing a single FieldResult, returning the DatabaseField it refers to.
-