Top Description Methods
org.hibernate.metamodel.mapping

public Interface ValueMapping

extends MappingModelExpressible, JavaTypedExpressible
Known Direct Subinterfaces
org.hibernate.metamodel.mapping.BasicValuedMapping, org.hibernate.metamodel.mapping.ValuedModelPart
Imports
java.util.Locale, org.hibernate.type.descriptor.java.JavaType, .JavaTypedExpressible

Describes a mapping related to any part of the app's domain model, for example, an attribute, an entity identifier, collection elements, etc. Used during generation of a SQL AST.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public default JavaType<?>
public MappingType
getMappedType()

Descriptor for the type of this mapping

public default <X> X
treatAs(Class<X> targetType)

Treat operation.

Inherited from org.hibernate.type.descriptor.java.JavaTypedExpressible:
addToCacheKey

Method Detail

getExpressibleJavaTypeback to summary
public default JavaType<?> getExpressibleJavaType()

Implements org.hibernate.type.descriptor.java.JavaTypedExpressible.getExpressibleJavaType.

Annotations
@Override
getMappedTypeback to summary
public MappingType getMappedType()

Descriptor for the type of this mapping

treatAsback to summary
public default <X> X treatAs(Class<X> targetType)

Treat operation. Asks the ValueMapping to treat itself as the given `targetType`, if it can.

API Note

This is not necessarily limited to things the ValueMapping itself implements.

Implementation Note

This default implementation is however limited to just things the ValueMapping itself implements.