Top Description Fields Constructors Methods
org.hibernate.query.sqm.tree.domain

public Class SqmMapEntryReference<K, V>

extends Object
implements SqmSelectableNode<Map.Entry<K, V>>, Expression<Map.Entry<K, V>>, SqmExpressible<Map.Entry<K, V>>
Class Inheritance
All Implemented Interfaces
org.hibernate.query.sqm.SqmExpressible, org.hibernate.query.BindableType, jakarta.persistence.criteria.Expression, jakarta.persistence.criteria.Selection, jakarta.persistence.TupleElement, org.hibernate.query.sqm.tree.select.SqmSelectableNode, org.hibernate.query.sqm.tree.SqmTypedNode, org.hibernate.query.sqm.tree.SqmVisitableNode, org.hibernate.query.sqm.tree.SqmNode, org.hibernate.query.criteria.JpaCriteriaNode, java.io.Serializable, org.hibernate.query.sqm.tree.SqmExpressibleAccessor, org.hibernate.query.criteria.JpaSelection, org.hibernate.query.criteria.JpaTupleElement
Imports
java.util.Collection, .Collections, .List, .Map, java.util.function.Consumer, org.hibernate.metamodel.model.domain.DomainType, org.hibernate.query.criteria.JpaSelection, org.hibernate.query.sqm.NodeBuilder, .SemanticQueryWalker, .SqmExpressible, org.hibernate.query.sqm.tree.SqmCopyContext, org.hibernate.query.sqm.tree.select.SqmSelectableNode, org.hibernate.type.descriptor.java.JavaType, jakarta.persistence.criteria.Expression, .Predicate

Represents the reference to a Map attribute's Map.Entry entries in a select clause
Authors
Gunnar Morling, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private String
private final JavaType<Map.Entry<K, V>>
private final SqmPath<?>
private final NodeBuilder

Constructor Summary

AccessConstructor and Description
public
SqmMapEntryReference(SqmPath<?> mapPath, NodeBuilder nodeBuilder)

Method Summary

Modifier and TypeMethod and Description
public <X> X
accept(SemanticQueryWalker<X> walker)

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Accept the walker per visitation
public JpaSelection<Map.Entry<K, V>>
public void
public <X> Expression<X>
as(Class<X>
intended type of the expression
type
)

Implements jakarta.persistence.criteria.Expression.as.

Perform a typecast upon the expression, returning a new expression object.
public SqmMapEntryReference<K, V>
public String
getAlias()

Implements jakarta.persistence.TupleElement.getAlias.

Return the alias assigned to the tuple element or null, if no alias has been assigned.
public Class<Map.Entry<K, V>>
public JavaType<Map.Entry<K, V>>
getExpressibleJavaType()

Implements org.hibernate.query.sqm.SqmExpressible.getExpressibleJavaType.

The Java type descriptor for this expressible
public JavaType<Map.Entry<K, V>>
public SqmPath<?>
public JavaType<Map.Entry<K, V>>
getNodeJavaType()

Overrides default org.hibernate.query.sqm.tree.SqmTypedNode.getNodeJavaType.

The Java type descriptor for this node.
public SqmExpressible<Map.Entry<K, V>>
public List<? extends JpaSelection<?>>
public DomainType<Map.Entry<K, V>>
public Predicate
in(Object...
values to be tested against
values
)

Implements jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the argument list.
public Predicate
in(Expression<?>...
expressions to be tested against
values
)

Implements jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the argument list.
public Predicate
in(Collection<?>
collection of values to be tested against
values
)

Implements jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the collection.
public Predicate
in(Expression<Collection<?>>
expression corresponding to collection to be tested against
values
)

Implements jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the collection.
public boolean
isCompoundSelection()

Implements jakarta.persistence.criteria.Selection.isCompoundSelection.

Whether the selection item is a compound selection.
public Predicate
isNotNull()

