org.apache.ojb.broker.query
Class BetweenCriteria

java.lang.Object
  extended byorg.apache.ojb.broker.query.SelectionCriteria
      extended byorg.apache.ojb.broker.query.ValueCriteria
          extended byorg.apache.ojb.broker.query.BetweenCriteria
All Implemented Interfaces:
java.io.Serializable

public class BetweenCriteria
extends ValueCriteria

SelectionCriteria for 'between x and y'

Version:
$Id: BetweenCriteria.java,v 1.6 2003/09/13 14:33:57 brj Exp $
Author:
Jakob Braeuchi
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.ojb.broker.query.SelectionCriteria
BETWEEN, EQUAL, GREATER, IN, IS_NULL, LESS, LIKE, NOT_BETWEEN, NOT_EQUAL, NOT_GREATER, NOT_IN, NOT_IS_NULL, NOT_LESS, NOT_LIKE, serialVersionUID
 
Constructor Summary
(package private) BetweenCriteria(java.lang.Object anAttribute, java.lang.Object aValue1, java.lang.Object aValue2, java.lang.String aClause, java.lang.String anAlias)
           
 
Method Summary
 void bind(java.lang.Object newValue)
          sets the value of the criteria to newValue.
 java.lang.Object getValue2()
          Gets the value2.
protected  boolean isBindable()
          answer true if the selection criteria is bindable BRJ: value null is bindable
protected  void setValue2(java.lang.Object value2)
          Sets the value2.
 
Methods inherited from class org.apache.ojb.broker.query.ValueCriteria
buildBeweenCriteria, buildEqualToCriteria, buildGreaterCriteria, buildInCriteria, buildLessCriteria, buildLikeCriteria, buildNotBeweenCriteria, buildNotEqualToCriteria, buildNotGreaterCriteria, buildNotInCriteria, buildNotLessCriteria, buildNotLikeCriteria, buildNotNullCriteria, buildNullCriteria, getClause
 
Methods inherited from class org.apache.ojb.broker.query.SelectionCriteria
getAlias, getAttribute, getCriteria, getNumberOfExtentsToBind, getQuery, getValue, isBound, isTranslateAttribute, setAlias, setBound, setCriteria, setNumberOfExtentsToBind, setTranslateAttribute, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BetweenCriteria

BetweenCriteria(java.lang.Object anAttribute,
                java.lang.Object aValue1,
                java.lang.Object aValue2,
                java.lang.String aClause,
                java.lang.String anAlias)
Method Detail

bind

public void bind(java.lang.Object newValue)
sets the value of the criteria to newValue. Used by the ODMG OQLQuery.bind() operation BRJ: bind get's called twice so we need to know which value to set

Overrides:
bind in class SelectionCriteria

getValue2

public java.lang.Object getValue2()
Gets the value2.

Returns:
Returns a Object

setValue2

protected void setValue2(java.lang.Object value2)
Sets the value2.

Parameters:
value2 - The value2 to set

isBindable

protected boolean isBindable()
Description copied from class: SelectionCriteria
answer true if the selection criteria is bindable BRJ: value null is bindable

Overrides:
isBindable in class SelectionCriteria
See Also:
SelectionCriteria.isBindable()


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14