Class DataDescriptorColumn
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 name | Description | Default settings |
---|---|---|
name | Column 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 |
datatype | Column data type designation Available data types are listed in the enum DataDescriptorColumnDatatype It is mandatory to
specify the attribute. | null |
length | The 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 |
scale | Number of digits to be stored in case of fractions The setting is ignored if the column does not contain a fraction. | 0 |
nullable | Marking 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 |
primaryKey | Specifies 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 |
editorType | Component 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 |
visible | Sets the visibility of the column. Available values of this attribute are listed in the enum ColumnVisibleType . | VISIBLE |
calculateValue | Name 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 |
recalcOnChange | The 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 |
order | Sets 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 |
filterable | Sets 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
Examples: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.<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
.
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 name | Description | Default settings | |
---|---|---|---|
editorType | Editor 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 types | Filter component type for the column | |
defaultOperator | Sets 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’ | |
wildCard | Wildcard 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 enumOperatorType
. 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 name Description Default settings type The name of the filter to which the settings apply Available filter types are listed in the enum FilterType
defaultFilter name The name of the filter in case of a custom filter implementation used to identify the filter component null
filterClass The class that implements a custom filter. The specified class must extend the BaseFilter
class, with full name enterednull
editorType Editor type of the input field used to specify a filter value in the filter component. Available editor types are listed in the enum EditorType
Column editor type defaultOperator Sets 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’ wildCard Wildcard 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 enumOperatorType
. 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.
- operators
- Since:
- 4.0
- Author:
- JBStrap
- See Also:
-
Constructor Summary
ConstructorDescriptionDataDescriptorColumn
(String name, DataDescriptorColumnDatatype datatype, String dsName) Creates a DataDescriptor column -
Method Summary
Modifier and TypeMethodDescriptionfinal DataDescriptorColumn
addClalculateValue
(Class<? extends CalculateColumnValue> calculateMethod) Adds the specified implementation, that is used during recalculation.Adds a parameter to the column.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.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.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.copy()
Creates an exact copy of the DataDescriptor columnfinal Class<? extends CalculateColumnValue>
Gets the column recalc implementation.Gets the name of the columnClass<? extends BaseFilter<?>>
getCustomFilterClass
(String filterName) Gets the custom filter implementation class.Gets data provider column nameGets column data type.final String
Gets the name of the DataDescriptor, that is assigned to the column.Gets the column's editor typeGets the default operator type used to filter the columngetFilterDefaultOperator
(FilterType filterType) Gets the default operator type used to filter the columngetFilterDefaultOperator
(String filterName) Gets the default operator type for custom filter implementationsQueries the editor type of the column filtergetFilterEditorType
(FilterType filterType) Gets the editor type of the column filter specified by the filter type.getFilterEditorType
(String filterName) Gets the editor type of the column filter in case of a custom implementationSets the component parameters for the column filtergetFilterParameters
(FilterType filterType) Gets the editor component’s parameters for the specified filter typegetFilterParameters
(String filterName) Gets the editor component’s parameters for a custom filter implementationgetFilterValueMap
(FilterType filterType, String language) Gets the filter column’s value set based on the specified filter typegetFilterValueMap
(String language) Gets the filter column’s value set based on the specified languagegetFilterValueMap
(String filterName, String language) Gets the column’s value set in case of a custom filter implementationWildcard character used to filter the column.getFilterWildCard
(FilterType filterType) Wildcard character used to filter the column as specified by filter typegetFilterWildCard
(String filterName) Wildcard character used to filter the column, custom filter implementationint
Gets the columns maximum length.int
getOrder()
Gets the column's order number.Gets the column parameter vale, specified by the parameter name.Gets the column parameters.Gets the list of the columns, that, when changed, will trigger a recalculation.int
getScale()
Counts the amount of decimal places in the column numbers.Gets the filter’s supported operator typesgetSupportedOperators
(FilterType filterType) Gets the filter’s supported operator types by specified filter typegetSupportedOperators
(String filterName) Gets the list of supported operator types for a custom filter implementationGets column label using the specified language.getValueMap
(String language) Gets column's set of values, as a map, according to the specified language.Gets the column visibility typeboolean
Sets whether the column can be filtered in the list.boolean
Determines if the column can have anull
value.boolean
Determines if the column contains the primary key.setCustomFilterClass
(String filterName, Class<? extends BaseFilter<?>> filterClass) If implementing a custom filter, sets the class, that contains the implementation of the fitler componentsetCustomFilterDefaultOperator
(OperatorType operatorType, String filterName) Sets the default operator type for custom filter implementationssetCustomFilterEditorType
(EditorType filterEditorType, String filterName) Specifies the editor type of the input field in a custom filter component.setCustomFilterParameters
(Parameters parameters, String filterName) Sets the editor field parameters for a custom filter implentationsetCustomFilterValueMap
(Map<String, String> values, String filterName) Sets the value set for a custom filter implementationsetCustomFilterWildCard
(String wildCard, String filterName) Sets the wildcard character used for a custom filtersetCustomSupportedOperators
(List<OperatorType> operators, String filterName) Sets the supported operator types for a custom column filtersetDataProvider
(String dataProvider) Sets data provider column
The data in the column specified here will be subject to filtering and sorting on the grid.setEditorType
(EditorType editorType) Sets the editor type of the column.setFilterable
(boolean filterable) Sets whether the column is enabled for filtering By default, a column’s filter feature is enabled.setFilterDefaultOperator
(OperatorType operatorType) Sets the default operator type for column filteringsetFilterDefaultOperator
(OperatorType operatorType, FilterType filterType) Sets the default operator type for the given filter typesetFilterEditorType
(EditorType filterEditorType) In case of a column filter, it is the type of the filter component’s display value editor.setFilterEditorType
(EditorType filterEditorType, FilterType filterType) Sets the editor type of the input field in the column’s filter component.setFilterParameters
(Parameters parameters) Sets the parameters for the column filter’s editor componentsetFilterParameters
(Parameters parameters, FilterType filterType) Sets the component parameters for the specified filter typesetFilterValueMap
(Map<String, String> values) Sets the vaue set used in the filtersetFilterValueMap
(Map<String, String> values, FilterType filterType) Sets the value set for the specified filter typesetFilterWildCard
(String wildCard) Wildcard character used to filter the columnsetFilterWildCard
(String wildCard, FilterType filterType) Sets the wildcard character for the specified filter typesetLength
(int length) Sets the column's maximum length.Sets the maximum length of the column The setting is only applicable in case of text columns, otherwise it is ignored.setNullable
(boolean nullable) Sets the column to allownull
values.setOrder
(int order) Sets the position of the column Enter a number to specify the position which determines the display order of the columns.Sets the column position.setParam
(Parameters params) Sets the column parameters.setPrimaryKey
(boolean primaryKey) Sets the column to containt the primary key.setScale
(int scale) Sets the amount of decimal places.Sets the amount of decimal places.setSupportedOperators
(List<OperatorType> operators) Sets the supported operator types for the columnsetSupportedOperators
(List<OperatorType> operators, FilterType filterType) Sets the supported operator types for a column filterSets the column titleAssigns a value set to the DataDescriptor column.setVisibleType
(ColumnVisibleType visibleType) Sets the visibility type of the column.
-
Constructor Details
-
DataDescriptorColumn
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 theDataDescriptorColumnDatatype
enum.dsName
- The name of the DataDescriptor, that will have the column added to it.
-
-
Method Details
-
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
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
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
Gets column data type.- Returns:
- Column data type
-
getLength
public int getLength()Gets the columns maximum length.- Returns:
- The columns maximum length.
-
setLength
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
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
Gets the column's editor type- Returns:
- The editor type of the column
-
setEditorType
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 theEditorType
enum.- Returns:
- The DataDescriptor column
-
getVisibleType
Gets the column visibility type- Returns:
- The column visibility type
-
setVisibleType
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 theColumnVisibleType
enum.- Returns:
- The DataDescriptor column.
-
isNullable
public boolean isNullable()Determines if the column can have anull
value.- Returns:
- If
true
, the column can have anull
value, otherwisefalse
.
-
setNullable
Sets the column to allownull
values. If a column cannot havenull
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
- Iftrue
, the column can havenull
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, otherwisefalse
-
setPrimaryKey
Sets the column to containt the primary key.- Parameters:
primaryKey
- Iftrue
, the column will be used as the primary key, otherwise not.- Returns:
- The DataDescriptor column
-
getParams
Gets the column parameters. The parameters specified in the DataDescriptor XML can also be accessed.- Returns:
- Every parameter of the column
-
addParam
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
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
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
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
Sets the column title- Parameters:
title
- The column title- Returns:
- The DataDescriptor column
-
getValueMap
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 theJBStrapParamType.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
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 isnull
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
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
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
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
Gets the column recalc implementation. If the column isn't a calculated column, it will return with nullnull
- Returns:
- The column recalculation implementation.
-
addRecalcOnChangeColumn
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
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
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
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 filterfilterClass
- The class implementing the filter component.- Returns:
- The DataDescriptor column
- Throws:
NullPointerException
- If the specified class isnull
-
getCustomFilterClass
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
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 enumEditorType
.- 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 enumEditorType
.filterName
- Custom filter name- Returns:
- The DataDescriptor column
- Throws:
NullPointerException
- Thrown if the parameter name of the given editor name or type isnull
.
-
setFilterEditorType
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 enumEditorType
.filterType
- The type of the filter we want to set Available filter types are listed in the enumFilterType
.- Returns:
- The DataDescriptor column
- Throws:
NullPointerException
- Thrown if the specified editor type or filter type isnull
.
-
getFilterEditorType
Queries the editor type of the column filter- Returns:
- Editor type of the column filter
-
getFilterEditorType
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
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
Wildcard character used to filter the column- Parameters:
wildCard
- Wildcard character- Returns:
- The DataDescriptor column
-
setCustomFilterWildCard
Sets the wildcard character used for a custom filter- Parameters:
wildCard
- Wildcard characterfilterName
- Custom filter implementation name- Returns:
- The DataDescriptor column
-
setFilterWildCard
Sets the wildcard character for the specified filter type- Parameters:
wildCard
- Wildcard characterfilterType
- The type of the filter to be set. Available filter types are listed in the enumFilterType
.- Returns:
- The DataDescriptor column
-
getFilterWildCard
Wildcard character used to filter the column.- Returns:
- Wildcard character used to filter the column.
null
if not set.
-
getFilterWildCard
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 enumFilterType
.- Returns:
- Wildcard character used to filter the column.
null
if not set.
-
getFilterWildCard
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
Sets the default operator type for column filtering- Parameters:
operatorType
- Default operator type. Available operators are listed in the enumOperatorType
.- 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 enumOperatorType
.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 enumOperatorType
.filterType
- Filter type Available filter types are listed in the enumFilterType
.- Returns:
- The DataDescriptor column
-
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
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
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
Sets the supported operator types for the column- Parameters:
operators
- A list of supported operator types. Available operator types are listed in the enumOperatorType
.- 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 enumOperatorType
.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 enumOperatorType
.filterType
- The filter type we want to set Available filter type are listed in the enumFilterType
.- Returns:
- The DataDescriptor column
-
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
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 enumFilterType
.- Returns:
- A list of supported operators or
null
if no supported operators are set for the column.
-
getSupportedOperators
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
Sets the parameters for the column filter’s editor component- Parameters:
parameters
- Parameters to be set- Returns:
- The DataDescriptor column
-
setCustomFilterParameters
Sets the editor field parameters for a custom filter implentation- Parameters:
parameters
- Parameters to be setfilterName
- Custom filter implementation name- Returns:
- The DataDescriptor column
-
setFilterParameters
Sets the component parameters for the specified filter type- Parameters:
parameters
- Parameters to be setfilterType
- The type of the filter to be set Available filter type are listed in the enumFilterType
.- Returns:
- The DataDescriptor column
-
getFilterParameters
Sets the component parameters for the column filter- Returns:
- Editor component parameters or
null
if no parameters are specified.
-
getFilterParameters
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 enumFilterType
.
-
getFilterParameters
Gets the editor component’s parameters for a custom filter implementation- Parameters:
filterName
- Custom filter name
-
setFilterValueMap
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
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
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 enumFilterType
.- Returns:
- The DataDescriptor column
-
getFilterValueMap
Gets the filter column’s value set based on the specified language- Parameters:
language
- Language code. If not specified ornull
, the method returns the value set of the default language. The default language of the framework is set via the JBStrap parameterJBStrapParamType.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
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 enumFilterType
.language
- Language code. If not specified ornull
, 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
Gets the column’s value set in case of a custom filter implementation- Parameters:
filterName
- Custom filter implementation namelanguage
- Language code. If not specified ornull
, 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
Sets whether the column is enabled for filtering By default, a column’s filter feature is enabled.- Parameters:
filterable
- Iftrue
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, otherwisefalse
.
-
setDataProvider
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
Gets data provider column name- Returns:
- The data provider column name or
null
, if data provider column is not defined
-
copy
Creates an exact copy of the DataDescriptor column- Returns:
- An other DataDescriptor column instance that is the exact copy of the column
-