Class DataDescriptorColumn

java.lang.Object
com.jbstrap.core.meta.DataDescriptorColumn

public class DataDescriptorColumn extends Object

DataDescriptor Column class

Data source columns are created by instantiating and setting this class and also by using an XML descriptor. In case the DataDescriptor columns are created from code, the columns must be added to an existing DataDescriptor. Read the class description DataDescriptor on how to create DataDescriptors from code.

If DataDescriptor column are created in an XML descriptor file, the columns must be inserted between the DataDescriptor tags. Further information on XML descriptor files in the class description DataDescriptor. The present description contains the parameterization for each column.

The column tag represents the DataDescriptor columns in an XML descriptor file. Column tags are repeated several times in an XML file. The tag contains the following attributes:

Attribute nameDescriptionDefault settings
nameColumn name The name here specified must be the same as the name of the data entity or POJO class field. It is mandatory to specify the attribute.null
datatypeColumn data type designation Available data types are listed in the enum DataDescriptorColumnDatatype It is mandatory to specify the attribute.null
lengthThe maximum length of a text column If the DataDescriptor is displayed on a screen, it is not allowed to enter more characters into the field’s input box than the number here specified. The setting is ignored if the column is a text column.0
scaleNumber of digits to be stored in case of fractions The setting is ignored if the column does not contain a fraction.0
nullableMarking whether the field can take a null value. If the field cannot take a null value, it is displayed as a mandatory field on the screen. An error occurs upon form validation if no field value is specified. The parameter can take either true or false. If the value is true, the field can take a null value. It is mandatory to specify the attribute.null
primaryKeySpecifies whether the column contains a primary key. The parameter can take either true or false. If true, the column is used as a primary key. It is mandatory to specify the attribute.null
editorTypeComponent type for the field’s editor This is necessary if the DataDescriptor is to be specified in an editor. If the DataDescriptor is not displayed in an editor, it is not necessary to specify the attribute. Available values of this attribute are listed in the enum EditorType.Default editor component matching the type of the column
visibleSets the visibility of the column. Available values of this attribute are listed in the enum ColumnVisibleType.VISIBLE
calculateValueName of the Java class implementing column value calculation. The attribute is to be set if the field is a calculated one. Otherwise, the attribute is not specified. Any Java class implementing the CalculateColumnValue interface.null
recalcOnChangeThe name of other columns in the DataDescriptor whose value must be calculated if the column values change. The attribute must only be specified if the column is a calculated one and other columns are involved in the calculation.null
orderSets the column order. It is not mandatory to specify the attribute. A number in the attribute is specified which defines in what order the columns are displayed on the interface. The smaller the number, the closer the column is to the starting position. If the same number is specified for two or more columns, ordering is done based on which column was created earlier.-1
filterableSets whether the column is in the filter component, that is, column filtering is enabled. It is not mandatory to specify the attribute. The attribute can take either true or false. If true is set, the column is displayed in the list of filter columns among the filter components.true

