public class ParameterMetadataImpl extends Object implements ParameterMetadata
Constructor and Description |
---|
ParameterMetadataImpl(Map<Integer,OrdinalParameterDescriptor> ordinalDescriptorMap,
Map<String,NamedParameterDescriptor> namedDescriptorMap) |
public ParameterMetadataImpl(Map<Integer,OrdinalParameterDescriptor> ordinalDescriptorMap, Map<String,NamedParameterDescriptor> namedDescriptorMap)
public Collection<QueryParameter> getPositionalParameters()
getPositionalParameters
in interface ParameterMetadata
public Collection<QueryParameter> getNamedParameters()
getNamedParameters
in interface ParameterMetadata
public int getParameterCount()
getParameterCount
in interface ParameterMetadata
public boolean containsReference(QueryParameter parameter)
containsReference
in interface ParameterMetadata
public boolean hasNamedParameters()
ParameterMetadata
hasNamedParameters
in interface ParameterMetadata
true
if there are named parameters; false
otherwise.public boolean hasPositionalParameters()
ParameterMetadata
hasPositionalParameters
in interface ParameterMetadata
true
if there are positional parameters; false
otherwise.public int getPositionalParameterCount()
ParameterMetadata
getPositionalParameterCount
in interface ParameterMetadata
public int getOrdinalParameterCount()
public Set<String> getNamedParameterNames()
ParameterMetadata
getNamedParameterNames
in interface ParameterMetadata
public OrdinalParameterDescriptor getOrdinalParameterDescriptor(int position)
position
- The position (0 based)QueryParameterException
- If the position is out of range@Deprecated public Type getOrdinalParameterExpectedType(int position)
AbstractParameterDescriptor.getExpectedType()
from the
getOrdinalParameterDescriptor(int)
return insteadposition
- The position@Deprecated public int getOrdinalParameterSourceLocation(int position)
OrdinalParameterDescriptor.getPosition()
from the
getOrdinalParameterDescriptor(int)
return insteadposition
- The positionpublic <T> QueryParameter<T> getQueryParameter(String name)
getQueryParameter
in interface ParameterMetadata
public <T> QueryParameter<T> getQueryParameter(Integer position)
getQueryParameter
in interface ParameterMetadata
public <T> QueryParameter<T> resolve(Parameter<T> param)
resolve
in interface ParameterMetadata
public NamedParameterDescriptor getNamedParameterDescriptor(String name)
name
- The name of the parameter to locateQueryParameterException
- If the name could not be resolved to a named parameterpublic void visitRegistrations(Consumer<QueryParameter> action)
visitRegistrations
in interface ParameterMetadata
@Deprecated public Type getNamedParameterExpectedType(String name)
AbstractParameterDescriptor.getExpectedType()
from the
getNamedParameterDescriptor(java.lang.String)
return insteadname
- The name of the parameter@Deprecated public int[] getNamedParameterSourceLocations(String name)
AbstractParameterDescriptor.getPosition()
from the
getNamedParameterDescriptor(java.lang.String)
return insteadname
- The name of the parameterpublic Set<QueryParameter<?>> collectAllParameters()
collectAllParameters
in interface ParameterMetadata
public Set<Parameter<?>> collectAllParametersJpa()
collectAllParametersJpa
in interface ParameterMetadata
Copyright © 2019 JBoss by Red Hat. All rights reserved.