public class NamedParameterDescriptor extends java.lang.Object implements QueryParameter
Constructor and Description |
---|
NamedParameterDescriptor(java.lang.String name,
Type expectedType,
int[] sourceLocations,
boolean jpaStyle)
Constructs a NamedParameterDescriptor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
Type |
getExpectedType() |
java.lang.String |
getName() |
java.lang.Class |
getParameterType() |
java.lang.Integer |
getPosition() |
int[] |
getSourceLocations() |
Type |
getType()
Get the Hibernate Type associated with this parameter.
|
int |
hashCode() |
boolean |
isJpaPositionalParameter()
JPA has a different definition of positional parameters than what legacy Hibernate HQL had.
|
boolean |
isJpaStyle() |
void |
resetExpectedType(Type type)
Set the parameters expected type
|
public NamedParameterDescriptor(java.lang.String name, Type expectedType, int[] sourceLocations, boolean jpaStyle)
name
- The name of the parameterexpectedType
- The expected type of the parameter, according to the translatorsourceLocations
- The locations of the named parameters (aye aye aye)jpaStyle
- Was the parameter a JPA style "named parameter"?public java.lang.String getName()
getName
in interface javax.persistence.Parameter
public java.lang.Integer getPosition()
getPosition
in interface javax.persistence.Parameter
public java.lang.Class getParameterType()
getParameterType
in interface javax.persistence.Parameter
public boolean isJpaPositionalParameter()
QueryParameter
isJpaPositionalParameter
in interface QueryParameter
true
if this is a JPA-style positional parameter; false
would indicate
we have either a named parameter (Parameter.getName()
would return a non-null
value) or a native
Hibernate positional parameter.public Type getExpectedType()
public int[] getSourceLocations()
public boolean isJpaStyle()
public void resetExpectedType(Type type)
type
- The new expected typepublic Type getType()
QueryParameter
getType
in interface QueryParameter
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.