Top Constructors Methods
org.hibernate.boot.model.source.internal.hbm

public abstract Class ResultSetMappingBinder

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collections, .HashMap, .HashSet, .Iterator, .List, .Locale, .Map, .Set, org.hibernate.AssertionFailure, org.hibernate.boot.MappingException, org.hibernate.boot.jaxb.hbm.spi.JaxbHbmNativeQueryCollectionLoadReturnType, .JaxbHbmNativeQueryJoinReturnType, .JaxbHbmNativeQueryPropertyReturnType, .JaxbHbmNativeQueryReturnType, .JaxbHbmNativeQueryScalarReturnType, .NativeQueryNonScalarRootReturn, .ResultSetMappingBindingDefinition, org.hibernate.engine.ResultSetMappingDefinition, org.hibernate.engine.query.spi.sql.NativeSQLQueryCollectionReturn, .NativeSQLQueryJoinReturn, .NativeSQLQueryReturn, .NativeSQLQueryRootReturn, .NativeSQLQueryScalarReturn, org.hibernate.internal.util.StringHelper, org.hibernate.internal.util.collections.CollectionHelper, org.hibernate.mapping.Component, .PersistentClass, .Property, .ToOne, .Value, org.hibernate.type.Type

Authors
Steve Ebersole, Emmanuel Bernard

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ResultSetMappingDefinition

Returns:

The ResultSet mapping descriptor
bind
(ResultSetMappingBindingDefinition
The XML data as a JAXB binding
resultSetMappingSource
,
HbmLocalMetadataBuildingContext
The mapping state
context
)

Build a ResultSetMappingDefinition given a containing element for the "return-XXX" elements.

public static ResultSetMappingDefinition

Returns:

The ResultSet mapping descriptor
bind
(ResultSetMappingBindingDefinition
The XML data as a JAXB binding
resultSetMappingSource
,
HbmLocalMetadataBuildingContext
The mapping state
context
,
String
A prefix to apply to named ResultSet mapping; this is either null for ResultSet mappings defined outside of any entity, or the name of the containing entity if defined within the context of an entity
prefix
)

Build a ResultSetMappingDefinition given a containing element for the "return-XXX" elements

private static void
private static Map<String, String[]>

Returns:

The extracted property mappings
extractPropertyResults
(String
The return alias
alias
,
JaxbHbmNativeQueryReturnType
The entity return jaxb binding
rtnSource
,
PersistentClass
The located PersistentClass
pc
,
HbmLocalMetadataBuildingContext
The hbm context
context
)

return-property extraction/binding specific to an entity return to account for discriminator.

private static Map<String, String[]>
private static ArrayList<String>
public static NativeSQLQueryScalarReturn
public static NativeSQLQueryRootReturn
public static NativeSQLQueryJoinReturn
public static NativeSQLQueryReturn
private static int
getIndexOfFirstMatchingProperty(List<E> propertyNames, String follower)

private static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ResultSetMappingBinderback to summary
public ResultSetMappingBinder()

Method Detail

bindback to summary
public static ResultSetMappingDefinition bind(ResultSetMappingBindingDefinition resultSetMappingSource, HbmLocalMetadataBuildingContext context)

Build a ResultSetMappingDefinition given a containing element for the "return-XXX" elements.

This form is used for ResultSet mappings defined outside the context of any specific entity. For hbm.xml this means at the root of the document. For annotations, this means at the package level.

Parameters
resultSetMappingSource:ResultSetMappingBindingDefinition

The XML data as a JAXB binding

context:HbmLocalMetadataBuildingContext

The mapping state

Returns:ResultSetMappingDefinition

The ResultSet mapping descriptor

bindback to summary
public static ResultSetMappingDefinition bind(ResultSetMappingBindingDefinition resultSetMappingSource, HbmLocalMetadataBuildingContext context, String prefix)

Build a ResultSetMappingDefinition given a containing element for the "return-XXX" elements

Parameters
resultSetMappingSource:ResultSetMappingBindingDefinition

The XML data as a JAXB binding

context:HbmLocalMetadataBuildingContext

The mapping state

prefix:String

A prefix to apply to named ResultSet mapping; this is either null for ResultSet mappings defined outside of any entity, or the name of the containing entity if defined within the context of an entity

Returns:ResultSetMappingDefinition

The ResultSet mapping descriptor

bindback to summary
private static void bind(ResultSetMappingBindingDefinition resultSetMappingSource, ResultSetMappingDefinition binding, HbmLocalMetadataBuildingContext context)
extractPropertyResultsback to summary
private static Map<String, String[]> extractPropertyResults(String alias, JaxbHbmNativeQueryReturnType rtnSource, PersistentClass pc, HbmLocalMetadataBuildingContext context)

return-property extraction/binding specific to an entity return to account for discriminator.

Parameters
alias:String

The return alias

rtnSource:JaxbHbmNativeQueryReturnType

The entity return jaxb binding

pc:PersistentClass

The located PersistentClass

context:HbmLocalMetadataBuildingContext

The hbm context

Returns:Map<String, String[]>

The extracted property mappings

extractPropertyResultsback to summary
private static Map<String, String[]> extractPropertyResults(String alias, NativeQueryNonScalarRootReturn rtnSource, PersistentClass pc, HbmLocalMetadataBuildingContext context)
Annotations
@SuppressWarnings:unchecked
extractResultColumnsback to summary
private static ArrayList<String> extractResultColumns(JaxbHbmNativeQueryPropertyReturnType propertyReturnSource)
extractReturnDescriptionback to summary
public static NativeSQLQueryScalarReturn extractReturnDescription(JaxbHbmNativeQueryScalarReturnType rtnSource, HbmLocalMetadataBuildingContext context)
extractReturnDescriptionback to summary
public static NativeSQLQueryRootReturn extractReturnDescription(JaxbHbmNativeQueryReturnType rtnSource, HbmLocalMetadataBuildingContext context, int queryReturnPosition)
extractReturnDescriptionback to summary
public static NativeSQLQueryJoinReturn extractReturnDescription(JaxbHbmNativeQueryJoinReturnType rtnSource, HbmLocalMetadataBuildingContext context, int queryReturnPosition)
extractReturnDescriptionback to summary
public static NativeSQLQueryReturn extractReturnDescription(JaxbHbmNativeQueryCollectionLoadReturnType rtnSource, HbmLocalMetadataBuildingContext context, int queryReturnPosition)
getIndexOfFirstMatchingPropertyback to summary
private static int getIndexOfFirstMatchingProperty(List<E> propertyNames, String follower)
unquoteback to summary
private static String unquote(String name)