org.hecl.rms
Class RMSCmd

java.lang.Object
  extended by org.hecl.Operator
      extended by org.hecl.rms.RMSCmd
All Implemented Interfaces:
Command

public class RMSCmd
extends Operator

The RMSCmd class implements the record store related commands.

Version:
1.1
Author:
David N. Welton, Wolfgang S. Kechel

Field Summary
static int RMS_ADD
           
static int RMS_CREATE
           
static int RMS_DELETE
           
static int RMS_GET
           
static int RMS_HDEL
           
static int RMS_HEXISTS
           
static int RMS_HGET
           
static int RMS_HKEYS
           
static int RMS_HSET
           
static int RMS_LIST
           
static int RMS_SET
           
static int RMS_SETMODE
           
static int RMS_SIZE
           
static int RMS_SIZEAVAIL
           
 
Fields inherited from class org.hecl.Operator
cmdcode, maxargs, minargs
 
Constructor Summary
protected RMSCmd(int cmdcode, int minargs, int maxargs)
           
 
Method Summary
protected static void closeRS(javax.microedition.rms.RecordStore rs)
           
static int[] getRecordIds(java.lang.String name)
           
static void load(Interp ip)
           
 Thing operate(int cmd, Interp interp, Thing[] argv)
          The operate method dispatches to the actual code.
static java.lang.Object[] recordOf(javax.microedition.rms.RecordStore rs, java.lang.String key)
           
static void unload(Interp ip)
           
 
Methods inherited from class org.hecl.Operator
cmdCode, load, unload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RMS_LIST

public static final int RMS_LIST
See Also:
Constant Field Values

RMS_CREATE

public static final int RMS_CREATE
See Also:
Constant Field Values

RMS_GET

public static final int RMS_GET
See Also:
Constant Field Values

RMS_SET

public static final int RMS_SET
See Also:
Constant Field Values

RMS_SIZE

public static final int RMS_SIZE
See Also:
Constant Field Values

RMS_SIZEAVAIL

public static final int RMS_SIZEAVAIL
See Also:
Constant Field Values

RMS_DELETE

public static final int RMS_DELETE
See Also:
Constant Field Values

RMS_ADD

public static final int RMS_ADD
See Also:
Constant Field Values

RMS_HSET

public static final int RMS_HSET
See Also:
Constant Field Values

RMS_HGET

public static final int RMS_HGET
See Also:
Constant Field Values

RMS_HEXISTS

public static final int RMS_HEXISTS
See Also:
Constant Field Values

RMS_HKEYS

public static final int RMS_HKEYS
See Also:
Constant Field Values

RMS_HDEL

public static final int RMS_HDEL
See Also:
Constant Field Values

RMS_SETMODE

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

RMSCmd

protected RMSCmd(int cmdcode,
                 int minargs,
                 int maxargs)
Method Detail

closeRS

protected static void closeRS(javax.microedition.rms.RecordStore rs)
                       throws HeclException
Throws:
HeclException

operate

public Thing operate(int cmd,
                     Interp interp,
                     Thing[] argv)
              throws HeclException
Description copied from class: Operator
The operate method dispatches to the actual code.

Specified by:
operate in class Operator
Parameters:
cmd - an int value
interp - an Interp value
argv - a Thing[] value
Returns:
a Thing value, or null when no value has been
Throws:
HeclException - if an error occurs

getRecordIds

public static int[] getRecordIds(java.lang.String name)
                          throws HeclException
Throws:
HeclException

recordOf

public static java.lang.Object[] recordOf(javax.microedition.rms.RecordStore rs,
                                          java.lang.String key)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

load

public static void load(Interp ip)
                 throws HeclException
Throws:
HeclException

unload

public static void unload(Interp ip)
                   throws HeclException
Throws:
HeclException