2.17.2: 2011-06-17

net.sf.basedb.core
Class NumberOutOfRangeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.sf.basedb.core.BaseException
                  extended by net.sf.basedb.core.InvalidDataException
                      extended by net.sf.basedb.core.NumberOutOfRangeException
All Implemented Interfaces:
Serializable

public class NumberOutOfRangeException
extends InvalidDataException

This exception is thrown when an item's field or a parameter that only accepts numeric values within a certain range are passed a value outside that range.

Version:
2.0
Author:
Nicklas
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
Constructor Summary
NumberOutOfRangeException()
          Create a new NumberOutOfRangeException object.
NumberOutOfRangeException(String msg)
           
NumberOutOfRangeException(String field, double theValue, double minOrMaxValue, boolean tooBig)
          Create a new NumberOutOfRangeException object when the parameter is less than a minimum or greater than a maximum value.
NumberOutOfRangeException(String field, double theValue, double minValue, double maxValue)
          Create a new NumberOutOfRangeException object when the parameter is outside both a minimum and a maximum allowed value.
NumberOutOfRangeException(String field, long theValue, long minOrMaxValue, boolean tooBig)
          Create a new NumberOutOfRangeException object when the parameter is less than a minimum or greater than a maximum value.
NumberOutOfRangeException(String field, long theValue, long minValue, long maxValue)
          Create a new NumberOutOfRangeException object when the parameter is outside both a minimum and a maximum allowed value.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

NumberOutOfRangeException

public NumberOutOfRangeException()
Create a new NumberOutOfRangeException object.


NumberOutOfRangeException

public NumberOutOfRangeException(String msg)

NumberOutOfRangeException

public NumberOutOfRangeException(String field,
                                 long theValue,
                                 long minOrMaxValue,
                                 boolean tooBig)
Create a new NumberOutOfRangeException object when the parameter is less than a minimum or greater than a maximum value.

Parameters:
field - The name of the field or parameter that is invalid
theValue - The value that is invalid
minOrMaxValue - The minimum or maximum allowed value
tooBig - TRUE if the value is greater than the maximum allowed, FALSE if it is less than the minumum allowed

NumberOutOfRangeException

public NumberOutOfRangeException(String field,
                                 long theValue,
                                 long minValue,
                                 long maxValue)
Create a new NumberOutOfRangeException object when the parameter is outside both a minimum and a maximum allowed value.

Parameters:
field - The name of the field or parameter that is outside the range
theValue - The value that is outside the range
minValue - The minimum allowed value of the number
maxValue - The maximum allowed value of the number

NumberOutOfRangeException

public NumberOutOfRangeException(String field,
                                 double theValue,
                                 double minOrMaxValue,
                                 boolean tooBig)
Create a new NumberOutOfRangeException object when the parameter is less than a minimum or greater than a maximum value.

Parameters:
field - The name of the field or parameter that is invalid
theValue - The value that is invalid
minOrMaxValue - The minimum or maximum allowed value
tooBig - TRUE if the value is greater than the maximum allowed, FALSE if it is less than the minumum allowed

NumberOutOfRangeException

public NumberOutOfRangeException(String field,
                                 double theValue,
                                 double minValue,
                                 double maxValue)
Create a new NumberOutOfRangeException object when the parameter is outside both a minimum and a maximum allowed value.

Parameters:
field - The name of the field or parameter that is outside the range
theValue - The value that is outside the range
minValue - The minimum allowed value of the number
maxValue - The maximum allowed value of the number

2.17.2: 2011-06-17