public class ChoiceFieldLocationHelperDefinition extends LocationHelperDefinition
Constructor and Description |
---|
ChoiceFieldLocationHelperDefinition(DataObjectDefinition parent,
ModuleDomain defaultdomain,
ChoiceField choicefield)
creates a choice field location helper configured with default domain
|
Modifier and Type | Method and Description |
---|---|
void |
addChoiceMapping(ChoiceValue choice,
ModuleDomain domain)
adds a specific mapping between a choice value and a domain
|
void |
generateLocationHelper(SourceGenerator sg,
Module module)
generates the java code to configure the location helper
|
getParent
public ChoiceFieldLocationHelperDefinition(DataObjectDefinition parent, ModuleDomain defaultdomain, ChoiceField choicefield)
parent
- parent data objectdefaultdomain
- the domain to choose if no mapping exists for this
choicechoicefield
- the choice field to use on an objectpublic void addChoiceMapping(ChoiceValue choice, ModuleDomain domain)
choice
- choice value in the choice field for the objectdomain
- domain to map to when the field has this choice valuepublic void generateLocationHelper(SourceGenerator sg, Module module) throws java.io.IOException
LocationHelperDefinition
generateLocationHelper
in class LocationHelperDefinition
sg
- source generatormodule
- parent modulejava.io.IOException
- if anything bad happens while writing the source code