ostore.client
Class OSActionSetMetadata

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

public class OSActionSetMetadata
extends OSAction

The OSActionSetMetadata action is used to assign a value to a field in the metadata.

Version:
$Id: OSActionSetMetadata.java,v 1.18 2004/02/13 23:14:42 rrubin Exp $
Author:
Patrick R. Eaton

Field Summary
static int BRANCH_AGUID
           
static int BRANCH_HEAD
           
static int BRANCH_NUM
           
static int BRANCH_VGUID
           
static int CACHE_UNTIL
           
static boolean DEBUG
           
 
Constructor Summary
OSActionSetMetadata(InputBuffer buffer)
           
OSActionSetMetadata(SecureHash aguid, int field, Object value)
          Creates a new OSActionSetMetadata.
OSActionSetMetadata(SecureHash aguid, String field, Object value)
           
 
Method Summary
 Object getField()
          Returns the name of the metadata field to be modified.
 SecureHash getTargetAguid()
          Returns the Aguid of the object that this update modifies.
 Object getValue()
          Returns the value to which the specified metadata field will be set.
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values

CACHE_UNTIL

public static final int CACHE_UNTIL
See Also:
Constant Field Values

BRANCH_NUM

public static final int BRANCH_NUM
See Also:
Constant Field Values

BRANCH_VGUID

public static final int BRANCH_VGUID
See Also:
Constant Field Values

BRANCH_AGUID

public static final int BRANCH_AGUID
See Also:
Constant Field Values

BRANCH_HEAD

public static final int BRANCH_HEAD
See Also:
Constant Field Values
Constructor Detail

OSActionSetMetadata

public OSActionSetMetadata(SecureHash aguid,
                           int field,
                           Object value)
                    throws OSIllegalArgumentException
Creates a new OSActionSetMetadata.

Parameters:
aguid - the aguid of the data object to modify
field - a constant representing the field of metadata to be changed
value - the value to assign to the specified metadata field

OSActionSetMetadata

public OSActionSetMetadata(SecureHash aguid,
                           String field,
                           Object value)

OSActionSetMetadata

public OSActionSetMetadata(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
Overrides:
serialize in class OSAction
Parameters:
buffer - the output buffer to add the object to

getTargetAguid

public SecureHash getTargetAguid()
Returns the Aguid of the object that this update modifies.

Specified by:
getTargetAguid in class OSAction
Returns:
the Aguid of the object that this update modifies

getField

public Object getField()
Returns the name of the metadata field to be modified. If the field is a system-defined field represented by an constant, an Integer containing this constant will be returned. If the field is a user-defined field, a String naming the field will be returned.

Returns:
the name of the metadata field to be modified.

getValue

public Object getValue()
Returns the value to which the specified metadata field will be set.

Returns:
the value to which the metadata field will be set

toString

public String toString()
Specified by:
toString in class OSAction