org.hibernate.param
Class AbstractExplicitParameterSpecification

java.lang.Object
  extended by 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
protected AbstractExplicitParameterSpecification(int sourceLine, int sourceColumn)
          Constructs an AbstractExplicitParameterSpecification.
 
Method Summary
 Type getExpectedType()
          Get the type which we are expeting for a bind into this parameter based on translated contextual information.
 int getSourceColumn()
          Retrieves the column number (within the ExplicitParameterSpecification.getSourceLine()) where this parameter occurs.
 int getSourceLine()
          Retrieves the line number on which this parameter occurs in the source query.
 void setExpectedType(Type expectedType)
          Injects the expected type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.param.ParameterSpecification
bind, renderDisplayInfo
 

Constructor Detail

AbstractExplicitParameterSpecification

protected AbstractExplicitParameterSpecification(int sourceLine,
                                                 int sourceColumn)
Constructs an AbstractExplicitParameterSpecification.

Parameters:
sourceLine - See getSourceLine()
sourceColumn - See getSourceColumn()
Method Detail

getSourceLine

public int getSourceLine()
Retrieves the line number on which this parameter occurs in the source query.

Specified by:
getSourceLine in interface ExplicitParameterSpecification
Returns:
The line number.

getSourceColumn

public int getSourceColumn()
Retrieves the column number (within the ExplicitParameterSpecification.getSourceLine()) where this parameter occurs.

Specified by:
getSourceColumn in interface ExplicitParameterSpecification
Returns:
The column number.

getExpectedType

public Type getExpectedType()
Get the type which we are expeting for a bind into this parameter based on translated contextual information.

Specified by:
getExpectedType in interface ParameterSpecification
Returns:
The expected type.

setExpectedType

public void setExpectedType(Type expectedType)
Injects the expected type. Called during translation.

Specified by:
setExpectedType in interface ParameterSpecification
Parameters:
expectedType - The type to expect.


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.