public class ConstraintOnLinkObjectSameChoiceFieldValue extends PropertyBusinessRule<LinkObject<? super DataObjectDefinition,? super DataObjectDefinition>>
Constructor and Description |
---|
ConstraintOnLinkObjectSameChoiceFieldValue(LinkObject<?,?> linkproperty,
java.lang.String leftobjectchoicefieldname,
java.lang.String rightobjectchoicefieldname)
creates a constraint allowing creation of links only if choice fields on both
sides have the same value
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getImportstatements() |
ChoiceField |
getLeftchoicefield() |
ChoiceField |
getRightchoicefield() |
void |
writeInitialization(SourceGenerator sg) |
isUserimplemented
changeName, cleanName, equals, getName
public ConstraintOnLinkObjectSameChoiceFieldValue(LinkObject<?,?> linkproperty, java.lang.String leftobjectchoicefieldname, java.lang.String rightobjectchoicefieldname)
linkproperty
- a link property already linked to both
objectsleftobjectchoicefieldname
- the name in upper case of the left object
choice field (should already be created on
the object)rightobjectchoicefieldname
- the name in upper case of the right object
choice field (should already be created on
the object)public ChoiceField getLeftchoicefield()
public ChoiceField getRightchoicefield()
public void writeInitialization(SourceGenerator sg) throws java.io.IOException
writeInitialization
in class PropertyBusinessRule<LinkObject<? super DataObjectDefinition,? super DataObjectDefinition>>
sg
- source generatorjava.io.IOException
- if anything bad happens while writing the filepublic java.lang.String[] getImportstatements()
getImportstatements
in class PropertyBusinessRule<LinkObject<? super DataObjectDefinition,? super DataObjectDefinition>>