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

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

public class OwBoolComparator
extends OwAbstractComparator<Boolean>

Simple boolean comparator.

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
OwBoolComparator()
           
 
Method Summary
protected  boolean matchBetween(OwSearchCriteria filter, Boolean 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, Boolean 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, Boolean value)
          Value restriction where it must be greater as the filter.
protected  boolean matchGreaterEquals(OwSearchCriteria filter, Boolean value)
          Greater or equals compare of given value and filter.
protected  boolean matchLess(OwSearchCriteria filter, Boolean value)
          Value must be less than the defined filter.
protected  boolean matchLessEquals(OwSearchCriteria filter, Boolean value)
          Less or equals compare of the value and filter.
protected  boolean matchLike(OwSearchCriteria filter, Boolean 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

OwBoolComparator

public OwBoolComparator()
Method Detail

matchBetween

protected boolean matchBetween(OwSearchCriteria filter,
                               Boolean 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<Boolean>
Parameters:
filter - OwSearchCriteria providing the limit(s)
value - T to match with criteria
Returns:
boolean if matches criteria

matchLessEquals

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

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

matchGreaterEquals

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

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

matchLess

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

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

matchGreater

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

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

matchLike

protected boolean matchLike(OwSearchCriteria filter,
                            Boolean 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<Boolean>
Parameters:
filter - OwSearchCriteria to restrict value
value - T to match against filter
Returns:
boolean if matches criteria

matchEquals

protected boolean matchEquals(OwSearchCriteria filter,
                              Boolean 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<Boolean>
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.