Possible values of the column tag, to be specified by nested elements:
  • title

    Sets the DataDescriptor label It is not mandatory to specify this setting. If no title is set for the DataDescriptor, the properties file is searched for a label. You can use the following format to specify the label key: [data source name].[colum name] E.g.: ds1.column1=Column 1 title

    If the parameter is specified, you can enter a static text in which case this text is displayed in all languages (irrespective of language settings) or specify the column label key to be used in the properties file. In this case the key in the properties file must be entered between curly braces {}.

    Examples:
     <title>
            This is column title
     </title>
     
    or
     <title>
            {this.is.properties.key.to.column.title}
     </title>
     
  • params

    Parameters for each component are specified here. You can check the component class description to find out how components expect parameters. Parameters are also provided in the enum description EditorType for editor components.

    Parameters are specified by nested param tags. These tags must also include the “name” attribute the parameter name as its value. The parameter value must be set as the tag value.

    Examples:
     <param name="placeholder">The placeholder text</param>
     
  • values

    This setting enables you to assign a static value set to editor components based on value sets. Components like this are: ComboboxItem or the RadioButtonItem.

    Values in the value set are specified by nesting value tags into the component tags. The tag attribute is set as “data” and the data value as its value. A data value is a value that is used to select the component value and it is saved along with the record and be included in the database.
    There are two options to specify the displayed value: Either specify it as a static text, this makes the text to appear independently of language settings or specify a key for the properties file, making it possible to find the value in such a file. In this case the key is entered between curly braces {}.
    Example:

     <values>
            <value data="1">This is the static text value</value>
            <value data="2">{this.is.the.properties.key.to.the.value.text}</value>
     </values>
     
    The text for value #1 in the above example is displayed as static whereas the text for the value #2 will be displayed in the user’s language if the properties files are correctly configured. Further information on language settings in the class MessageSourceAPI.
  • filters

    Column filter setting. There are general settings valid for all types of filters, or settings for each filter type. If the XML contains both options, type-specific filter settings are validated more strictly than other settings.

    Further filter tags can be placed inside this tag, containing custom filter settings such as:
    Filter tag attributes:

    Attribute nameDescriptionDefault settings
    editorTypeEditor type of the input field used to specify a filter value in the filter component. Usable editor types are listed in the enum EditorType. The editor type specified here applies for all filter typesFilter component type for the column
    defaultOperatorSets the default operator type used to filter the column. Usable operator types are contained in the enum OperatorType. The editor type specified here applies for all filter types.In case of a text column the value is ‘LIKE’, otherwise ‘EQUALS’
    wildCardWildcard character used to filter the column. The setting is only applicable for a text column, all other column types are not supported. The wildcard character specified here applies for all filter types.null

    Possible values of the filter tag, to be specified by nested elements:
    • operators
      This setting specifies the supported operator types for the column in a filter component. Custom operator types must be specified between ‘operator’ tags where each operator type is entered as the tag value. Supported operator types are listed in the enum OperatorType. Operator types specified here are applicable for all filter types.All operator types for the data type
    • params
      The input field used to set the filter value for a filter component is specified here. Parameterizing is done the same way as that of a component, which means each parameter must be entered using a ‘param’ tag where the tag’s ‘name’ attribute must take the parameter name and the tag value is the value of the parameter to be set. The parameters specified here are applicable for all filter types.
    • values
      This parameter enables you to assign a value set to the input field used in the filter. Specifying a value set is done the same way as for the editor component’s value set. Each item of a value set must be entered between ‘value’ tags where the tag’s ‘name’ attribute value must be the same as the data value and the display value must be set as the tag value. Parameters specified here are applicable for all filter types.
    • filter
      This parameter enables you to set the individual filter types byplacing custom settings for each filter component inside a ‘filter’ tag.
      Filter tag attributes:
      Attribute nameDescriptionDefault settings
      typeThe name of the filter to which the settings apply Available filter types are listed in the enum FilterTypedefaultFilter
      nameThe name of the filter in case of a custom filter implementation used to identify the filter componentnull
      filterClassThe class that implements a custom filter. The specified class must extend the BaseFilter class, with full name enterednull
      editorTypeEditor type of the input field used to specify a filter value in the filter component. Available editor types are listed in the enum EditorTypeColumn editor type
      defaultOperatorSets the default operator type used to filter the column. Usable operator types are listed in the enum OperatorType In case of a text column ‘LIKE’, otherwise ‘EQUALS’
      wildCardWildcard character used to filter the column. The setting is only applicable for text columns, otherwise this setting is ignored.null

      Possible values of the filter tag, to be specified by nested elements:
      • operators
        This setting specifies the supported operator types for the column in a filter component. Custom operator types must be specified between individual “operator” tags where the tag value is the operator type. Supported operator types are listed in the enum OperatorType. Operator types specified here are applicable for all filter types.Operator types for data types
      • params
        The input field used to specify the filter value is given here. Parameterizing is done the same way as for an editor component which means each parameter must be entered between “param” tags where the tag’s “name” attribute is the parameter name and the tag value is the parameter value. The parameters specified here are applicable for all filter types.
      • values
        This parameter enables you to assign a value set to the input field used in the filter. Specifying a value set is done the same way as for an editor component’s value set. Each item of a value set must be entered between ‘value’ tags where the tag’s ‘name’ attribute value must be the same as the data value and the display value must be set as the tag value. The parameters specified here are applicable for all filter types.
Since:
4.0
Author:
JBStrap
See Also:
  • Constructor Details

    • DataDescriptorColumn

      public DataDescriptorColumn(String name, DataDescriptorColumnDatatype datatype, String dsName)
      Creates a DataDescriptor column
      Parameters:
      name - The unique column name within the DataDescriptor. The name must be the same as (the name of the field that represents a column) in the entity/POJO assigned to the DataDescriptor.
      datatype - The column type. For usable types, see the DataDescriptorColumnDatatype enum.
      dsName - The name of the DataDescriptor, that will have the column added to it.
  • Method Details

    • getColumnName

      public String getColumnName()
      Gets the name of the column
      Returns:
      The column name.
    • getOrder

      public int getOrder()
      Gets the column's order number.
      Returns:
      The column order number
    • setOrder

      public DataDescriptorColumn setOrder(int order)
      Sets the position of the column Enter a number to specify the position which determines the display order of the columns. The value is -1 if not specified. The smaller the number is, the closer to the start position the column is displayed. If two * or more columns have the same number, the display order is based on which column was added earlier to the DataDescriptor.
      Parameters:
      order - Column position value
      Returns:
      The DataDescriptor column
    • setOrder

      public DataDescriptorColumn setOrder(Long order)
      Sets the column position. Enter a number to specify the position which determines the display order of the columns. The value is -1 if not specified. The smaller the number is, the closer to the start position the column is displayed. If two or more columns have the same number, the display order is based on which column was added earlier to the DataDescriptor.
      Parameters:
      order - Column position value
      Returns:
      The DataDescriptor column
    • getDatatype

      public DataDescriptorColumnDatatype getDatatype()
      Gets column data type.
      Returns:
      Column data type
    • getLength

      public int getLength()
      Gets the columns maximum length.
      Returns:
      The columns maximum length.
    • setLength

      public DataDescriptorColumn setLength(int length)
      Sets the column's maximum length. Only interpreted when the column is a text type.
      Parameters:
      length - The column's maximum character length.
      Returns:
      The DataDescriptor column
    • setLength

      public DataDescriptorColumn setLength(Long length)
      Sets the maximum length of the column The setting is only applicable in case of text columns, otherwise it is ignored.
      Parameters:
      length - The maximum length of a column in characters
      Returns:
      The DataDescriptor column
    • getEditorType

      public EditorType getEditorType()
      Gets the column's editor type
      Returns:
      The editor type of the column
    • setEditorType

      public DataDescriptorColumn setEditorType(EditorType editorType)
      Sets the editor type of the column. If the DataDescriptor editor is currently displayed, the component specified here will be used to edit the column.
      Parameters:
      editorType - The column editor type. For editor types, see the EditorType enum.
      Returns:
      The DataDescriptor column
    • getVisibleType

      public ColumnVisibleType getVisibleType()
      Gets the column visibility type
      Returns:
      The column visibility type
    • setVisibleType

      public DataDescriptorColumn setVisibleType(ColumnVisibleType visibleType)
      Sets the visibility type of the column. The visibility type specified here will be used, both on the editor and on the list interfaces.
      Parameters:
      visibleType - The column visibility. For applicable values, see the ColumnVisibleType enum.
      Returns:
      The DataDescriptor column.
    • isNullable

      public boolean isNullable()
      Determines if the column can have a null value.
      Returns:
      If true, the column can have a null value, otherwise false.
    • setNullable

      public DataDescriptorColumn setNullable(boolean nullable)
      Sets the column to allow null values. If a column cannot have null values, then it will appear on the interface, as a mandatory field, and if the user did not fill it out, then the form cannot be validated.
      Parameters:
      nullable - If true, the column can have null values, otherwise not.
      Returns:
      The DataDescriptor column
    • isPrimaryKey

      public boolean isPrimaryKey()
      Determines if the column contains the primary key.
      Returns:
      If true, the column contains primary key, otherwise false
    • setPrimaryKey

      public DataDescriptorColumn setPrimaryKey(boolean primaryKey)
      Sets the column to containt the primary key.
      Parameters:
      primaryKey - If true, the column will be used as the primary key, otherwise not.
      Returns:
      The DataDescriptor column
    • getParams

      public Parameters getParams()
      Gets the column parameters. The parameters specified in the DataDescriptor XML can also be accessed.
      Returns:
      Every parameter of the column
    • addParam

      public DataDescriptorColumn addParam(String name, String value)
      Adds a parameter to the column.
      Parameters:
      name - The name of the parameter to be added to the column. If the parameter name is already used on the column, it will be overwritten.
      value - The parameter value
      Returns:
      The DataDescriptor column
    • setParam

      public DataDescriptorColumn setParam(Parameters params)
      Sets the column parameters. If this method is used, the previous parameter settings will be lost.
      Parameters:
      params - The column parameters.
      Returns:
      The DataDescriptor column
    • getParam

      public String getParam(String name)
      Gets the column parameter vale, specified by the parameter name.
      Parameters:
      name - The name of the parameter.
      Returns:
      The value of the specified parameter, or null if not found.
    • getTitle

      public String getTitle(String language)
      Gets column label using the specified language.
      Parameters:
      language - Language code used to get the label
      Returns:
      Label corresponding to language code If no label is found for the specified language, the default language’s label is returned. The default language of the framework is set via the JBStrap parameter JBStrapParamType.DEFAULT_LANGUAGE.
    • setTitle

      public DataDescriptorColumn setTitle(String title)
      Sets the column title
      Parameters:
      title - The column title
      Returns:
      The DataDescriptor column
    • getValueMap

      public Map<String,String> getValueMap(String language)
      Gets column's set of values, as a map, according to the specified language. If the specified language has no set of values assigned to it, then the default language's set of values will be returned. The default language is set by the JBStrapParamType.DEFAULT_LANGUAGE JBStrap parameter.
      Parameters:
      language - The language code
      Returns:
      The column's set of values, as a Map. The map key is the data value, the value is the displayed value. If the column has no set of values, it will return with null.
    • setValues

      public DataDescriptorColumn setValues(Map<String,String> values)
      Assigns a value set to the DataDescriptor column.
      Parameters:
      values - The DataDescriptor column’s value set as a map. The map key is a data value, the map value the displayed value. If the displayed value is language-specific, the displayed value must contain the key whose referenced data value is available in a properties file. The key must be entered between curly braces{}. If the specified map is null or empty, the column’s value set is deleted.
      Returns:
      The DataDescriptor column
    • getScale

      public int getScale()
      Counts the amount of decimal places in the column numbers.
      Returns:
      The amount of decimal places. If not applicable, it will return with 0.
    • setScale

      public DataDescriptorColumn setScale(int scale)
      Sets the amount of decimal places. If not applicable (the column doesn't contain numbers for example), this setting will be ignored.
      Parameters:
      scale - The number of decimal places.
      Returns:
      The DataDescriptor column
    • setScale

      public DataDescriptorColumn setScale(Long scale)
      Sets the amount of decimal places. If not applicable (the column doesn't contain numbers for example), this setting will be ignored.
      Parameters:
      scale - The number of decimal places.
      Returns:
      The DataDescriptor column
    • getDsName

      public final String getDsName()
      Gets the name of the DataDescriptor, that is assigned to the column.
      Returns:
      The name of the DataDescriptor
    • addClalculateValue

      public final DataDescriptorColumn addClalculateValue(Class<? extends CalculateColumnValue> calculateMethod)
      Adds the specified implementation, that is used during recalculation.
      Parameters:
      calculateMethod - The implementation of the recalculation process.
      Returns:
      The name of the DataDescriptor
    • getCalculateValue

      public final Class<? extends CalculateColumnValue> getCalculateValue()
      Gets the column recalc implementation. If the column isn't a calculated column, it will return with null null
      Returns:
      The column recalculation implementation.
    • addRecalcOnChangeColumn

      public final DataDescriptorColumn addRecalcOnChangeColumn(String columnName)
      If the column contains a calculated value, this method can be used to specify, which column will trigger a recalculation, if their values are changed. If the column is not a calculated one, this will be ignored.
      Parameters:
      columnName - The name of the column, which when changed, trigger the column to be recalculated.
      Returns:
      The DataDescriptor column
    • addRecalcOnChangeColumns

      public final DataDescriptorColumn addRecalcOnChangeColumns(String... columnNames)
      If the column contains a calculated value, this method can be used to specify, which columns will trigger a recalculation, if their values are changed. If the column is not a calculated one, this will be ignored.
      Parameters:
      columnNames - The name of the columns, which when changed, trigger the column to be recalculated.
      Returns:
      The DataDescriptor column
    • addRecalcOnChangeColumns

      public final DataDescriptorColumn addRecalcOnChangeColumns(List<String> columnNames)
      If the column contains a calculated value, this method can be used to specify, which columns will trigger a recalculation, if their values are changed. If the column is not a calculated one, this will be ignored.
      Parameters:
      columnNames - The list of the column names, which when changed, trigger the column to be recalculated.
      Returns:
      The DataDescriptor column
    • getRecalcOnCahngeColumnsList

      public final List<String> getRecalcOnCahngeColumnsList()
      Gets the list of the columns, that, when changed, will trigger a recalculation.
      Returns:
      The list containing the name of the recalc on change columns. If there are none, it will return with null.
    • setCustomFilterClass

      public DataDescriptorColumn setCustomFilterClass(String filterName, Class<? extends BaseFilter<?>> filterClass)
      If implementing a custom filter, sets the class, that contains the implementation of the fitler component
      Parameters:
      filterName - The name of the filter, used to reference the filter
      filterClass - The class implementing the filter component.
      Returns:
      The DataDescriptor column
      Throws:
      NullPointerException - If the specified class is null
    • getCustomFilterClass

      public Class<? extends BaseFilter<?>> getCustomFilterClass(String filterName)
      Gets the custom filter implementation class.
      Parameters:
      filterName - The name of the filter, used to reference the filter
      Returns:
      The custom filter implementation class.
    • setFilterEditorType

      public DataDescriptorColumn setFilterEditorType(EditorType filterEditorType)
      In case of a column filter, it is the type of the filter component’s display value editor. If not specified, the editor type of the value input field is the same as that of the column editor component.
      Parameters:
      filterEditorType - The type of the filter we want to set Usable editor types are listed in the enum EditorType.
      Returns:
      The DataDescriptor column
    • setCustomFilterEditorType

      public DataDescriptorColumn setCustomFilterEditorType(EditorType filterEditorType, String filterName)
      Specifies the editor type of the input field in a custom filter component.
      Parameters:
      filterEditorType - Editor type of the input field. Usable editor types are listed in the enum EditorType.
      filterName - Custom filter name
      Returns:
      The DataDescriptor column
      Throws:
      NullPointerException - Thrown if the parameter name of the given editor name or type is null.
    • setFilterEditorType

      public DataDescriptorColumn setFilterEditorType(EditorType filterEditorType, FilterType filterType)
      Sets the editor type of the input field in the column’s filter component.
      Parameters:
      filterEditorType - The editor type we want to set Usable editor types are listed in the enum EditorType.
      filterType - The type of the filter we want to set Available filter types are listed in the enum FilterType.
      Returns:
      The DataDescriptor column
      Throws:
      NullPointerException - Thrown if the specified editor type or filter type is null.
    • getFilterEditorType

      public EditorType getFilterEditorType()
      Queries the editor type of the column filter
      Returns:
      Editor type of the column filter
    • getFilterEditorType

      public EditorType getFilterEditorType(FilterType filterType)
      Gets the editor type of the column filter specified by the filter type.
      Parameters:
      filterType - The type of the filter we want to use to get the editor type
      Returns:
      The column filter’s editor type
    • getFilterEditorType

      public EditorType getFilterEditorType(String filterName)
      Gets the editor type of the column filter in case of a custom implementation
      Parameters:
      filterName - The name of the custom filter we want use to get the editor type
      Returns:
      Editor type of the column filter
    • setFilterWildCard

      public DataDescriptorColumn setFilterWildCard(String wildCard)
      Wildcard character used to filter the column
      Parameters:
      wildCard - Wildcard character
      Returns:
      The DataDescriptor column
    • setCustomFilterWildCard

      public DataDescriptorColumn setCustomFilterWildCard(String wildCard, String filterName)
      Sets the wildcard character used for a custom filter
      Parameters:
      wildCard - Wildcard character
      filterName - Custom filter implementation name
      Returns:
      The DataDescriptor column
    • setFilterWildCard

      public DataDescriptorColumn setFilterWildCard(String wildCard, FilterType filterType)
      Sets the wildcard character for the specified filter type
      Parameters:
      wildCard - Wildcard character
      filterType - The type of the filter to be set. Available filter types are listed in the enum FilterType.
      Returns:
      The DataDescriptor column
    • getFilterWildCard

      public String getFilterWildCard()
      Wildcard character used to filter the column.
      Returns:
      Wildcard character used to filter the column. null if not set.
    • getFilterWildCard

      public String getFilterWildCard(FilterType filterType)
      Wildcard character used to filter the column as specified by filter type
      Parameters:
      filterType - The filter type, whose name we want to get Available filter types are listed in the enum FilterType.
      Returns:
      Wildcard character used to filter the column. null if not set.
    • getFilterWildCard

      public String getFilterWildCard(String filterName)
      Wildcard character used to filter the column, custom filter implementation
      Parameters:
      filterName - Custom filter implementation name
      Returns:
      Wildcard character used to filter the column. null if not set.
    • setFilterDefaultOperator

      public DataDescriptorColumn setFilterDefaultOperator(OperatorType operatorType)
      Sets the default operator type for column filtering
      Parameters:
      operatorType - Default operator type. Available operators are listed in the enum OperatorType.
      Returns:
      The DataDescriptor column
    • setCustomFilterDefaultOperator

      public DataDescriptorColumn setCustomFilterDefaultOperator(OperatorType operatorType, String filterName)
      Sets the default operator type for custom filter implementations
      Parameters:
      operatorType - Default operator type. Available operators are listed in the enum OperatorType.
      filterName - Custom filter implementation name
      Returns:
      The DataDescriptor column
    • setFilterDefaultOperator

      public DataDescriptorColumn setFilterDefaultOperator(OperatorType operatorType, FilterType filterType)
      Sets the default operator type for the given filter type
      Parameters:
      operatorType - Default operator type. Available operators are listed in the enum OperatorType.
      filterType - Filter type Available filter types are listed in the enum FilterType.
      Returns:
      The DataDescriptor column
    • getFilterDefaultOperator

      public OperatorType getFilterDefaultOperator()
      Gets the default operator type used to filter the column
      Returns:
      Default operator type used to filter the column or null if not specified
    • getFilterDefaultOperator

      public OperatorType getFilterDefaultOperator(FilterType filterType)
      Gets the default operator type used to filter the column
      Parameters:
      filterType - Filter type
      Returns:
      Default operator type for the column or null if there is no default operator type specified.
    • getFilterDefaultOperator

      public OperatorType getFilterDefaultOperator(String filterName)
      Gets the default operator type for custom filter implementations
      Parameters:
      filterName - Custom filter name
      Returns:
      Default operator type for the column or null if there is no default operator type specified.
    • setSupportedOperators

      public DataDescriptorColumn setSupportedOperators(List<OperatorType> operators)
      Sets the supported operator types for the column
      Parameters:
      operators - A list of supported operator types. Available operator types are listed in the enum OperatorType.
      Returns:
      The DataDescriptor column
    • setCustomSupportedOperators

      public DataDescriptorColumn setCustomSupportedOperators(List<OperatorType> operators, String filterName)
      Sets the supported operator types for a custom column filter
      Parameters:
      operators - A list of supported operator types. Available operator types are listed in the enum OperatorType.
      filterName - Custom filter name
      Returns:
      DataDescriptor column
    • setSupportedOperators

      public DataDescriptorColumn setSupportedOperators(List<OperatorType> operators, FilterType filterType)
      Sets the supported operator types for a column filter
      Parameters:
      operators - A list of supported operator types. Available operator types are listed in the enum OperatorType.
      filterType - The filter type we want to set Available filter type are listed in the enum FilterType.
      Returns:
      The DataDescriptor column
    • getSupportedOperators

      public List<OperatorType> getSupportedOperators()
      Gets the filter’s supported operator types
      Returns:
      A list of supported operators or null if no supported operators are set for the column.
    • getSupportedOperators

      public List<OperatorType> getSupportedOperators(FilterType filterType)
      Gets the filter’s supported operator types by specified filter type
      Parameters:
      filterType - The filter type for which filtering is done. Available filter type are listed in the enum FilterType.
      Returns:
      A list of supported operators or null if no supported operators are set for the column.
    • getSupportedOperators

      public List<OperatorType> getSupportedOperators(String filterName)
      Gets the list of supported operator types for a custom filter implementation
      Parameters:
      filterName - Custom filter implementation name
      Returns:
      A list of supported operators or null if no supported operators are set for the column.
    • setFilterParameters

      public DataDescriptorColumn setFilterParameters(Parameters parameters)
      Sets the parameters for the column filter’s editor component
      Parameters:
      parameters - Parameters to be set
      Returns:
      The DataDescriptor column
    • setCustomFilterParameters

      public DataDescriptorColumn setCustomFilterParameters(Parameters parameters, String filterName)
      Sets the editor field parameters for a custom filter implentation
      Parameters:
      parameters - Parameters to be set
      filterName - Custom filter implementation name
      Returns:
      The DataDescriptor column
    • setFilterParameters

      public DataDescriptorColumn setFilterParameters(Parameters parameters, FilterType filterType)
      Sets the component parameters for the specified filter type
      Parameters:
      parameters - Parameters to be set
      filterType - The type of the filter to be set Available filter type are listed in the enum FilterType.
      Returns:
      The DataDescriptor column
    • getFilterParameters

      public Parameters getFilterParameters()
      Sets the component parameters for the column filter
      Returns:
      Editor component parameters or null if no parameters are specified.
    • getFilterParameters

      public Parameters getFilterParameters(FilterType filterType)
      Gets the editor component’s parameters for the specified filter type
      Parameters:
      filterType - The filter type for which filtering is done. Available filter type are listed in the enum FilterType.
    • getFilterParameters

      public Parameters getFilterParameters(String filterName)
      Gets the editor component’s parameters for a custom filter implementation
      Parameters:
      filterName - Custom filter name
    • setFilterValueMap

      public DataDescriptorColumn setFilterValueMap(Map<String,String> values)
      Sets the vaue set used in the filter
      Parameters:
      values - The filter's value set as a map. The map key is a data value whereas its value is the one displayed.
      Returns:
      The DataDescriptor column
    • setCustomFilterValueMap

      public DataDescriptorColumn setCustomFilterValueMap(Map<String,String> values, String filterName)
      Sets the value set for a custom filter implementation
      Parameters:
      values - The filter's value set as a map. The map key is a data value whereas its value is the one displayed.
      filterName - Custom filter implementation name
      Returns:
      The DataDescriptor column
    • setFilterValueMap

      public DataDescriptorColumn setFilterValueMap(Map<String,String> values, FilterType filterType)
      Sets the value set for the specified filter type
      Parameters:
      values - The filter's value set as a map. The map key is a data value whereas its value is the one displayed.
      filterType - The type of the filter to be set. Available filter types are listed in the enum FilterType.
      Returns:
      The DataDescriptor column
    • getFilterValueMap

      public Map<String,String> getFilterValueMap(String language)
      Gets the filter column’s value set based on the specified language
      Parameters:
      language - Language code. If not specified or null, the method returns the value set of the default language. The default language of the framework is set via the JBStrap parameter JBStrapParamType.DEFAULT_LANGUAGE.
      Returns:
      The column's value set as a map. The map key is a data value, whereas its value is the displayed value. If there is no value set for the column, the return value is null.
    • getFilterValueMap

      public Map<String,String> getFilterValueMap(FilterType filterType, String language)
      Gets the filter column’s value set based on the specified filter type
      Parameters:
      filterType - The filter type for which filtering is done. Available filter type are listed in the enum FilterType.
      language - Language code. If not specified or null, the method returns the value set of the default language.
      Returns:
      The column's value set as a map. The map key is a data value, whereas its value is the displayed value. If there is no value set for the column, the return value is null.
    • getFilterValueMap

      public Map<String,String> getFilterValueMap(String filterName, String language)
      Gets the column’s value set in case of a custom filter implementation
      Parameters:
      filterName - Custom filter implementation name
      language - Language code. If not specified or null, the method returns the value set of the default language.
      Returns:
      The column's value set as a map. The map key is a data value, whereas its value is the displayed value. If there is no value set for the column, the return value is null.
    • setFilterable

      public DataDescriptorColumn setFilterable(boolean filterable)
      Sets whether the column is enabled for filtering By default, a column’s filter feature is enabled.
      Parameters:
      filterable - If true is set, the column is enabled for filtering, otherwise not.
      Returns:
      The DataDescriptor column
    • isFilterable

      public boolean isFilterable()
      Sets whether the column can be filtered in the list.
      Returns:
      If true is set, the column is enabled for filtering in the list, otherwise false.
    • setDataProvider

      public DataDescriptorColumn setDataProvider(String dataProvider)
      Sets data provider column
      The data in the column specified here will be subject to filtering and sorting on the grid.
      Parameters:
      dataProvider - The data provider column name
      Returns:
      The DataDescriptor column
    • getDataProvider

      public String getDataProvider()
      Gets data provider column name
      Returns:
      The data provider column name or null, if data provider column is not defined
    • copy

      public DataDescriptorColumn copy()
      Creates an exact copy of the DataDescriptor column
      Returns:
      An other DataDescriptor column instance that is the exact copy of the column