org.maverickdbms.basic
Class Factory

java.lang.Object
  extended byorg.maverickdbms.basic.Factory
All Implemented Interfaces:
Program, Variable

public class Factory
extends java.lang.Object
implements Program

Factory is a factory class to produce and recycle objects needed by the BASIC program.


Method Summary
 void clearList(int index)
           
 void clearLists()
           
 boolean containsList(int index)
           
 void createFile(ConstantString type, ConstantString name, int flags, ConstantString[] fields)
           
 void deleteList(ConstantString record, mvString status)
           
 void dropFile(ConstantString type, ConstantString name)
           
 Array getArray()
           
 Program getCommand(ConstantString command)
           
 Common getCommon()
           
 Condition getCondition(Field f)
           
 Condition getCondition(int type, Condition vvv)
           
 Condition getCondition(int type, ConstantString vvv)
           
 ConstantString getConstant(double constant)
          Creates a new ConstantString from the specified double.
 ConstantString getConstant(int constant)
          Creates a new ConstantString from the specified integer.
 ConstantString getConstant(long constant)
          Creates a new ConstantString from the specified long.
 ConstantString getConstant(java.lang.String constant)
          Creates a new ConstantString from the specified String.
 ConstantString getFile(Program program, mvString var, ConstantString type, ConstantString name, int flags, mvString status)
           
 Formatter getFormatter(int type, ConstantString pattern, boolean convNull)
          Retuns a formatter of the specified type
 Key getKey()
           
 List getList(int index)
           
 ConstantString getList(mvString var, mvString count, ConstantString record, mvString status)
           
 MathInterface getMath()
           
 java.text.NumberFormat getNumberFormatter()
           
 OSFile getOSFile()
           
 Program getProgram(ConstantString name)
           
 SequentialFile getSequentialFile()
           
 Session getSession()
           
 mvString getStatus()
           
 mvString getString()
          Generates a mvString object.
 Terminals getTerminals()
           
 Tree getTree(int type)
           
 void popLists()
          Pops the current set of lists to restore a previous environment
 void popResolver()
           
 void pushLists()
          Pushes the current set of lists to create a new environment
 void pushResolver(Resolver r)
           
 void putString(mvString s)
          Returns a mvString object to the factory for reuse.
 void RELEASE()
           
 ConstantString run(Session session, mvString[] args)
           
 void setList(int index, List list)
           
 void writeList(ConstantString var, ConstantString record, mvString status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createFile

public void createFile(ConstantString type,
                       ConstantString name,
                       int flags,
                       ConstantString[] fields)
                throws mvException
Throws:
mvException

clearList

public void clearList(int index)
               throws mvException
Throws:
mvException

clearLists

public void clearLists()
                throws mvException
Throws:
mvException

containsList

public boolean containsList(int index)
                     throws mvException
Throws:
mvException

deleteList

public void deleteList(ConstantString record,
                       mvString status)
                throws mvException
Throws:
mvException

dropFile

public void dropFile(ConstantString type,
                     ConstantString name)
              throws mvException
Throws:
mvException

getArray

public Array getArray()

getCommand

public Program getCommand(ConstantString command)
                   throws mvException
Throws:
mvException

getCommon

public Common getCommon()

getCondition

public Condition getCondition(Field f)

getCondition

public Condition getCondition(int type,
                              ConstantString vvv)

getCondition

public Condition getCondition(int type,
                              Condition vvv)

getConstant

public ConstantString getConstant(double constant)
Creates a new ConstantString from the specified double.

Parameters:
constant - the integer.
Returns:
the ConstantString representation

getConstant

public ConstantString getConstant(int constant)
Creates a new ConstantString from the specified integer.

Parameters:
constant - the integer.
Returns:
the ConstantString representation

getConstant

public ConstantString getConstant(long constant)
Creates a new ConstantString from the specified long.

Parameters:
constant - the long.
Returns:
the ConstantString representation

getConstant

public ConstantString getConstant(java.lang.String constant)
Creates a new ConstantString from the specified String.

Parameters:
constant - the String.
Returns:
the ConstantString representation

getFile

public ConstantString getFile(Program program,
                              mvString var,
                              ConstantString type,
                              ConstantString name,
                              int flags,
                              mvString status)
                       throws mvException
Throws:
mvException

getFormatter

public Formatter getFormatter(int type,
                              ConstantString pattern,
                              boolean convNull)
                       throws mvException
Retuns a formatter of the specified type

Parameters:
type - The type of the formatter
pattern - The pattern the formatter should apply
convNull - On error whether null or the input string is returned
Returns:
the formatter
Throws:
mvException

getKey

public Key getKey()

getList

public List getList(int index)

getList

public ConstantString getList(mvString var,
                              mvString count,
                              ConstantString record,
                              mvString status)
                       throws mvException
Throws:
mvException

getMath

public MathInterface getMath()

getNumberFormatter

public java.text.NumberFormat getNumberFormatter()

getOSFile

public OSFile getOSFile()

getProgram

public Program getProgram(ConstantString name)
                   throws mvException
Throws:
mvException

getSequentialFile

public SequentialFile getSequentialFile()

getSession

public Session getSession()

getStatus

public mvString getStatus()

getString

public mvString getString()
Generates a mvString object.

Returns:
the mvString

getTerminals

public Terminals getTerminals()
                       throws mvException
Throws:
mvException

getTree

public Tree getTree(int type)

popLists

public void popLists()
              throws mvException
Pops the current set of lists to restore a previous environment

Throws:
mvException

popResolver

public void popResolver()

pushLists

public void pushLists()
Pushes the current set of lists to create a new environment


pushResolver

public void pushResolver(Resolver r)

putString

public void putString(mvString s)
Returns a mvString object to the factory for reuse.

Parameters:
s - the mvString

RELEASE

public void RELEASE()
             throws mvException
Throws:
mvException

run

public ConstantString run(Session session,
                          mvString[] args)
Specified by:
run in interface Program

setList

public void setList(int index,
                    List list)
             throws mvException
Throws:
mvException

writeList

public void writeList(ConstantString var,
                      ConstantString record,
                      mvString status)
               throws mvException
Throws:
mvException