public class QueryResultMetaData extends MetaData
Modifier and Type | Class and Description |
---|---|
static class |
QueryResultMetaData.PersistentTypeMapping
Class to wrap the mapping for a persistent type.
|
Modifier and Type | Field and Description |
---|---|
protected String |
name
Name of the query result mapping.
|
protected List<QueryResultMetaData.PersistentTypeMapping> |
persistentTypeMappings
Collection of mappings of persistent types returned from the result set.
|
protected List<String> |
scalarColumns
Collection of column names in the result set that are returned as scalars.
|
extensions, LOCALISER, METADATA_CREATED_STATE, METADATA_INITIALISED_STATE, METADATA_POPULATED_STATE, METADATA_USED_STATE, metaDataState, parent, VENDOR_NAME, VENDOR_NAME_OLD
Constructor and Description |
---|
QueryResultMetaData(String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addMappingForPersistentTypeMapping(String className,
String fieldName,
String columnName)
Method to add a mapping for the specified persistent class.
|
void |
addPersistentTypeMapping(String className,
Map fieldColumnMap,
String discrimColumn)
Method to add a persistent type as an output for the mapping.
|
void |
addScalarColumn(String columnName)
Method to register a column as being scalar.
|
String |
getName()
Accessor for the name of the result mapping.
|
QueryResultMetaData.PersistentTypeMapping[] |
getPersistentTypeMappings()
Accessor for the persistent type mapping information for this result set.
|
String[] |
getScalarColumns()
Accessor for the names of the result set columns that are returned as scalars.
|
addExtension, addExtension, assertIfInitialised, getExtensions, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, newExtensionMetaData, removeExtension, setParent, toString, toString
protected final String name
protected List<QueryResultMetaData.PersistentTypeMapping> persistentTypeMappings
public QueryResultMetaData(String name)
name
- The Query namepublic String getName()
public void addPersistentTypeMapping(String className, Map fieldColumnMap, String discrimColumn)
className
- Name of the persistent typefieldColumnMap
- Map of column name, keyed by the field name in the persistent typediscrimColumn
- Name of any discriminator columnpublic void addMappingForPersistentTypeMapping(String className, String fieldName, String columnName)
className
- Name of the persistent classfieldName
- Field in the persistent classcolumnName
- Name of the column in the result set to map to this fieldpublic void addScalarColumn(String columnName)
columnName
- Name of the columnpublic QueryResultMetaData.PersistentTypeMapping[] getPersistentTypeMappings()
public String[] getScalarColumns()
Copyright © 2014. All Rights Reserved.