|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.ParameterType<Long> net.sf.basedb.core.LongParameterType
public class LongParameterType
This class represent a parameter type that is a long.
This type defines a lower limit
and an upper limit
for the range of
allowed values.
Field Summary | |
---|---|
private Long |
lowerLimit
The lower limit of the parameter. |
private Long |
upperLimit
The upper limit of the parameter. |
Constructor Summary | |
---|---|
LongParameterType()
Create a new long parameter type, without any limits and allowing null values. |
|
LongParameterType(Long lowerLimit,
Long upperLimit,
Long defaultValue,
boolean notNull)
Create a new long parameter type. |
|
LongParameterType(Long lowerLimit,
Long upperLimit,
Long defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
List<Long> items)
|
Method Summary | |
---|---|
Long |
getLowerLimit()
Get the lowest valid value of the parameter. |
Long |
getUpperLimit()
Get the highest valid value of the parameter. |
(package private) LongParameterValueData |
newParameterValueData()
Create a new LongParameterValueData object. |
String |
toString()
|
(package private) void |
validateValue(String name,
Long 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 Long lowerLimit
private final Long upperLimit
Constructor Detail |
---|
public LongParameterType()
public LongParameterType(Long lowerLimit, Long upperLimit, Long defaultValue, boolean notNull)
lowerLimit
- The lowest allowed value, or null to have no limitupperLimit
- The highest allowed value, or null to have no limitdefaultValue
- Default value for the parameter.notNull
- FALSE if nulls values are allowed, TRUE otherwisepublic LongParameterType(Long lowerLimit, Long upperLimit, Long defaultValue, boolean notNull, int multiplicity, int width, int height, List<Long> items)
Method Detail |
---|
public String toString()
toString
in class Object
void validateValue(String name, Long value) throws InvalidDataException
validateValue
in class ParameterType<Long>
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 valuesLongParameterValueData newParameterValueData()
LongParameterValueData
object.
newParameterValueData
in class ParameterType<Long>
public Long getLowerLimit()
public Long getUpperLimit()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |