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

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

public class OwDateComparator
extends OwAbstractComparator<Date>

Simple date comparator. Implements a simple compare functionality of the provided filter and value. Dynamically compare full, only date or only time depending on filter definition.

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

OwDateComparator

public OwDateComparator()
Method Detail

matchBetween

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

matchLessEquals

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

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

matchGreaterEquals

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

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

matchLess

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

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

matchGreater

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

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

matchLike

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

matchEquals

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