Interface Reference
- All Known Subinterfaces:
StatementReference, TypedQueryReference<R>
- All Known Implementing Classes:
StaticStatementReference, StaticTypedQueryReference
A reference to a named statement or query declared via the
NamedQuery or NamedNativeQuery annotations,
or using StaticQuery or
StaticNativeQuery. An
instance of Reference is usually obtained from the
static metamodel. This interface declares operations common
to StatementReference and TypedQueryReference.- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionThe arguments supplied to the parameters of the statement or query, ornullif no arguments were supplied.getHints()A map keyed by hint name of all hints specified viaNamedQuery.hints(),NamedNativeQuery.hints(),ReadQueryOptions.hints(), orWriteQueryOptions.hints().getName()The name of the statement or query, as specified byNamedQuery.name()orNamedNativeQuery.name(), or as inferred from the name of the method annotatedStaticQueryorStaticNativeQuery.The names assigned to the supplied arguments to parameters of the statement or query, ornullif no arguments were supplied.The types of the supplied arguments to parameters of the statement or query, ornullif no arguments were supplied.The specifiedTimeout, if any, ornullif no timeout was specified.
-
Method Details
-
getName
String getName()The name of the statement or query, as specified byNamedQuery.name()orNamedNativeQuery.name(), or as inferred from the name of the method annotatedStaticQueryorStaticNativeQuery. -
getHints
A map keyed by hint name of all hints specified viaNamedQuery.hints(),NamedNativeQuery.hints(),ReadQueryOptions.hints(), orWriteQueryOptions.hints().Any attempted mutation of the returned map results in an
UnsupportedOperationException. -
getParameterTypes
The types of the supplied arguments to parameters of the statement or query, ornullif no arguments were supplied. Arguments are present when this is a reference to a statement or query declared using an annotation of a method.Any mutation of the returned list results in an
UnsupportedOperationException.- Since:
- 4.0
-
getParameterNames
The names assigned to the supplied arguments to parameters of the statement or query, ornullif no arguments were supplied. Arguments are present when this is a reference to a statement or query declared using an annotation of a method. If the query has named parameters, these are interpreted as the parameter names. Otherwise, if the query has positional parameters, they are ignored.Any mutation of the returned list results in an
UnsupportedOperationException.- Since:
- 4.0
-
getArguments
The arguments supplied to the parameters of the statement or query, ornullif no arguments were supplied. Arguments are present when this is a reference to a query declared using an annotation of a method.- If the query has ordinal parameters, the position of an argument in this array determines its assignment to a parameter.
- If the query has named parameters, this array is aligned elementwise with the array of parameter names to obtain an assignment of arguments to parameters.
Any mutation of the returned list results in an
UnsupportedOperationException.- Since:
- 4.0
- See Also:
-
getTimeout
-