Implements jakarta.persistence.criteria.Expression.isNotNull.

Create a predicate to test whether the expression is not null.
public Predicate
isNull()

Implements jakarta.persistence.criteria.Expression.isNull.

Create a predicate to test whether the expression is null.
public NodeBuilder
public void
visitSubSelectableNodes(Consumer<SqmSelectableNode<?>> jpaSelectionConsumer)

Implements org.hibernate.query.sqm.tree.select.SqmSelectableNode.visitSubSelectableNodes.

Visit each of this selectable's direct sub-selectables - used to support JPA's Selection model (which is really a "selectable", just poorly named and poorly defined
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

explicitAliasback to summary
private String explicitAlias
mapEntryTypeDescriptorback to summary
private final JavaType<Map.Entry<K, V>> mapEntryTypeDescriptor
mapPathback to summary
private final SqmPath<?> mapPath
Annotations
@SuppressWarnings:FieldCanBeLocal, unused
nodeBuilderback to summary
private final NodeBuilder nodeBuilder

Constructor Detail

SqmMapEntryReferenceback to summary
public SqmMapEntryReference(SqmPath<?> mapPath, NodeBuilder nodeBuilder)

Method Detail

acceptback to summary
public <X> X accept(SemanticQueryWalker<X> walker)

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Doc from org.hibernate.query.sqm.tree.SqmVisitableNode.accept.

Accept the walker per visitation

Annotations
@Override
aliasback to summary
public JpaSelection<Map.Entry<K, V>> alias(String name)

Implements org.hibernate.query.criteria.JpaSelection.alias, jakarta.persistence.criteria.Selection.alias.

Doc from jakarta.persistence.criteria.Selection.alias.

Assigns an alias to the selection item. Once assigned, an alias cannot be changed or reassigned. Returns the same selection item.

Parameters
name:String

alias

Returns:JpaSelection<Map.Entry<K, V>>

selection item

Annotations
@Override
appendHqlStringback to summary
public void appendHqlString(StringBuilder sb)

Implements org.hibernate.query.sqm.tree.SqmVisitableNode.appendHqlString.

Annotations
@Override
asback to summary
public <X> Expression<X> as(Class<X> type)

Implements jakarta.persistence.criteria.Expression.as.

Doc from jakarta.persistence.criteria.Expression.as.

Perform a typecast upon the expression, returning a new expression object. This method does not cause type conversion: the runtime type is not changed.

Warning

may result in a runtime failure.

Parameters
type:Class<X>

intended type of the expression

Returns:Expression<X>

new expression of the given type

Annotations
@Override
copyback to summary
public SqmMapEntryReference<K, V> copy(SqmCopyContext context)

Implements org.hibernate.query.sqm.tree.select.SqmSelectableNode.copy.

Annotations
@Override
getAliasback to summary
public String getAlias()

Implements jakarta.persistence.TupleElement.getAlias.

Doc from jakarta.persistence.TupleElement.getAlias.

Return the alias assigned to the tuple element or null, if no alias has been assigned.

Returns:String

alias

Annotations
@Override
getBindableJavaTypeback to summary
public Class<Map.Entry<K, V>> getBindableJavaType()

Implements org.hibernate.query.BindableType.getBindableJavaType.

Doc from org.hibernate.query.BindableType.getBindableJavaType.

The expected Java type

Annotations
@Override
getExpressibleJavaTypeback to summary
public JavaType<Map.Entry<K, V>> getExpressibleJavaType()

Implements org.hibernate.query.sqm.SqmExpressible.getExpressibleJavaType.

Doc from org.hibernate.query.sqm.SqmExpressible.getExpressibleJavaType.

The Java type descriptor for this expressible

Annotations
@Override
getJavaTypeDescriptorback to summary
public JavaType<Map.Entry<K, V>> getJavaTypeDescriptor()

Implements org.hibernate.query.criteria.JpaTupleElement.getJavaTypeDescriptor.

Annotations
@Override
getMapPathback to summary
public SqmPath<?> getMapPath()
getNodeJavaTypeback to summary
public JavaType<Map.Entry<K, V>> getNodeJavaType()

Overrides default org.hibernate.query.sqm.tree.SqmTypedNode.getNodeJavaType.

Doc from org.hibernate.query.sqm.tree.SqmTypedNode.getNodeJavaType.

The Java type descriptor for this node.

Annotations
@Override
getNodeTypeback to summary
public SqmExpressible<Map.Entry<K, V>> getNodeType()

Implements org.hibernate.query.sqm.tree.SqmTypedNode.getNodeType.

Annotations
@Override
getSelectionItemsback to summary
public List<? extends JpaSelection<?>> getSelectionItems()

Implements org.hibernate.query.criteria.JpaSelection.getSelectionItems.

Annotations
@Override
getSqmTypeback to summary
public DomainType<Map.Entry<K, V>> getSqmType()

Implements org.hibernate.query.sqm.SqmExpressible.getSqmType.

Annotations
@Override
inback to summary
public Predicate in(Object... values)

Implements jakarta.persistence.criteria.Expression.in.

Doc from jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the argument list.

Parameters
values:Object[]

values to be tested against

Returns:Predicate

predicate testing for membership

Annotations
@Override
inback to summary
public Predicate in(Expression<?>... values)

Implements jakarta.persistence.criteria.Expression.in.

Doc from jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the argument list.

Parameters
values:Expression<?>[]

expressions to be tested against

Returns:Predicate

predicate testing for membership

Annotations
@Override
inback to summary
public Predicate in(Collection<?> values)

Implements jakarta.persistence.criteria.Expression.in.

Doc from jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the collection.

Parameters
values:Collection<?>

collection of values to be tested against

Returns:Predicate

predicate testing for membership

Annotations
@Override
inback to summary
public Predicate in(Expression<Collection<?>> values)

Implements jakarta.persistence.criteria.Expression.in.

Doc from jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the collection.

Parameters
values:Expression<Collection<?>>

expression corresponding to collection to be tested against

Returns:Predicate

predicate testing for membership

Annotations
@Override
isCompoundSelectionback to summary
public boolean isCompoundSelection()

Implements jakarta.persistence.criteria.Selection.isCompoundSelection.

Doc from jakarta.persistence.criteria.Selection.isCompoundSelection.

Whether the selection item is a compound selection.

Returns:boolean

boolean indicating whether the selection is a compound selection

Annotations
@Override
isNotNullback to summary
public Predicate isNotNull()

Implements jakarta.persistence.criteria.Expression.isNotNull.

Doc from jakarta.persistence.criteria.Expression.isNotNull.

Create a predicate to test whether the expression is not null.

Returns:Predicate

predicate testing whether the expression is not null

Annotations
@Override
isNullback to summary
public Predicate isNull()

Implements jakarta.persistence.criteria.Expression.isNull.

Doc from jakarta.persistence.criteria.Expression.isNull.

Create a predicate to test whether the expression is null.

Returns:Predicate

predicate testing whether the expression is null

Annotations
@Override
nodeBuilderback to summary
public NodeBuilder nodeBuilder()

Implements org.hibernate.query.sqm.tree.SqmNode.nodeBuilder.

Annotations
@Override
visitSubSelectableNodesback to summary
public void visitSubSelectableNodes(Consumer<SqmSelectableNode<?>> jpaSelectionConsumer)

Implements org.hibernate.query.sqm.tree.select.SqmSelectableNode.visitSubSelectableNodes.

Doc from org.hibernate.query.sqm.tree.select.SqmSelectableNode.visitSubSelectableNodes.

Visit each of this selectable's direct sub-selectables - used to support JPA's Selection model (which is really a "selectable", just poorly named and poorly defined

Annotations
@Override