|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.farrago.jdbc.param.FarragoJdbcParamDef
public class FarragoJdbcParamDef
Handles data conversion for a dynamic parameter (refactored from FarragoJdbcEngineParamDef) Enforces constraints on parameters. The constraints are:
TODO: Actually enfore these constraints. This class is JDK 1.4 compatible.
Field Summary | |
---|---|
(package private) FarragoParamFieldMetaData |
paramMetaData
|
(package private) String |
paramName
|
Constructor Summary | |
---|---|
FarragoJdbcParamDef(String paramName,
FarragoParamFieldMetaData paramMetaData)
|
Method Summary | |
---|---|
protected void |
checkNullable()
|
protected void |
checkRange(BigInteger value,
BigInteger min,
BigInteger max)
|
protected void |
checkRange(double value,
double min,
double max)
|
protected void |
checkRange(long value,
long min,
long max)
|
FarragoParamFieldMetaData |
getParamMetaData()
|
String |
getParamName()
|
protected EigenbaseException |
newInvalidFormat(Object x)
Returns an error that the value cannot be converted to the desired SQL type. |
protected EigenbaseException |
newInvalidType(Object x)
Returns an error that the value is not valid for the desired SQL type. |
protected EigenbaseException |
newNotNullable()
Returns an error that the value is not nullable |
protected EigenbaseException |
newValueOutOfRange(Object x)
Returns an error the value is out of range and cannot be converted to the desired SQL type. |
protected EigenbaseException |
newValueTooLong(Object x)
Returns an error the value is too long to be converted to the desired SQL type. |
Object |
scrubValue(Object x)
|
Object |
scrubValue(Object x,
Calendar cal)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final FarragoParamFieldMetaData paramMetaData
final String paramName
Constructor Detail |
---|
FarragoJdbcParamDef(String paramName, FarragoParamFieldMetaData paramMetaData)
Method Detail |
---|
public String getParamName()
public FarragoParamFieldMetaData getParamMetaData()
public Object scrubValue(Object x)
public Object scrubValue(Object x, Calendar cal)
protected void checkNullable()
protected void checkRange(BigInteger value, BigInteger min, BigInteger max)
protected void checkRange(long value, long min, long max)
protected void checkRange(double value, double min, double max)
protected EigenbaseException newInvalidType(Object x)
protected EigenbaseException newNotNullable()
protected EigenbaseException newInvalidFormat(Object x)
protected EigenbaseException newValueTooLong(Object x)
protected EigenbaseException newValueOutOfRange(Object x)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |