ijgen.generator.annotations
Annotation Type Constraints


@Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface Constraints

Annotation describing set of constraints for a field in domain class. Set of attributes contains: 1. minLength: minimum length for this field. Not mandatory, default value is 0. Example: minLength=5 means that field should be at least 5 symbols long 2. maxLength: maximum length for this field. Not mandatory, default value is 0. Example: maxLength=10 means that field should be at most 10 symbols long 3. required: indicates whether this field is required or not. Not mandatory, default value is false. Example: required=true means that field is required 4. regExpRule: regular expression describing arbitrary validation rule Not mandatory, default value is empty string. Example: regExpRule="\d" means that field should be a digit

Author:
Detelin Zlatev

Optional Element Summary
 int maxLength
           
 int minLength
           
 java.lang.String regExpRule
           
 boolean required
           
 

required

public abstract boolean required
Default:
false

minLength

public abstract int minLength
Default:
0

maxLength

public abstract int maxLength
Default:
0

regExpRule

public abstract java.lang.String regExpRule
Default:
""


Copyright © 2010 Detelin Zlatev. All Rights Reserved.