|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.core.ParameterType<Integer>
net.sf.basedb.core.IntegerParameterType
public class IntegerParameterType
This class represent a parameter type that is an integer.
This type defines a lower limit
and an upper limit for the range of
allowed values.
| Field Summary | |
|---|---|
private Integer |
lowerLimit
The lower limit of the parameter. |
private Integer |
upperLimit
The upper limit of the parameter. |
| Constructor Summary | |
|---|---|
IntegerParameterType()
Create a new integer parameter type, without any limits and allowing null values. |
|
IntegerParameterType(Integer lowerLimit,
Integer upperLimit,
Integer defaultValue,
boolean notNull)
Create a new integer parameter type. |
|
IntegerParameterType(Integer lowerLimit,
Integer upperLimit,
Integer defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
List<Integer> items)
|
|
| Method Summary | |
|---|---|
Integer |
getLowerLimit()
Get the lowest valid value of the parameter. |
Integer |
getUpperLimit()
Get the highest valid value of the parameter. |
(package private) IntegerParameterValueData |
newParameterValueData()
Create a new IntegerParameterValueData object. |
String |
toString()
|
(package private) void |
validateValue(String name,
Integer value)
Checks if the value is within the range given by the upper and lower limits if those are given. |
| Methods inherited from class net.sf.basedb.core.ParameterType |
|---|
getDefaultValue, getEnumeration, getHeight, getItems, getMultiplicity, getNotNull, getParameterClass, getValueType, getWidth, isEnumeration, validate, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final Integer lowerLimit
private final Integer upperLimit
| Constructor Detail |
|---|
public IntegerParameterType()
public IntegerParameterType(Integer lowerLimit,
Integer upperLimit,
Integer defaultValue,
boolean notNull)
lowerLimit - The lowest allowed value, or null to have no limitupperLimit - The highest allowed value, or null to have no limitdefaultValue - The default value for this parameternotNull - FALSE if nulls values are allowed, TRUE otherwise
public IntegerParameterType(Integer lowerLimit,
Integer upperLimit,
Integer defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
List<Integer> items)
| Method Detail |
|---|
public String toString()
toString in class Object
void validateValue(String name,
Integer value)
throws InvalidDataException
validateValue in class ParameterType<Integer>value - The value to testname - The name of the parameter, use the name if there is need to
throw an exception
InvalidDataException - If the value is outside the range of allowed valuesIntegerParameterValueData newParameterValueData()
IntegerParameterValueData object.
newParameterValueData in class ParameterType<Integer>public Integer getLowerLimit()
public Integer getUpperLimit()
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||