public class QueryResultMetaData extends MetaData
Modifier and Type | Class and Description |
---|---|
static class |
QueryResultMetaData.ConstructorTypeColumn |
static class |
QueryResultMetaData.ConstructorTypeMapping
Class to wrap the mapping for a constructor type.
|
static class |
QueryResultMetaData.PersistentTypeMapping
Class to wrap the mapping for a persistent type.
|
Modifier and Type | Field and Description |
---|---|
protected List<QueryResultMetaData.ConstructorTypeMapping> |
ctrTypeMappings |
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.
|
EXTENSION_CLASS_MULTITENANCY_COLUMN_LENGTH, EXTENSION_CLASS_MULTITENANCY_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_DISABLE, EXTENSION_CLASS_MULTITENANCY_JDBC_TYPE, EXTENSION_CLASS_READ_ONLY, EXTENSION_CLASS_SOFTDELETE, EXTENSION_CLASS_SOFTDELETE_COLUMN_NAME, EXTENSION_CLASS_VERSION_FIELD_NAME, EXTENSION_CLASS_VIEW_DEFINITION, EXTENSION_CLASS_VIEW_IMPORTS, EXTENSION_MEMBER_CACHEABLE, EXTENSION_MEMBER_CALENDAR_ONE_COLUMN, EXTENSION_MEMBER_CASCADE_DETACH, EXTENSION_MEMBER_CASCADE_PERSIST, EXTENSION_MEMBER_CASCADE_REFRESH, EXTENSION_MEMBER_CASCADE_UPDATE, EXTENSION_MEMBER_COMPARATOR_NAME, EXTENSION_MEMBER_CONTAINER_ALLOW_NULLS, EXTENSION_MEMBER_ENUM_GETTER_BY_VALUE, EXTENSION_MEMBER_ENUM_VALUE_GETTER, EXTENSION_MEMBER_FETCH_FK_ONLY, EXTENSION_MEMBER_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_INSERTABLE, EXTENSION_MEMBER_KEY_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_LIST_ORDERING, EXTENSION_MEMBER_RELATION_DISCRIM_COLUMN, EXTENSION_MEMBER_RELATION_DISCRIM_PK, EXTENSION_MEMBER_RELATION_DISCRIM_VALUE, EXTENSION_MEMBER_STRATEGY_WHEN_NOTNULL, EXTENSION_MEMBER_TYPE_CONVERTER_DISABLED, EXTENSION_MEMBER_TYPE_CONVERTER_NAME, EXTENSION_MEMBER_UPDATEABLE, EXTENSION_MEMBER_VALUE_IMPLEMENTATION_CLASSES, EXTENSION_VERSION_NUMBER_INITIAL_VALUE, extensions, METADATA_CREATED_STATE, METADATA_INITIALISED_STATE, METADATA_POPULATED_STATE, METADATA_USED_STATE, metaDataState, parent, VENDOR_NAME
Constructor and Description |
---|
QueryResultMetaData(String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addConstructorTypeMapping(String className,
List<QueryResultMetaData.ConstructorTypeColumn> colNames) |
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.
|
QueryResultMetaData.ConstructorTypeMapping[] |
getConstructorTypeMappings() |
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, addExtensions, getExtensions, getMetaDataManager, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, removeExtension, setExtensions, setParent
protected final String name
protected List<QueryResultMetaData.PersistentTypeMapping> persistentTypeMappings
protected List<String> scalarColumns
protected List<QueryResultMetaData.ConstructorTypeMapping> ctrTypeMappings
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 QueryResultMetaData.PersistentTypeMapping[] getPersistentTypeMappings()
public void addScalarColumn(String columnName)
columnName
- Name of the columnpublic String[] getScalarColumns()
public void addConstructorTypeMapping(String className, List<QueryResultMetaData.ConstructorTypeColumn> colNames)
public QueryResultMetaData.ConstructorTypeMapping[] getConstructorTypeMappings()
Copyright © 2019. All rights reserved.