Class Filter

java.lang.Object
net.sf.jailer.datamodel.Filter

public class Filter extends Object
SQL Expression for server-side column data filtering.
Author:
Wisser
  • Field Details

    • LITERAL_PREFIX

      public static final String LITERAL_PREFIX
      Prefix for "literal" filter expressions.
      See Also:
    • EXCLUDED_VALUE

      public static final String EXCLUDED_VALUE
      Filter expression for exclusion of columns from export.
      See Also:
    • OLD_VALUE_PROP

      public static String OLD_VALUE_PROP
      Placeholder for the old (original) column value in filter expressions.
    • OLD_VALUE_PROP_PURE

      public static String OLD_VALUE_PROP_PURE
      The pure parameter name used inside OLD_VALUE_PROP.
    • OLD_VALUE_PROP_RE

      public static String OLD_VALUE_PROP_RE
      Regular expression pattern matching OLD_VALUE_PROP.
  • Constructor Details

    • Filter

      public Filter(String expression, String type, boolean derived, FilterSource filterSource)
      Constructor.
      Parameters:
      expression - filter expression (in SQL)
      type - optional type of filter expression
      derived - 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 expression
      derived - derived from parent primary key column?
      filterSource - the source of this filter
      reason - reason (optional)
  • Method Details

    • getType

      public String getType()
      Gets optional type of filter expression. Determines the type of the import-filter-mapping-table columns.
      Returns:
      the type
    • setType

      public void setType(String type)
      Sets optional type of filter expression. Determines the type of the import-filter-mapping-table columns.
      Parameters:
      type - the type to set
    • getExpression

      public String getExpression()
      Gets the filter expression (in SQL).
      Returns:
      the filter expression (in SQL)
    • isDerived

      public boolean isDerived()
      Returns true iff filter is derived.
      Returns:
      true iff filter is derived
    • getFilterSource

      public FilterSource getFilterSource()
      Gets the source of this filter.
      Returns:
      the filter source, or null if there is no source
    • getAppliedTo

      public List<String> getAppliedTo()
      Gets the list of destinations this filter has been applied to.
      Returns:
      the list of destinations this filter has been applied to
    • setAppliedTo

      public void setAppliedTo(List<String> appliedTo)
      Sets the list of destinations this filter has been applied to.
      Parameters:
      appliedTo - the list of destinations to set
    • setApplyAtExport

      public void setApplyAtExport(boolean b)
      Sets if filter is applied at export instead of import.
      Parameters:
      b - the value
    • getReason

      public String getReason()
      Gets reason.
      Returns:
      reason
    • isApplyAtExport

      public boolean isApplyAtExport()
      Gets if filter is applied at export instead of import.
      Returns:
      the value