ostore.client
Class OSUpdateTuple

java.lang.Object
  |
  +--ostore.client.OSUpdateTuple
All Implemented Interfaces:
QuickSerializable

public class OSUpdateTuple
extends Object
implements QuickSerializable

The OSUpdateTuple represents a tuple in an OSUpdate. The tuple is a predicate/action pair. The predicate, represented by an OSPredicate, is the root of a boolean expression of predicates; the action is an ordered list of OSActions.

The evaluation of tuples is described in the documentation of the OSUpdate.

Version:
$Id: OSUpdateTuple.java,v 1.18 2002/10/17 17:07:13 jeffpang Exp $
Author:
Patrick R. Eaton
See Also:
OSPredicate, OSAction

Constructor Summary
OSUpdateTuple(InputBuffer buffer)
           
OSUpdateTuple(OSPredicate predicate, OSAction action)
          Creates a new OSUpdateTuple that contains the given predicate and action.
 
Method Summary
 void appendAction(OSAction action)
          Appends an action to the end of the ordered action list.
 Vector getActions()
          Returns a vector of the tuple's actions.
 OSPredicate getPredicate()
          Returns the tuple's predicate.
 void prependAction(OSAction action)
          Prepends an action to the head of the ordered action list.
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 void setPredicate(OSPredicate predicate)
          Sets the tuple's predicate.
 String toString()
          Return the string representation of the tuple.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OSUpdateTuple

public OSUpdateTuple(OSPredicate predicate,
                     OSAction action)
Creates a new OSUpdateTuple that contains the given predicate and action.

Parameters:
predicate - the predicate for the tuple
action - the first action for the tuple

OSUpdateTuple

public OSUpdateTuple(InputBuffer buffer)
              throws QSException
Method Detail

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

setPredicate

public void setPredicate(OSPredicate predicate)
Sets the tuple's predicate.

Parameters:
predicate - the predicate for the tuple

getPredicate

public OSPredicate getPredicate()
Returns the tuple's predicate.

Returns:
the predicate for the tuple

appendAction

public void appendAction(OSAction action)
Appends an action to the end of the ordered action list.

Parameters:
action - the action to be appended

prependAction

public void prependAction(OSAction action)
Prepends an action to the head of the ordered action list.

Parameters:
action - the action to be prepended

getActions

public Vector getActions()
Returns a vector of the tuple's actions.

Returns:
a vector of the actions for the tuple

toString

public String toString()
Return the string representation of the tuple.

Overrides:
toString in class Object
Returns:
the string representation of the tuple