public class FieldValidation
extends java.lang.Object
Common field validation and evaluation
Constructor and Description |
---|
FieldValidation() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
eval(ObjectField f,
ObjectDB obj,
int context,
java.lang.String[] row)
Calculated field evaluation
|
static java.util.Vector<java.lang.String> |
validate(ObjectField f,
ObjectDB obj,
Processus process,
Grant g)
Field common validation, return errors such as :
- ERR_REQUIRED: mandatory - ERR_NUMBER: not numeric - ERR_DATE: invalid date - ERR_TIME: invalid time - ERR_DATETIME: invalid datetime - ERR_FLOAT: not a decimal - ERR_REGEXP: not match expression - ERR_ENUM: code not exists in list of values/states model |
static java.util.Vector<java.lang.String> |
validateFilter(ObjectField f,
ObjectDB obj,
Processus process,
Grant g)
Field common validation, return errors such as :
- ERR_SEARCHREQUIRED: mandatory |
static java.util.Vector<java.lang.String> |
validateType(ObjectField f,
java.lang.String val,
ObjectDB obj,
Processus process)
Field type validation, return errors such as :
- ERR_NUMBER: not numeric - ERR_DATE: invalid date - ERR_TIME: invalid time - ERR_DATETIME: invalid datetime - ERR_FLOAT: not a decimal - ERR_REGEXP: not match expression - ERR_ENUM: code not exists in list of values/states model |
public static java.util.Vector<java.lang.String> validate(ObjectField f, ObjectDB obj, Processus process, Grant g)
f
- field definition and current valueobj
- optional objectprocess
- optional processusg
- user rightspublic static java.util.Vector<java.lang.String> validateType(ObjectField f, java.lang.String val, ObjectDB obj, Processus process)
f
- field definitionval
- value to testobj
- optional object (implements the validation method of external type)process
- optional processus (implements the validation method of external type)public static java.util.Vector<java.lang.String> validateFilter(ObjectField f, ObjectDB obj, Processus process, Grant g)
f
- field definition with current filterobj
- optional objectprocess
- optional processusg
- user rightspublic static java.lang.String eval(ObjectField f, ObjectDB obj, int context, java.lang.String[] row)
f
- fieldobj
- objectrow
- a record of list (or null to use a selected record)context
- ContextCopyright (c)2006-2014 Simplicite Software. All Rights Reserved.