Class FieldDefinition
java.lang.Object
com.echothree.util.common.validation.FieldDefinition
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of FieldDefinitionFieldDefinition
(FieldDefinition fieldDefinition) Creates a new instance of FieldDefinitionFieldDefinition
(String fieldName, FieldType fieldType, Boolean isRequired, Long minimumValue, Long maximumValue) Creates a new instance of FieldDefinition -
Method Summary
Modifier and TypeMethodDescriptionGet the current maximumValueGet the current minimumValuevoid
setFieldName
(String fieldName) fieldName is a colon separated list of values.void
setFieldType
(FieldType fieldType) void
setIsRequired
(Boolean isRequired) void
setMaximumValue
(Long maximumValue) maximumValue has two meanings.void
setMinimumValue
(Long minimumValue) minimumValue has two meanings.
-
Constructor Details
-
FieldDefinition
public FieldDefinition(String fieldName, FieldType fieldType, Boolean isRequired, Long minimumValue, Long maximumValue) Creates a new instance of FieldDefinition -
FieldDefinition
Creates a new instance of FieldDefinition -
FieldDefinition
public FieldDefinition()Creates a new instance of FieldDefinition
-
-
Method Details
-
setFieldName
fieldName is a colon separated list of values. The first value should be the name of the field in the submitted form. Following that, there may be zero or more values that should be in the format "name,field" - where name is the name of the parameter, and field is the form field that the parameter's value may be found in. For example: "unitPrice:currencyIsoName,currencyIsoName" -
getFieldName
-
setFieldType
-
getFieldType
-
setIsRequired
-
getIsRequired
-
setMinimumValue
minimumValue has two meanings. When dealing with Integers or Longs, it sets a lower limit for the acceptable value of the field, if its not equal to null. However, if the field is a String, it will set a minimum length required for the String, if its not equal to null.- Parameters:
minimumValue
- The new minimumValue, may be null
-
getMinimumValue
Get the current minimumValue- Returns:
- The current minimumValue, may be null
-
setMaximumValue
maximumValue has two meanings. When dealing with Integers or Longs, it sets an upper limit for the acceptable value of the field, if its not equal to null. However, if the field is a String, it will set a maximum length for the String, if its not equal to null.- Parameters:
maximumValue
- The new maximumValue, may be null
-
getMaximumValue
Get the current maximumValue- Returns:
- The current maximumValue, may be null
-