| java.lang.Object org.jpox.metadata.MetaData org.jpox.metadata.QueryResultMetaData
QueryResultMetaData | public class QueryResultMetaData extends MetaData (Code) | | Representation of the mapping of (SQL) Query results into a desired output form.
The results of a (SQL) query can be mapped into a mixture of
- instances of persistent classes - mapping from the result columns to the persistent fields
- scalar values - names of result columns that are returned as scalars (Integer, String etc)
version: $Revision: 1.5 $ |
Inner Class :public class PersistentTypeMapping | |
Field Summary | |
final protected String | name Name of the query result mapping. | protected List | persistentTypeMappings Collection of mappings of persistent types returned from the result set. | protected List | scalarColumns Collection of column names in the result set that are returned as scalars. |
name | final protected String name(Code) | | Name of the query result mapping.
|
persistentTypeMappings | protected List persistentTypeMappings(Code) | | Collection of mappings of persistent types returned from the result set.
|
scalarColumns | protected List scalarColumns(Code) | | Collection of column names in the result set that are returned as scalars.
|
QueryResultMetaData | public QueryResultMetaData(MetaData parent, String name)(Code) | | Constructor.
Parameters: parent - the parent of the Query Parameters: name - The Query name |
addMappingForPersistentTypeMapping | public void addMappingForPersistentTypeMapping(String className, String fieldName, String columnName)(Code) | | Method to add a mapping for the specified persistent class.
Parameters: className - Name of the persistent class Parameters: fieldName - Field in the persistent class Parameters: columnName - Name of the column in the result set to map to this field |
addPersistentTypeMapping | public void addPersistentTypeMapping(String className, Map fieldColumnMap, String discrimColumn)(Code) | | Method to add a persistent type as an output for the mapping.
Parameters: className - Name of the persistent type Parameters: fieldColumnMap - Map of column name, keyed by the field name in the persistent type Parameters: discrimColumn - Name of any discriminator column |
addScalarColumn | public void addScalarColumn(String columnName)(Code) | | Method to register a column as being scalar.
Parameters: columnName - Name of the column |
getName | public String getName()(Code) | | Accessor for the name of the result mapping.
Name of the mapping |
getPersistentTypeMappings | public PersistentTypeMapping[] getPersistentTypeMappings()(Code) | | Accessor for the persistent type mapping information for this result set.
Array of persistent types and their mapping info |
getScalarColumns | public String[] getScalarColumns()(Code) | | Accessor for the names of the result set columns that are returned as scalars.
Column names whose values are returned as scalars |
|
|