All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class DSRG.MW.DBMAccess

java.lang.Object
   |
   +----DSRG.MW.DBManager
           |
           +----DSRG.MW.DBMAccess

public class DBMAccess
extends DBManager
implements Serializable

Variable Index

 o className
 o DB
 o instance
 o passwd
 o url
 o user

Constructor Index

 o DBMAccess()
Default Constructor
 o DBMAccess(String, String, String, String)
Constructor with name/password

Method Index

 o addAttribute(String, String, String, int)
addAttribute.
 o addAttributeAcc(String, String, String)
function necessary since Access doesn't provide metadata info in the SQL interface (...)
 o addRelation(String, Vector, Vector)
addRelation.
 o addRelationAcc(String, String)
function necessary since Access doesn't provide metadata info in the SQL interface (...)
 o deleteAttribute(String, String)
deleteAttribute.
 o deleteAttributeAcc(String, String)
function necessary since Access doesn't provide metadata info in the SQL interface (...)
 o deleteRelation(String, boolean)
deleteRelation.
 o deleteRelationAcc(String)
function necessary since Access doesn't provide metadata info in the SQL interface (...)
 o getDBManager()
Returns the handle to this instance of the DBManager or creates a new instance.
 o getLengthFromType(String)
Helper function.
 o getNameFromType(String)
Helper function.
 o getSchema(String)
Helper function.
 o renameAttribute(String, String, String)
renameAttribute.
 o renameAttributeAcc(String, String, String)
function necessary since Access doesn't provide metadata info in the SQL interface (...)
 o renameRelation(String, String)
renames a table by dropping the old one and creating the new one.
 o renameRelationAcc(String, String)
function necessary since Access doesn't provide metadata info in the SQL interface (...)
 o resetDB()
Added by Xinz and koeller ;-) Reset the database
 o resetDB(String)
Added by Xinz
Reset the database
 o storeRelation(Table)
stores a Table object in a database.

Variables

 o instance
 private DBMAccess instance
 o url
 private String url
 o user
 private String user
 o passwd
 private String passwd
 o className
 private String className
 o DB
 private String DB

Constructors

 o DBMAccess
 public DBMAccess()
Default Constructor

 o DBMAccess
 public DBMAccess(String myISName,
                  String name,
                  String password,
                  String URL)
Constructor with name/password

Methods

 o getDBManager
 public void getDBManager()
Returns the handle to this instance of the DBManager or creates a new instance.

 o addRelation
 public boolean addRelation(String relName,
                            Vector attNames,
                            Vector attTypes)
addRelation.
creates only the schema, does not insert data or anything
The types have to be like "VARCHAR(.." otherwise they're overwritten by "VARCHAR(31) 10/9/97 koeller

Overrides:
addRelation in class DBManager
 o deleteRelation
 public boolean deleteRelation(String name,
                               boolean silent)
deleteRelation.
10/6/97 koeller

Overrides:
deleteRelation in class DBManager
 o renameAttribute
 public boolean renameAttribute(String RelationName,
                                String oldName,
                                String newName)
renameAttribute.
10/6/97 koeller

Overrides:
renameAttribute in class DBManager
 o addAttribute
 public boolean addAttribute(String RelationName,
                             String AttributeName,
                             String type,
                             int size)
addAttribute.
Extents are being ignored, not needed/possible for the demo
10/6/97 koeller
patched 07/13/98, Error when creating "NUMBER" data type

Overrides:
addAttribute in class DBManager
 o deleteAttribute
 public boolean deleteAttribute(String RelationName,
                                String attributeName)
deleteAttribute.
10/6/97 koeller

Overrides:
deleteAttribute in class DBManager
 o addRelationAcc
 public boolean addRelationAcc(String RelationName,
                               String schema)
function necessary since Access doesn't provide metadata info in the SQL interface (...)

 o deleteRelationAcc
 private boolean deleteRelationAcc(String RelationName)
function necessary since Access doesn't provide metadata info in the SQL interface (...)

 o renameAttributeAcc
 private boolean renameAttributeAcc(String relationName,
                                    String oldName,
                                    String newName)
function necessary since Access doesn't provide metadata info in the SQL interface (...)

 o renameRelationAcc
 private boolean renameRelationAcc(String oldName,
                                   String newName)
function necessary since Access doesn't provide metadata info in the SQL interface (...)

 o addAttributeAcc
 private boolean addAttributeAcc(String relationName,
                                 String attributeName,
                                 String attributeType)
function necessary since Access doesn't provide metadata info in the SQL interface (...)

 o deleteAttributeAcc
 private boolean deleteAttributeAcc(String relationName,
                                    String attributeName)
function necessary since Access doesn't provide metadata info in the SQL interface (...)

 o storeRelation
 public boolean storeRelation(Table table)
stores a Table object in a database.
Creates a schema and stores data in there. Uses the relation's name and attribute names and lengths everything is created as "VARCHAR2" !! This is for view recomputation and should only be used on LocalIS

Overrides:
storeRelation in class DBManager
 o getNameFromType
 private String getNameFromType(String type)
Helper function.
extracts a name from a (simple) SQL-type

 o getLengthFromType
 private int getLengthFromType(String type)
Helper function.
extracts a data length from a (simple) SQL-type

 o renameRelation
 public boolean renameRelation(String oldName,
                               String newName)
renames a table by dropping the old one and creating the new one.

Overrides:
renameRelation in class DBManager
 o getSchema
 public String getSchema(String relationName)
Helper function.
This will read the Schema of a given table in the IS, concatenating it to a string of the form
([columnname type,] columnname type)

 o resetDB
 public void resetDB()
Added by Xinz and koeller ;-) Reset the database

 o resetDB
 void resetDB(String filename)
Added by Xinz
Reset the database


All Packages  Class Hierarchy  This Package  Previous  Next  Index