Package org.hibernate.param
Class AbstractExplicitParameterSpecification
java.lang.Object
org.hibernate.param.AbstractExplicitParameterSpecification
- All Implemented Interfaces:
ExplicitParameterSpecification,ParameterSpecification
- Direct Known Subclasses:
NamedParameterSpecification,PositionalParameterSpecification
public abstract class AbstractExplicitParameterSpecification
extends Object
implements ExplicitParameterSpecification
Convenience base class for explicitly defined query parameters.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractExplicitParameterSpecification(int sourceLine, int sourceColumn) Constructs an AbstractExplicitParameterSpecification. -
Method Summary
Modifier and TypeMethodDescriptionGet the type which we are expeting for a bind into this parameter based on translated contextual information.intRetrieves the column number (within theExplicitParameterSpecification.getSourceLine()) where this parameter occurs.intRetrieves the line number on which this parameter occurs in the source query.voidsetExpectedType(Type expectedType) Injects the expected type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.param.ParameterSpecification
bind, renderDisplayInfo
-
Constructor Details
-
AbstractExplicitParameterSpecification
protected AbstractExplicitParameterSpecification(int sourceLine, int sourceColumn) Constructs an AbstractExplicitParameterSpecification.- Parameters:
sourceLine- SeegetSourceLine()sourceColumn- SeegetSourceColumn()
-
-
Method Details
-
getSourceLine
public int getSourceLine()Retrieves the line number on which this parameter occurs in the source query.- Specified by:
getSourceLinein interfaceExplicitParameterSpecification- Returns:
- The line number.
-
getSourceColumn
public int getSourceColumn()Retrieves the column number (within theExplicitParameterSpecification.getSourceLine()) where this parameter occurs.- Specified by:
getSourceColumnin interfaceExplicitParameterSpecification- Returns:
- The column number.
-
getExpectedType
Get the type which we are expeting for a bind into this parameter based on translated contextual information.- Specified by:
getExpectedTypein interfaceParameterSpecification- Returns:
- The expected type.
-
setExpectedType
Injects the expected type. Called during translation.- Specified by:
setExpectedTypein interfaceParameterSpecification- Parameters:
expectedType- The type to expect.
-