net.sf.farrago.session
Interface FarragoSessionStmtParamDef

All Known Implementing Classes:
FarragoJdbcEngineParamDef

public interface FarragoSessionStmtParamDef

FarragoSessionStmtParamDef represents the definition of a dynamic parameter used within a FarragoSessionStmtContext. Instances of FarragoSessionStmtParamDef are created by a FarragoSessionStmtParamDefFactory and are used to validate dynamic parameter values.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/session/FarragoSessionStmtParamDef.java#7 $
Author:
Stephan Zuercher
See Also:
FarragoSessionStmtContext.setDynamicParam(int, Object)

Method Summary
 String getParamName()
          Returns the name of this parameter.
 RelDataType getParamType()
          Returns the RelDataType of this parameter.
 Object scrubValue(Object value)
          Checks the type of a value, and throws an error if it is invalid or cannot be converted to an acceptable type.
 Object scrubValue(Object value, Calendar cal)
          Checks the type of a value, and throws an error if it is invalid or cannot be converted to an acceptable type.
 

Method Detail

getParamName

String getParamName()
Returns the name of this parameter.

Returns:
the name of this parameter.

getParamType

RelDataType getParamType()
Returns the RelDataType of this parameter.

Returns:
the RelDataType of this parameter.

scrubValue

Object scrubValue(Object value)
                  throws EigenbaseException
Checks the type of a value, and throws an error if it is invalid or cannot be converted to an acceptable type.

Parameters:
value -
Returns:
value if valid; an acceptable value if a conversion is available
Throws:
EigenbaseException - if value is invalid and cannot be converted

scrubValue

Object scrubValue(Object value,
                  Calendar cal)
                  throws EigenbaseException
Checks the type of a value, and throws an error if it is invalid or cannot be converted to an acceptable type.

Parameters:
value -
cal - Calendar to use
Returns:
value if valid; an acceptable value if a conversion is available
Throws:
EigenbaseException - if value is invalid and cannot be converted