org.kuali.rice.krms.api.engine.expression
Interface ComparisonOperatorService

All Superinterfaces:
StringCoercionExtension
All Known Implementing Classes:
ComparisonOperatorServiceImpl

public interface ComparisonOperatorService
extends StringCoercionExtension

Interface for registering EngineComparatorExtension for use as a ComparisonOperator when comparing Proposition Terms

Author:
Kuali Rice Team (rice.collab@kuali.org)

Method Summary
 boolean canCoerce(String type, String value)
          Can this StringCoercionExtension coerce the given type and value into an Object?
 boolean canCompare(Object leftHandSide, Object rightHandSide)
          Does the service have an Extension that can compare the given objects?
 Object coerce(String type, String value)
          Returns an Object of the given type populated with the given value.
 int compare(Object lhs, Object rhs)
          Returns the int result of a compare between the lhs and rhs objects.
 EngineComparatorExtension findComparatorExtension(Object leftHandSide, Object rightHandSide)
          EngineComparatorExtension that canCompare the given Objects
 StringCoercionExtension findStringCoercionExtension(String type, String value)
           
 List<EngineComparatorExtension> getOperators()
          The List of EngineComparatorExtensions.
 List<StringCoercionExtension> getStringCoercionExtensions()
           
 void setOperators(List<EngineComparatorExtension> operators)
          List to use.
 void setStringCoercionExtensions(List<StringCoercionExtension> stringCoercionExtensions)
          The List of StringCoercionExtensions.
 

Method Detail

getOperators

List<EngineComparatorExtension> getOperators()
The List of EngineComparatorExtensions.

Returns:
List of configured EngineComparatorExtensions.

setOperators

void setOperators(List<EngineComparatorExtension> operators)
List to use.

Parameters:
operators -

canCoerce

boolean canCoerce(String type,
                  String value)
Description copied from interface: StringCoercionExtension
Can this StringCoercionExtension coerce the given type and value into an Object?

Specified by:
canCoerce in interface StringCoercionExtension
Parameters:
type - of Object to coerce to.
value - value to use for coerced type
Returns:
boolean true if this StringCoercionExtension can coerce this type and value

coerce

Object coerce(String type,
              String value)
Description copied from interface: StringCoercionExtension
Returns an Object of the given type populated with the given value.

Specified by:
coerce in interface StringCoercionExtension
Parameters:
type - to coerce Object to
value - to coerce
Returns:
Object of given type with given value

compare

int compare(Object lhs,
            Object rhs)
Returns the int result of a compare between the lhs and rhs objects.

Parameters:
lhs - left hand side object
rhs - right hand side object
Returns:
int result of compare between lhs and rhs objects

canCompare

boolean canCompare(Object leftHandSide,
                   Object rightHandSide)
Does the service have an Extension that can compare the given objects?

Parameters:
leftHandSide - left hand side Object
rightHandSide - right hand side Object
Returns:
boolean true a configured EngineComparatorExtension can compare the lhs and rhs Objects.

findComparatorExtension

EngineComparatorExtension findComparatorExtension(Object leftHandSide,
                                                  Object rightHandSide)
EngineComparatorExtension that canCompare the given Objects

Parameters:
leftHandSide - left hand side Object
rightHandSide - right hand side Object
Returns:
the EngineComparatorExtension that can compare the given Objects.

getStringCoercionExtensions

List<StringCoercionExtension> getStringCoercionExtensions()
Returns:
List

setStringCoercionExtensions

void setStringCoercionExtensions(List<StringCoercionExtension> stringCoercionExtensions)
The List of StringCoercionExtensions.

Parameters:
stringCoercionExtensions -

findStringCoercionExtension

StringCoercionExtension findStringCoercionExtension(String type,
                                                    String value)
Parameters:
type - to coerce
value - to coerce
Returns:
StringCoercionExtension that can coerce the given type and value


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.