|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.cafesoft.core.field.AbstractFieldInfo
|
+--com.cafesoft.core.field.StringFieldInfo
String implementation of the FieldInfo object. This implementation is a subclass of the AbstractFieldInfo object. In addition, this class includes several methods that are specific to string values. Such as minimum length and maximum length values allowed within a field.
AbstractFieldInfo,
FieldInfo| Constructor Summary | |
StringFieldInfo(String name,
Object defaultValue,
boolean allowNull,
boolean isRequired)
Create String FieldInfo. |
|
| Method Summary | |
FieldType |
getFieldType()
Get the FieldType. |
int |
getMaximumLength()
Get the maximum required length of the Field. |
int |
getMinimumLength()
Get the minimum required length of the Field. |
boolean |
hasMaximumLength()
Determine if the Field has a maximum length requirement. |
boolean |
hasMinimumLength()
Determine if the Field has a minimum length requirement. |
void |
setMaximumLength(String value)
Set the maximum required length of the Field. |
void |
setMinimumLength(String value)
Set the minimum required length of the Field. |
String |
toString()
Get a String representation of this object. |
| Methods inherited from class com.cafesoft.core.field.AbstractFieldInfo |
allowNull, getDefaultValue, getFieldValidationRule, getFieldValueOptions, getName, isRequired, setFieldValidationRule, setFieldValueOptions |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public StringFieldInfo(String name,
Object defaultValue,
boolean allowNull,
boolean isRequired)
name - the name of the FieldInfo.defaultValue - the default value of the FieldInfo object.allowNull - boolean flag that determines if null is a
valid value.isRequired - boolean flag that determines if a value is required.| Method Detail |
public FieldType getFieldType()
getFieldType in interface FieldInfogetFieldType in class AbstractFieldInfopublic boolean hasMinimumLength()
public int getMinimumLength()
public void setMinimumLength(String value)
throws IllegalConstraintException
value - a String containing the minimum required String
length. This value must be greater than or equal to 0.
IllegalConstraintException - if value is not a parsable integer
value, or if the integer value is less than 0.public boolean hasMaximumLength()
public int getMaximumLength()
public void setMaximumLength(String value)
throws IllegalConstraintException
value - a String containing the maximum required String
length. This value must be greater than or equal to 0.
IllegalConstraintException - if value is not a parsable integer
value, or if the integer value is less than 0, or if the
maximum value is less than the minimum value.public String toString()
toString in class AbstractFieldInfo
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||