public abstract class OwAbstractComparator<T> extends Object implements OwComparator<T>
Abstract comparator implementation. Provides a process to implement only the operation depending functionality, and automatically negation if NOT operation.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Constructor and Description |
---|
OwAbstractComparator() |
Modifier and Type | Method and Description |
---|---|
boolean |
match(OwSearchCriteria filter,
T value)
Matching check, where the filter specifies the
criteria value and operation to be used for filtering.
|
protected abstract boolean |
matchBetween(OwSearchCriteria filter,
T value)
Between value compare, where both limits must be include
for comparison. Neither the minimum limit nor the maximum
limit should be excluded.
|
protected abstract boolean |
matchEquals(OwSearchCriteria filter,
T value)
Value and filter value must be equal! But equal operation is
depending on the type and restriction of the given value.
|
protected abstract boolean |
matchGreater(OwSearchCriteria filter,
T value)
Value restriction where it must be greater as the filter.
|
protected abstract boolean |
matchGreaterEquals(OwSearchCriteria filter,
T value)
Greater or equals compare of given value and filter.
|
protected abstract boolean |
matchLess(OwSearchCriteria filter,
T value)
Value must be less than the defined filter.
|
protected abstract boolean |
matchLessEquals(OwSearchCriteria filter,
T value)
Less or equals compare of the value and filter.
|
protected abstract boolean |
matchLike(OwSearchCriteria filter,
T value)
A like compare of the value, the filter criteria
can be used to get the representation of wildcard characters.
|
public boolean match(OwSearchCriteria filter, T value)
OwComparator
match
in interface OwComparator<T>
filter
- OwSearchCriteriavalue
- T to verify against filterprotected abstract boolean matchBetween(OwSearchCriteria filter, T value)
filter
- OwSearchCriteria providing the limit(s)value
- T to match with criteriaprotected abstract boolean matchLessEquals(OwSearchCriteria filter, T value)
filter
- OwSearchCriteria to restrict valuevalue
- T to match against filterprotected abstract boolean matchGreaterEquals(OwSearchCriteria filter, T value)
filter
- OwSearchCriteria to restrict valuevalue
- T to match against filterprotected abstract boolean matchLess(OwSearchCriteria filter, T value)
filter
- OwSearchCriteria to restrict valuevalue
- T to match against filterprotected abstract boolean matchGreater(OwSearchCriteria filter, T value)
filter
- OwSearchCriteria to restrict valuevalue
- T to match against filterprotected abstract boolean matchLike(OwSearchCriteria filter, T value)
filter
- OwSearchCriteria to restrict valuevalue
- T to match against filterprotected abstract boolean matchEquals(OwSearchCriteria filter, T value)
For special cases (Date, Number,...) an equal compare will still return true even if the filter and given value not match fully each other .
filter
- OwSearchCriteria to restrict valuevalue
- T to match against filterCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.