ostore.read
Class DatePredicate

java.lang.Object
  |
  +--ostore.read.DatePredicate
All Implemented Interfaces:
QuickSerializable, VersionPredicate

public class DatePredicate
extends Object
implements VersionPredicate

A VersionPredicate that requires version whose creation date lies in a specified range.

Version:
$Id: DatePredicate.java,v 1.18 2002/07/29 18:48:53 geels Exp $
Author:
Dennis Geels

Constructor Summary
DatePredicate(InputBuffer buffer)
          Constructs a DatePredicate from its serialized form.
DatePredicate(QSDate date)
          Constructs a new DatePredicate that requires a specific version.
DatePredicate(QSDate low, QSDate high)
          Constructs a new DatePredicate that requires a creation date between low and high, inclusive.
 
Method Summary
 QSDate get_high()
          Returns the latest accaptable creation date;
 QSDate get_low()
          Returns the earliest accaptable creation date;
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
          Returns a human-readable representation of this predicate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatePredicate

public DatePredicate(QSDate low,
                     QSDate high)
Constructs a new DatePredicate that requires a creation date between low and high, inclusive. Set high=Clock.QS_NEVER for open-ended predicates.

Parameters:
low - The earliest acceptable creation date.
high - The latest acceptable creation date.
See Also:
Clock.QS_NEVER

DatePredicate

public DatePredicate(QSDate date)
Constructs a new DatePredicate that requires a specific version.

Parameters:
date - The only acceptable creation date.

DatePredicate

public DatePredicate(InputBuffer buffer)
              throws QSException
Constructs a DatePredicate from its serialized form.

Method Detail

get_low

public QSDate get_low()
Returns the earliest accaptable creation date;


get_high

public QSDate get_high()
Returns the latest accaptable creation date;


serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Parameters:
buffer - the output buffer to add the object to

toString

public String toString()
Returns a human-readable representation of this predicate.

Overrides:
toString in class Object