Class Filter
java.lang.Object
net.sf.jailer.datamodel.Filter
SQL Expression for server-side column data filtering.
- Author:
- Wisser
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringFilter expression for exclusion of columns from export.static final StringPrefix for "literal" filter expressions.static StringPlaceholder for the old (original) column value in filter expressions.static StringThe pure parameter name used insideOLD_VALUE_PROP.static StringRegular expression pattern matchingOLD_VALUE_PROP. -
Constructor Summary
ConstructorsConstructorDescriptionFilter(String expression, String type, boolean derived, FilterSource filterSource) Constructor.Filter(String expression, String type, boolean derived, FilterSource filterSource, String reason) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets the list of destinations this filter has been applied to.Gets the filter expression (in SQL).Gets the source of this filter.Gets reason.getType()Gets optional type of filter expression.booleanGets if filter is applied at export instead of import.booleanReturnstrueiff filter is derived.voidsetAppliedTo(List<String> appliedTo) Sets the list of destinations this filter has been applied to.voidsetApplyAtExport(boolean b) Sets if filter is applied at export instead of import.voidSets optional type of filter expression.
-
Field Details
-
LITERAL_PREFIX
-
EXCLUDED_VALUE
Filter expression for exclusion of columns from export.- See Also:
-
OLD_VALUE_PROP
Placeholder for the old (original) column value in filter expressions. -
OLD_VALUE_PROP_PURE
The pure parameter name used insideOLD_VALUE_PROP. -
OLD_VALUE_PROP_RE
Regular expression pattern matchingOLD_VALUE_PROP.
-
-
Constructor Details
-
Filter
Constructor.- Parameters:
expression- filter expression (in SQL)type- optional type of filter expressionderived- derived from parent primary key column?filterSource- the source of this filter
-
Filter
public Filter(String expression, String type, boolean derived, FilterSource filterSource, String reason) Constructor.- Parameters:
expression- filter expression (in SQL)type- optional type of filter expressionderived- derived from parent primary key column?filterSource- the source of this filterreason- reason (optional)
-
-
Method Details
-
getType
Gets optional type of filter expression. Determines the type of the import-filter-mapping-table columns.- Returns:
- the type
-
setType
Sets optional type of filter expression. Determines the type of the import-filter-mapping-table columns.- Parameters:
type- the type to set
-
getExpression
Gets the filter expression (in SQL).- Returns:
- the filter expression (in SQL)
-
isDerived
public boolean isDerived()Returnstrueiff filter is derived.- Returns:
trueiff filter is derived
-
getFilterSource
Gets the source of this filter.- Returns:
- the filter source, or
nullif there is no source
-
getAppliedTo
-
setAppliedTo
-
setApplyAtExport
public void setApplyAtExport(boolean b) Sets if filter is applied at export instead of import.- Parameters:
b- the value
-
getReason
-
isApplyAtExport
public boolean isApplyAtExport()Gets if filter is applied at export instead of import.- Returns:
- the value
-