Package org.apache.openjpa.jdbc.meta
Class QueryResultMapping.PCResult
- java.lang.Object
-
- org.apache.openjpa.jdbc.meta.QueryResultMapping.PCResult
-
- Enclosing class:
- QueryResultMapping
public class QueryResultMapping.PCResult extends java.lang.Object
A persistence-capable result.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DISCRIMINATOR
Path token to represent a discriminator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConstructorParam(java.lang.String name)
void
addMapping(java.lang.String path, java.lang.Object id)
Map the given path to the given result id.java.lang.Class<?>
getCandidateType()
The result candidate class.ClassMapping
getCandidateTypeMapping()
Candidate mapping.java.util.BitSet
getExcludes(java.util.List<MetaDataContext> path)
Return the field indexes to exclude when loading data for the given path.java.lang.Object
getMapping(java.lang.String path)
Return the mapping id for the given path supplied withaddMapping(java.lang.String, java.lang.Object)
, or null if none.java.lang.String[]
getMappingPaths()
Return the raw mapping paths supplied withaddMapping(java.lang.String, java.lang.Object)
, or empty array if none.boolean
hasEager(java.util.List<MetaDataContext> path, FieldMapping field)
Return true if the mapped result contains eager data for the given field at the given path.java.lang.Object
map(java.util.List<MetaDataContext> path, java.lang.Object id, Joins joins)
Map the given request onto a result id.
-
-
-
Field Detail
-
DISCRIMINATOR
public static final java.lang.String DISCRIMINATOR
Path token to represent a discriminator.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCandidateType
public java.lang.Class<?> getCandidateType()
The result candidate class.
-
getCandidateTypeMapping
public ClassMapping getCandidateTypeMapping()
Candidate mapping.
-
getMappingPaths
public java.lang.String[] getMappingPaths()
Return the raw mapping paths supplied withaddMapping(java.lang.String, java.lang.Object)
, or empty array if none.
-
getMapping
public java.lang.Object getMapping(java.lang.String path)
Return the mapping id for the given path supplied withaddMapping(java.lang.String, java.lang.Object)
, or null if none.
-
addMapping
public void addMapping(java.lang.String path, java.lang.Object id)
Map the given path to the given result id.
-
map
public java.lang.Object map(java.util.List<MetaDataContext> path, java.lang.Object id, Joins joins)
Map the given request onto a result id.- Parameters:
path
- stack of data requests (seeResult.startDataRequest(java.lang.Object)
)id
- requested id or column (seeResult
APIs)joins
- requested joins, or null- Returns:
- the id or column to fetch from the result (typically a column name)
-
hasEager
public boolean hasEager(java.util.List<MetaDataContext> path, FieldMapping field)
Return true if the mapped result contains eager data for the given field at the given path.- Parameters:
path
- stack of data requests (seeResult.startDataRequest(java.lang.Object)
)
-
getExcludes
public java.util.BitSet getExcludes(java.util.List<MetaDataContext> path)
Return the field indexes to exclude when loading data for the given path.
-
addConstructorParam
public void addConstructorParam(java.lang.String name)
-
-