org.apache.openjpa.jdbc.meta
Class QueryResultMapping.PCResult

java.lang.Object
  extended by org.apache.openjpa.jdbc.meta.QueryResultMapping.PCResult
Enclosing class:
QueryResultMapping

public class QueryResultMapping.PCResult
extends Object

A persistence-capable result.


Field Summary
static String DISCRIMINATOR
          Path token to represent a discriminator.
 
Method Summary
 void addMapping(String path, Object id)
          Map the given path to the given result id.
 Class<?> getCandidateType()
          The result candidate class.
 ClassMapping getCandidateTypeMapping()
          Candidate mapping.
 BitSet getExcludes(List<MetaDataContext> path)
          Return the field indexes to exclude when loading data for the given path.
 Object getMapping(String path)
          Return the mapping id for the given path supplied with addMapping(java.lang.String, java.lang.Object), or null if none.
 String[] getMappingPaths()
          Return the raw mapping paths supplied with addMapping(java.lang.String, java.lang.Object), or empty array if none.
 boolean hasEager(List<MetaDataContext> path, FieldMapping field)
          Return true if the mapped result contains eager data for the given field at the given path.
 Object map(List<MetaDataContext> path, Object id, Joins joins)
          Map the given request onto a result id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISCRIMINATOR

public static final String DISCRIMINATOR
Path token to represent a discriminator.

See Also:
Constant Field Values
Method Detail

getCandidateType

public Class<?> getCandidateType()
The result candidate class.


getCandidateTypeMapping

public ClassMapping getCandidateTypeMapping()
Candidate mapping.


getMappingPaths

public String[] getMappingPaths()
Return the raw mapping paths supplied with addMapping(java.lang.String, java.lang.Object), or empty array if none.


getMapping

public Object getMapping(String path)
Return the mapping id for the given path supplied with addMapping(java.lang.String, java.lang.Object), or null if none.


addMapping

public void addMapping(String path,
                       Object id)
Map the given path to the given result id.


map

public Object map(List<MetaDataContext> path,
                  Object id,
                  Joins joins)
Map the given request onto a result id.

Parameters:
path - stack of data requests (see Result.startDataRequest(java.lang.Object))
id - requested id or column (see Result APIs)
joins - requested joins, or null
Returns:
the id or column to fetch from the result (typically a column name)

hasEager

public boolean hasEager(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 (see Result.startDataRequest(java.lang.Object))

getExcludes

public BitSet getExcludes(List<MetaDataContext> path)
Return the field indexes to exclude when loading data for the given path.



Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.