T
- Type of value@GwtCompatible
@MappedSuperclass
public abstract class Filter<T>
extends java.lang.Object
implements com.appiancorp.common.query.ReadOnlyFilter
Bean representing a configured Filter on a column.
The column can be filtered either by a value or an expression, which evaluated value will be use to filter.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LOCAL_PART |
static javax.xml.namespace.QName |
QNAME |
static java.lang.String |
TABLE_NAME |
protected static java.lang.String |
XML_ROOT_ELEMENT |
Modifier | Constructor and Description |
---|---|
protected |
Filter()
Initializes a newly created
Filter |
protected |
Filter(java.lang.String field,
FilterOperator operator,
java.lang.String valueExpression)
Constructs a new
Filter where its constraint is
given as an expression. |
protected |
Filter(java.lang.String field,
FilterOperator operator,
T value)
Constructs a new
Filter where its constraint is
given as an object value. |
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
containsFilters(Criteria criteria,
java.lang.Iterable<Filter<T>> filters)
Checks if all the
filters are contained by the given criteria |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getField()
Returns the column or alias name
|
FilterOperator |
getOperator()
Returns the
FilterOperator |
abstract T |
getValue()
Returns the value used as a constraint on the column or alias
|
java.lang.String |
getValueExpression()
Return the value expression used as a constraint on the column or alias
|
com.appiancorp.core.expr.portable.PortableTypedValue |
getValueReadOnly() |
int |
hashCode() |
static com.appiancorp.common.query.Filter.IsPartOfCriteriaPredicate |
isPartOfCriteriaPredicate(Criteria c)
|
static com.google.common.base.Function<Filter<?>,java.lang.String> |
selectField()
Returns a
Function which retrieves the column/alias/field name from
a given Filter |
protected abstract void |
setValue(T value) |
java.lang.String |
toString() |
protected static final java.lang.String XML_ROOT_ELEMENT
public static final java.lang.String TABLE_NAME
public static final java.lang.String LOCAL_PART
public static final javax.xml.namespace.QName QNAME
protected Filter()
Filter
protected Filter(java.lang.String field, FilterOperator operator, java.lang.String valueExpression)
Filter
where its constraint is
given as an expression.
The constructor that takes T value
is
preferred over this constructor because evaluation of an expression to obtain
the value is unnecessary except in cases of deferred evaluation, which are not applicable
to cases of constructing a Filter for plug-ins.
field
- column or alias nameoperator
- filter type define as FilterOperator
valueExpression
- expression representing the object use to constraint the column or aliasFilter(String, FilterOperator, T)
protected Filter(java.lang.String field, FilterOperator operator, T value)
Filter
where its constraint is
given as an object value.field
- column or alias nameoperator
- filter type define as FilterOperator
value
- object use to constraint the column or aliaspublic abstract T getValue()
protected abstract void setValue(T value)
public com.appiancorp.core.expr.portable.PortableTypedValue getValueReadOnly()
getValueReadOnly
in interface com.appiancorp.common.query.ReadOnlyFilter
public java.lang.String getField()
getField
in interface com.appiancorp.common.query.ReadOnlyFilter
public FilterOperator getOperator()
FilterOperator
getOperator
in interface com.appiancorp.common.query.ReadOnlyFilter
FilterOperator
public java.lang.String getValueExpression()
getValueExpression
in interface com.appiancorp.common.query.ReadOnlyFilter
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static final com.appiancorp.common.query.Filter.IsPartOfCriteriaPredicate isPartOfCriteriaPredicate(Criteria c)
public static <T> boolean containsFilters(Criteria criteria, java.lang.Iterable<Filter<T>> filters)
filters
are contained by the given criteria
public static com.google.common.base.Function<Filter<?>,java.lang.String> selectField()
Function
which retrieves the column/alias/field name from
a given Filter
Function
which retrieves the column/alias/field name from
a given Filter
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.