eTextReader.clientInterface
Class Criteria

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by eTextReader.clientInterface.Criteria
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class Criteria
extends java.util.Hashtable

A class to hold a set of criteria for a client-server interaction

Version:
4.1, 7/10/2002
Author:
Marty Kane
See Also:
Hashtable, Serialized Form

Field Summary
private  java.lang.String groupBy
           
private  boolean grouped
           
private  java.lang.String orderBy
           
private  boolean ordered
           
static Criteria RETRIEVE_ALL
          Serves as a marker to denote that all fields should be downloaded for a notation
 
Constructor Summary
Criteria()
          Constructs a new, empty Criteria set.
 
Method Summary
 java.lang.String getGrouped()
          Returns the group_by clause of this Criteria.
 java.lang.String getOrdered()
          Returns the order_by clause of this Criteria.
 java.lang.Object getValue(java.lang.String field)
          Gets the value of the given field.
 boolean isGrouped()
          returns whether or not there is a group_by clause for this Criteria.
 boolean isOrdered()
          returns whether or not there is an order_by clause for this Criteria.
 void reset(java.lang.String field, int value)
          Sets the given field to the given int value, replacing any values already present.
 void reset(java.lang.String field, java.lang.String value)
          Sets the given field to the given String value, replacing any values already present.
 void set(java.lang.String field, boolean value)
          Sets the given field to the given boolean value.
 void set(java.lang.String field, double value)
          Sets the given field to the given double value.
 void set(java.lang.String field, int value)
          Sets the given field to the given int value.
 void set(java.lang.String field, java.lang.Object value)
          Sets the given field to the given value.
 void set(java.lang.String field, java.lang.String value)
          Sets the given field to the given String value, OR'ed the old value if the field has already been set.
 void setGrouped(java.lang.String clause)
          Sets the group_by clause for this Criteria
 void setOrdered(java.lang.String clause)
          Sets the order_by clause for this Criteria.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RETRIEVE_ALL

public static Criteria RETRIEVE_ALL
Serves as a marker to denote that all fields should be downloaded for a notation


ordered

private boolean ordered

grouped

private boolean grouped

orderBy

private java.lang.String orderBy

groupBy

private java.lang.String groupBy
Constructor Detail

Criteria

public Criteria()
Constructs a new, empty Criteria set.

Method Detail

set

public void set(java.lang.String field,
                java.lang.String value)
Sets the given field to the given String value, OR'ed the old value if the field has already been set.

Parameters:
field - The field to set.
value - The value to set the field to.

reset

public void reset(java.lang.String field,
                  java.lang.String value)
Sets the given field to the given String value, replacing any values already present.

Parameters:
field - The field to set.
value - The value to set the field to.

set

public void set(java.lang.String field,
                java.lang.Object value)
Sets the given field to the given value.

Parameters:
field - The field to set.
value - The value to set the field to.

set

public void set(java.lang.String field,
                boolean value)
Sets the given field to the given boolean value.

Parameters:
field - The field to set.
value - The value to set the field to.

set

public void set(java.lang.String field,
                int value)
Sets the given field to the given int value.

Parameters:
field - The field to set.
value - The value to set the field to.

reset

public void reset(java.lang.String field,
                  int value)
Sets the given field to the given int value, replacing any values already present.

Parameters:
field - The field to set.
value - The value to set the field to.

set

public void set(java.lang.String field,
                double value)
Sets the given field to the given double value.

Parameters:
field - The field to set.
value - The value to set the field to.

getValue

public java.lang.Object getValue(java.lang.String field)
Gets the value of the given field.

Parameters:
field - The field to get.
Returns:
the value of the specified field.

isOrdered

public boolean isOrdered()
returns whether or not there is an order_by clause for this Criteria.

Returns:
boolean indicating whether there is an order_by clause.

isGrouped

public boolean isGrouped()
returns whether or not there is a group_by clause for this Criteria.

Returns:
boolean indicating whether there is a group_by.

setOrdered

public void setOrdered(java.lang.String clause)
Sets the order_by clause for this Criteria.

Parameters:
clause - the new value for the order_by clause This automatically sets isOrdered totrue.

setGrouped

public void setGrouped(java.lang.String clause)
Sets the group_by clause for this Criteria

Parameters:
clause - the new value for the group_by clause This automatically sets isGrouped totrue.

getOrdered

public java.lang.String getOrdered()
Returns the order_by clause of this Criteria.

Returns:
the order_by clause of this Criteria.

getGrouped

public java.lang.String getGrouped()
Returns the group_by clause of this Criteria.

Returns:
the group_by clause of this Criteria.