ca.uhn.cache.impl
Class AbstractQueryParam

java.lang.Object
  extended byca.uhn.cache.impl.CommonsLangObject
      extended byca.uhn.cache.impl.AbstractQueryParam
All Implemented Interfaces:
java.lang.Comparable, IQueryParam, java.io.Serializable
Direct Known Subclasses:
DateParam, DateRangeParam, StringParam, StringSetParam

public abstract class AbstractQueryParam
extends CommonsLangObject
implements IQueryParam, java.lang.Comparable, java.io.Serializable

Base class for all IQueryParam implementations.

Version:
$Revision: 1.1 $ updated on $Date: 2005/01/24 22:52:34 $ by $Author: bryan_tripp $
Author:
Alexei Guevara
See Also:
Serialized Form

Constructor Summary
protected AbstractQueryParam(IDimension theDimension)
           
 
Method Summary
 int compareTo(java.lang.Object theObj)
          
protected  boolean compatibleWith(IQueryParam theParam)
          By default only checks compatibility with other AbstractQueryParam descendents (can be overridden).
 IDimension getDimension()
           
protected  java.lang.Class getPointParamClass()
           
 boolean intersects(IQueryParam theParam)
          
 
Methods inherited from class ca.uhn.cache.impl.CommonsLangObject
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ca.uhn.cache.IQueryParam
getDistance, merge
 

Constructor Detail

AbstractQueryParam

protected AbstractQueryParam(IDimension theDimension)
Parameters:
theDimension - The dimension where this parameter is difined.
Method Detail

getDimension

public IDimension getDimension()
Specified by:
getDimension in interface IQueryParam
Returns:
the dimension in parameter space to which this IQueryParam belongs
See Also:
IQueryParam.getDimension()

intersects

public boolean intersects(IQueryParam theParam)

Specified by:
intersects in interface IQueryParam
Parameters:
theParam - an IQueryParam along the same dimension as this one
Returns:
true iff the given param intersects with this (for example contains, is part of, overlaps)

compatibleWith

protected boolean compatibleWith(IQueryParam theParam)
By default only checks compatibility with other AbstractQueryParam descendents (can be overridden).

Parameters:
theParam - another param
Returns:
true iff the other param has the same dimension and the same point param class.

getPointParamClass

protected java.lang.Class getPointParamClass()
Returns:
the class of the point parameter associated with this type, for example DateParam for DateRangeParam (defaults to this.getClass())

compareTo

public int compareTo(java.lang.Object theObj)

Specified by:
compareTo in interface java.lang.Comparable


Copyright © 2004-2005 University Health Network. All Rights Reserved.