com.wewebu.ow.server.fieldimpl.filter
Class OwStringComparator

java.lang.Object
  extended by com.wewebu.ow.server.fieldimpl.filter.OwAbstractComparator<String>
      extended by com.wewebu.ow.server.fieldimpl.filter.OwStringComparator
All Implemented Interfaces:
OwComparator<String>

public class OwStringComparator
extends OwAbstractComparator<String>

Simple string comparator. Implements the LIKE operation through regular expression transformation.

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

Since:
3.2.0.0

Constructor Summary
OwStringComparator()
           
 
Method Summary
protected  boolean matchBetween(OwSearchCriteria filter, String value)
          Between value compare, where both limits must be include for comparison. Neither the minimum limit nor the maximum limit should be excluded.
protected  boolean matchEquals(OwSearchCriteria filter, String value)
          Value and filter value must be equal! But equal operation is depending on the type and restriction of the given value.
protected  boolean matchGreater(OwSearchCriteria filter, String value)
          Value restriction where it must be greater as the filter.
protected  boolean matchGreaterEquals(OwSearchCriteria filter, String value)
          Greater or equals compare of given value and filter.
protected  boolean matchLess(OwSearchCriteria filter, String value)
          Value must be less than the defined filter.
protected  boolean matchLessEquals(OwSearchCriteria filter, String value)
          Less or equals compare of the value and filter.
protected  boolean matchLike(OwSearchCriteria filter, String value)
          A like compare of the value, the filter criteria can be used to get the representation of wildcard characters.
 
Methods inherited from class com.wewebu.ow.server.fieldimpl.filter.OwAbstractComparator
match
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwStringComparator

public OwStringComparator()
Method Detail

matchBetween

protected boolean matchBetween(OwSearchCriteria filter,
                               String value)
Description copied from class: OwAbstractComparator
Between value compare, where both limits must be include for comparison. Neither the minimum limit nor the maximum limit should be excluded.

Specified by:
matchBetween in class OwAbstractComparator<String>
Parameters:
filter - OwSearchCriteria providing the limit(s)
value - T to match with criteria
Returns:
boolean if matches criteria

matchLessEquals

protected boolean matchLessEquals(OwSearchCriteria filter,
                                  String value)
Description copied from class: OwAbstractComparator
Less or equals compare of the value and filter.

Specified by:
matchLessEquals in class OwAbstractComparator<String>
Parameters:
filter - OwSearchCriteria to restrict value
value - T to match against filter
Returns:
boolean if matches criteria

matchGreaterEquals

protected boolean matchGreaterEquals(OwSearchCriteria filter,
                                     String value)
Description copied from class: OwAbstractComparator
Greater or equals compare of given value and filter.

Specified by:
matchGreaterEquals in class OwAbstractComparator<String>
Parameters:
filter - OwSearchCriteria to restrict value
value - T to match against filter
Returns:
boolean if matches criteria

matchLess

protected boolean matchLess(OwSearchCriteria filter,
                            String value)
Description copied from class: OwAbstractComparator
Value must be less than the defined filter.

Specified by:
matchLess in class OwAbstractComparator<String>
Parameters:
filter - OwSearchCriteria to restrict value
value - T to match against filter
Returns:
boolean if matches criteria

matchGreater

protected boolean matchGreater(OwSearchCriteria filter,
                               String value)
Description copied from class: OwAbstractComparator
Value restriction where it must be greater as the filter.

Specified by:
matchGreater in class OwAbstractComparator<String>
Parameters:
filter - OwSearchCriteria to restrict value
value - T to match against filter
Returns:
boolean if matches criteria

matchLike

protected boolean matchLike(OwSearchCriteria filter,
                            String value)
Description copied from class: OwAbstractComparator
A like compare of the value, the filter criteria can be used to get the representation of wildcard characters.

Specified by:
matchLike in class OwAbstractComparator<String>
Parameters:
filter - OwSearchCriteria to restrict value
value - T to match against filter
Returns:
boolean if matches criteria

matchEquals

protected boolean matchEquals(OwSearchCriteria filter,
                              String value)
Description copied from class: OwAbstractComparator
Value and filter value must be equal! But equal operation is depending on the type and restriction of the given 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 .

Specified by:
matchEquals in class OwAbstractComparator<String>
Parameters:
filter - OwSearchCriteria to restrict value
value - T to match against filter
Returns:
boolean if matches criteria


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.