ComboboxHolder

public class ComboboxHolder extends FieldHolder

The main purpose of this class is to make it easier to find out what kind of type should be used when the field is added to the class definition.

Constructors

ComboboxHolder

public ComboboxHolder(Field field)

ComboboxHolder

public ComboboxHolder(Entity entity, Field field)

ComboboxHolder

public ComboboxHolder(EntityDto entity, FieldDto field)

ComboboxHolder

public ComboboxHolder(Class<?> entityClass, FieldDto field)

ComboboxHolder

public ComboboxHolder(List<? extends Pair<String, String>> metadata, List<? extends Pair<String, ?>> settings, String className, String fieldName)

Methods

getEnumName

public String getEnumName()
Returns:enum name, specified in the field metadata, or default name, if not explicitly provided

getTypeClassName

public String getTypeClassName()
Returns:fully qualified class name, that handles this combobox in the backend

getUnderlyingType

public String getUnderlyingType()
Returns:fully qualified class name, of the actual java type of this combobox field

getValues

public String[] getValues()
Returns:an array of possible values for this combobox

isAllowMultipleSelections

public boolean isAllowMultipleSelections()
Returns:true, if this combobox allows selecting multiple values; false otherwise

isAllowUserSupplied

public boolean isAllowUserSupplied()
Returns:true, if this combobox allows user supplied values; false otherwise

isCollection

public boolean isCollection()
Returns:true, if this combobox is handled by a collection type in the backend; false otherwise

isEnum

public boolean isEnum()
Returns:true, if this combobox does not allow user supplied values and allows selecting only single value; false otherwise

isEnumCollection

public boolean isEnumCollection()
Returns:true, if this combobox does not allow user supplied values and allows selecting multiple values; false otherwise

isString

public boolean isString()
Returns:true, if this combobox allows user supplied values and allows selecting only single value; false otherwise

isStringCollection

public boolean isStringCollection()
Returns:true, if this combobox allows user supplied values and allows selecting multiple values; false otherwise