public class MultiFieldConstraint extends Named
Constructor and Description |
---|
MultiFieldConstraint(java.lang.String name,
DataObjectDefinition object)
Allows to set a constraint between fields.
|
Modifier and Type | Method and Description |
---|---|
void |
addField(Field field)
allows to set a field in the sequence of constraint (add 1st field like
country first, then 2nd field like region, then 3rd field like city...).
|
void |
generateFile(SourceGenerator sg,
Module module)
generates the multi-field constraint to file.
|
changeName, cleanName, equals, getName
public MultiFieldConstraint(java.lang.String name, DataObjectDefinition object)
name
- name of the constraint, should be unique for the moduleobject
- the data object on which the constraint is setpublic void addField(Field field)
field
- the field to enterpublic void generateFile(SourceGenerator sg, Module module) throws java.io.IOException
sg
- source generatormodule
- parent modulejava.io.IOException
- if anything bad happens while writing the file