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 subcompent of the SQLResultSetMapping
SQLResultSetMapping
Modifier and Type | Field and Description |
---|---|
protected String |
discriminatorColumn
Stores the column that will contain the value to determine the correct subclass
to create if applicable.
|
protected Class |
entityClass |
protected String |
entityClassName
Stores the class name of result
|
protected Map |
fieldResults
Stores the list of FieldResult
|
Constructor and Description |
---|
EntityResult(Class entityClass) |
EntityResult(String entityClassName) |
Modifier and Type | Method and Description |
---|---|
void |
addFieldResult(FieldResult fieldResult) |
void |
convertClassNamesToClasses(ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this query to actual class-based
settings.
|
String |
getDiscriminatorColumn()
Returns the column name for the column that will store the value used to
determine the subclass type if applicable.
|
Map |
getFieldResults()
Accessor for the internally stored list of FieldResult.
|
Object |
getValueFromRecord(DatabaseRecord record,
ResultSetMappingQuery query)
INTERNAL:
This method is a convience 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() |
DatabaseField |
processValueFromRecordForMapping(ClassDescriptor descriptor,
String[] attributeNames,
int currentLoc)
INTERNAL:
This method is for processing a single FieldResult, returning the DatabaseField it refers to.
|
void |
setDiscriminatorColumn(String column)
Sets the column name for the column that will store the value used to
determine the subclass type if applicable.
|
isColumnResult
protected String entityClassName
protected Class entityClass
protected Map fieldResults
protected String discriminatorColumn
public EntityResult(Class entityClass)
public EntityResult(String entityClassName)
public void addFieldResult(FieldResult fieldResult)
public void convertClassNamesToClasses(ClassLoader classLoader)
convertClassNamesToClasses
in class SQLResult
classLoader
- public Map getFieldResults()
public String getDiscriminatorColumn()
public void setDiscriminatorColumn(String column)
public Object getValueFromRecord(DatabaseRecord record, ResultSetMappingQuery query)
getValueFromRecord
in class SQLResult
public boolean isEntityResult()
isEntityResult
in class SQLResult
public void getValueFromRecordForMapping(DatabaseRecord entityRecord, DatabaseMapping mapping, FieldResult fieldResult, DatabaseRecord databaseRecord)
public DatabaseField processValueFromRecordForMapping(ClassDescriptor descriptor, String[] attributeNames, int currentLoc)
Copyright © 2024. All rights reserved.