public class HourIntervalsPropertyType extends PropertyType<HourIntervalsVO>
9-11;15-16;20-22. | Constructor Example | Comments | ||
|---|---|---|---|
Property<HourIntervalsVO> A_PROPERTY = |
Creates HourIntervalsPropertyType with no default value. | ||
Property<HourIntervalsVO> A_PROPERTY = |
Creates HourIntervalsPropertyType with default value in the object instance "myDefaultHoursInstance". | ||
| Type of value(s) | Examples | Result | Comments |
| Valid | 0-2 | - | Validate successfully. |
| Valid | 4-6;16-19;22-24 | - | Validate successfully. |
| Valid | 4-6;16-19 | - | Validate successfully. |
| Invalid | cow | null |
Validate will throw an exception. The resulting value is null. |
| Invalid | 20-22;13-15 | null |
|
| Invalid | x4-29 | null |
|
| Invalid | «empty string» | null |
|
| Invalid | «empty string after trim» | null |
|
| Invalid | null |
defaultValue OR null |
Validate will throw an exception. Return default value if set, otherwise null. |
HourIntervalsVO,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
HOUR_DIVIDER
The string that divides the hour values.
|
static String |
INTERVAL_DIVIDER
The string that divides the intervals.
|
static String |
TYPE
The type name string constant of HourIntervalsPropertyType.
|
| Constructor and Description |
|---|
HourIntervalsPropertyType()
Default constructor, no default value.
|
HourIntervalsPropertyType(HourIntervalsVO defaultValue)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getRestrictions()
Gets a detailed description of the PropertyType with any constraints that might influence the validation.
|
HourIntervalsVO |
validateValue(String propertyName,
String value)
Converts the string representation of to a typed value.
|
equals, getDefaultValue, getDefaultValueAsString, getDefaultValueDescription, getDescription, getDescription, getInitializationPriority, getIo, getLogger, getTypeName, hasDefaultValue, isDefaultValueValid, postGetValueProcessing, setDefaultValue, setInitializationPriority, setIo, setTypedValue, setTypeName, toString, toType, validate, validateConstraints, validateNullTypepublic static final String TYPE
public static final String INTERVAL_DIVIDER
;'.public static final String HOUR_DIVIDER
-'.public HourIntervalsPropertyType()
public HourIntervalsPropertyType(HourIntervalsVO defaultValue)
defaultValue - default value returned if property value is undefined.public HourIntervalsVO validateValue(String propertyName, String value) throws PropertyException
PropertyTypevalidateValue in class PropertyType<HourIntervalsVO>propertyName - the name of the property used for logging purposes. To uniquely identify the Property with validation issues.value - the string representation of the propertyPropertyException - if the conversion failed.public List<String> getRestrictions()
PropertyTypegetRestrictions in class PropertyType<HourIntervalsVO>