Goovi
Class AmosInterface

java.lang.Object
  |
  +--callin.Connection
        |
        +--Goovi.AmosInterface

public class AmosInterface
extends callin.Connection

Class for that specializes callin.Connection class with extra functionallity needed by Goovi.

See Also:
Connection

Constructor Summary
AmosInterface(TypeBrowser tb, java.lang.String dbName)
          Constructor that creates an AmosInterface object
 
Method Summary
 callin.Oid createDerivedType(java.lang.String superTypeList, java.lang.String name, java.lang.String whereClause)
          Function for creating a derived type
 callin.Oid createType(java.lang.Object[] supertypes, java.lang.String typename)
          Function for creating a type
 void delete(Goovi.JCOutlinerNode[] nodes)
          Function for deleting a list of objects.
 callin.Scan execute(java.lang.String stmt)
          Call-through function overrides Connection#execute Adds a semicolon to the statement if not present.
 void importFunctions(StringVector names, java.lang.String dbName)
          Function for importing functions.
 void importTypes(StringVector typeNames, java.lang.String dbName)
          Function for importing types.
 
Methods inherited from class callin.Connection
addFunction, amosTopLoop, callFunction, callFunction, callFunction, callFunction, callFunction, callFunction, callFunction, callFunction, callOidFunction, callOidFunction, callStringFunction, callStringFunction, callTupleFunction, callTupleFunction, callTupleFunction, callTupleFunction, callTupleFunction, callTupleTupleFunction, clearFunctionCache, commit, createObject, deleteObject, disconnect, execute, finalize, getFunction, getObjectNumbered, getType, initializeAmos, initializeAmos, initJava, openScan, printErrForm, remFunction, rollback, setFunction
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AmosInterface

public AmosInterface(TypeBrowser tb,
                     java.lang.String dbName)
              throws callin.AmosException
Constructor that creates an AmosInterface object
Parameters:
tb - The typebrowser that this AmosInterface belongs to.
dbName - The name of the AMOS server to connect to.
Method Detail

execute

public callin.Scan execute(java.lang.String stmt)
                    throws callin.AmosException
Call-through function overrides Connection#execute Adds a semicolon to the statement if not present. Adds the statement text to the AmosConsole. While performing the query the cursor is changed into a wait cursor.
Parameters:
stmt - The statement to execute, possibly without ending semicolon.
Overrides:
execute in class callin.Connection
See Also:
Connection.execute(java.lang.String), AmosConsole

createDerivedType

public callin.Oid createDerivedType(java.lang.String superTypeList,
                                    java.lang.String name,
                                    java.lang.String whereClause)
                             throws callin.AmosException
Function for creating a derived type
Parameters:
superTypeList - List of form , , ...
name - Name of the derived type to be created.
whereClause - The where-clause of the derived type to be created.
Returns:
The oid of the created derived type.
Throws:
Thrown - if the creation failed.

createType

public callin.Oid createType(java.lang.Object[] supertypes,
                             java.lang.String typename)
                      throws callin.AmosException
Function for creating a type
Parameters:
supertypes - A String array containing the names of the supertypes as strings.
typename - Name of the type to be created.
Returns:
The oid of the created type.
Throws:
Thrown - if the creation failed.
See Also:
StringVector

delete

public void delete(Goovi.JCOutlinerNode[] nodes)
            throws java.lang.Exception
Function for deleting a list of objects.
Parameters:
nodes - An array of AmosNodes corresponding to the objects to be deleted.
Throws:
Thrown - if the deletion failed.
See Also:
Connection.deleteObject(callin.Oid)

importTypes

public void importTypes(StringVector typeNames,
                        java.lang.String dbName)
                 throws java.lang.Exception
Function for importing types. The database is imported if necesarry.
Parameters:
typeNames - A vector with the name of the types as strings.
dbName - The name of the database to import the types from.
Throws:
Thrown - if the importation failed.
See Also:
callin.Connection#delete

importFunctions

public void importFunctions(StringVector names,
                            java.lang.String dbName)
                     throws java.lang.Exception
Function for importing functions. The database is imported if necessary.
Parameters:
typeNames - A vector with the name of the functions as strings.
dbName - The name of the database to import the functions from.
Throws:
Thrown - if the importation failed.