Top Description Fields Constructors Methods
org.hibernate.sql.results.internal

public Class TupleImpl

extends Object
implements JpaTuple
Class Inheritance
All Implemented Interfaces
org.hibernate.query.JpaTuple, jakarta.persistence.Tuple
Imports
java.util.Arrays, .List, jakarta.persistence.TupleElement, org.hibernate.query.JpaTuple

Implementation of the JPA Tuple contract
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Object[]
private final TupleMetadata

Constructor Summary

AccessConstructor and Description
public
TupleImpl(TupleMetadata tupleMetadata, Object[] row)

Method Summary

Modifier and TypeMethod and Description
private <X> boolean
elementTypeMatches(Class<X> type, Object untyped)

public <X> X
get(TupleElement<X>
tuple element
tupleElement
)

Implements jakarta.persistence.Tuple.get.

Get the value of the specified tuple element.
public <X> X
get(String
alias assigned to tuple element
alias
,
Class<X>
of the tuple element
type
)

Implements jakarta.persistence.Tuple.get.

Get the value of the tuple element to which the specified alias has been assigned.
public Object
get(String
alias assigned to tuple element
alias
)

Implements jakarta.persistence.Tuple.get.

Get the value of the tuple element to which the specified alias has been assigned.
public <X> X
get(int
position in result tuple
i
,
Class<X>
type of the tuple element
type
)

Implements jakarta.persistence.Tuple.get.

Get the value of the element at the specified position in the result tuple.
public Object
get(int
position in result tuple
i
)

Implements jakarta.persistence.Tuple.get.

Get the value of the element at the specified position in the result tuple.
public List<TupleElement<?>>
getElements()

Implements jakarta.persistence.Tuple.getElements.

Return the tuple elements.
public Object[]
toArray()

Implements jakarta.persistence.Tuple.toArray.

Return the values of the result tuple elements as an array.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

rowback to summary
private final Object[] row
tupleMetadataback to summary
private final TupleMetadata tupleMetadata

Constructor Detail

TupleImplback to summary
public TupleImpl(TupleMetadata tupleMetadata, Object[] row)

Method Detail

elementTypeMatchesback to summary
private <X> boolean elementTypeMatches(Class<X> type, Object untyped)
getback to summary
public <X> X get(TupleElement<X> tupleElement)

Implements jakarta.persistence.Tuple.get.

Doc from jakarta.persistence.Tuple.get.

Get the value of the specified tuple element.

Parameters
tupleElement:TupleElement<X>

tuple element

Returns:X

value of tuple element

Annotations
@Override
@SuppressWarnings:unchecked
getback to summary
public <X> X get(String alias, Class<X> type)

Implements jakarta.persistence.Tuple.get.

Doc from jakarta.persistence.Tuple.get.

Get the value of the tuple element to which the specified alias has been assigned.

Parameters
alias:String

alias assigned to tuple element

type:Class<X>

of the tuple element

Returns:X

value of the tuple element

Annotations
@Override
@SuppressWarnings:unchecked
getback to summary
public Object get(String alias)

Implements jakarta.persistence.Tuple.get.

Doc from jakarta.persistence.Tuple.get.

Get the value of the tuple element to which the specified alias has been assigned.

Parameters
alias:String

alias assigned to tuple element

Returns:Object

value of the tuple element

Annotations
@Override
getback to summary
public <X> X get(int i, Class<X> type)

Implements jakarta.persistence.Tuple.get.

Doc from jakarta.persistence.Tuple.get.

Get the value of the element at the specified position in the result tuple. The first position is 0.

Parameters
i:int

position in result tuple

type:Class<X>

type of the tuple element

Returns:X

value of the tuple element

Annotations
@Override
@SuppressWarnings:unchecked
getback to summary
public Object get(int i)

Implements jakarta.persistence.Tuple.get.

Doc from jakarta.persistence.Tuple.get.

Get the value of the element at the specified position in the result tuple. The first position is 0.

Parameters
i:int

position in result tuple

Returns:Object

value of the tuple element

Annotations
@Override
getElementsback to summary
public List<TupleElement<?>> getElements()

Implements jakarta.persistence.Tuple.getElements.

Doc from jakarta.persistence.Tuple.getElements.

Return the tuple elements.

Returns:List<TupleElement<?>>

tuple elements

Annotations
@Override
toArrayback to summary
public Object[] toArray()

Implements jakarta.persistence.Tuple.toArray.

Doc from jakarta.persistence.Tuple.toArray.

Return the values of the result tuple elements as an array.

Returns:Object[]

tuple element values

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override