public class ConstraintOnLinkMaxOneFromLeft extends PropertyBusinessRule<LinkObject<? super DataObjectDefinition,? super DataObjectDefinition>>
Constructor and Description |
---|
ConstraintOnLinkMaxOneFromLeft(LinkObject<?,?> parentproperty,
boolean replaceifmorethanone)
creates a constraint allowing only one link from left
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getImportstatements() |
LinkObject<?,?> |
getParentproperty() |
boolean |
isReplaceifmorethanone() |
void |
writeInitialization(SourceGenerator sg) |
isUserimplemented
changeName, cleanName, equals, getName
public ConstraintOnLinkMaxOneFromLeft(LinkObject<?,?> parentproperty, boolean replaceifmorethanone)
parentproperty
- link object propertyreplaceifmorethanone
- if true, if an old link existed, it will be
removed, if false, if a link already exists, an
error is thrownpublic 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>>
public LinkObject<?,?> getParentproperty()
public boolean isReplaceifmorethanone()