Class CoreFunction
- java.lang.Object
-
- org.dashbuilder.dataset.engine.filter.DataSetFunction
-
- org.dashbuilder.dataset.engine.filter.CoreFunction
-
public class CoreFunction extends DataSetFunction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCoreFunction.TimeFrameLimits
-
Field Summary
-
Fields inherited from class org.dashbuilder.dataset.engine.filter.DataSetFunction
columnId, context, dataColumn
-
-
Constructor Summary
Constructors Constructor Description CoreFunction(DataSetFilterContext ctx, org.dashbuilder.dataset.filter.CoreFunctionFilter coreFunctionFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompare(Comparable c1, Comparable c2)ComparablegetCurrentValue()ComparablegetParameter(int index)List<Comparable>getParameters()booleanisBetween(Comparable value)booleanisEqualsTo(Comparable value)booleanisGreaterThan(Comparable value)booleanisGreaterThanOrEqualsTo(Comparable value)booleanisLikeTo(Comparable value)TheLIKE_TOoperator is intended to emulate the SQL like operator.It's used to search for a specified pattern in a data set's column.booleanisLowerThan(Comparable value)booleanisLowerThanOrEqualsTo(Comparable value)booleanisNotEqualsTo(Comparable value)booleanisNotNull(Comparable value)booleanisNull(Comparable value)booleanpass()Evaluate the filter function.booleantimeFrame(Comparable value)-
Methods inherited from class org.dashbuilder.dataset.engine.filter.DataSetFunction
getColumnId, getContext, getDataColumn, setColumnId, setContext
-
-
-
-
Constructor Detail
-
CoreFunction
public CoreFunction(DataSetFilterContext ctx, org.dashbuilder.dataset.filter.CoreFunctionFilter coreFunctionFilter)
-
-
Method Detail
-
getCurrentValue
public Comparable getCurrentValue()
-
getParameter
public Comparable getParameter(int index)
-
getParameters
public List<Comparable> getParameters()
-
pass
public boolean pass()
Description copied from class:DataSetFunctionEvaluate the filter function.- Specified by:
passin classDataSetFunction
-
isNull
public boolean isNull(Comparable value)
-
isNotNull
public boolean isNotNull(Comparable value)
-
compare
public boolean compare(Comparable c1, Comparable c2)
-
isEqualsTo
public boolean isEqualsTo(Comparable value)
-
isNotEqualsTo
public boolean isNotEqualsTo(Comparable value)
-
isLikeTo
public boolean isLikeTo(Comparable value)
The
LIKE_TOoperator is intended to emulate the SQL like operator.It's used to search for a specified pattern in a data set's column.Allowed wildcards are:
_- A substitute for a single character.%- A substitute for zero or more characters.[charlist]- Sets and ranges of characters to match.[^charlist]- Matches only a character NOT specified within the brackets.
The call
getParameter(0)returns the given user's input pattern used for searching.The implementation is supported for TEXT or LABEL column types and it's case sensitive or unsensitive depending on the boolean value returned by getParameter(1).
- Parameters:
value- The existing data set column's value at a given row.- Returns:
- If the string on current data set's column is like (as the SQL operator) the given user's pattern.
-
isLowerThan
public boolean isLowerThan(Comparable value)
-
isLowerThanOrEqualsTo
public boolean isLowerThanOrEqualsTo(Comparable value)
-
isGreaterThan
public boolean isGreaterThan(Comparable value)
-
isGreaterThanOrEqualsTo
public boolean isGreaterThanOrEqualsTo(Comparable value)
-
isBetween
public boolean isBetween(Comparable value)
-
timeFrame
public boolean timeFrame(Comparable value)
-
-