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
-
className
-
-
DB
-
-
instance
-
-
passwd
-
-
url
-
-
user
-
-
DBMAccess()
- Default Constructor
-
DBMAccess(String, String, String, String)
- Constructor with name/password
-
addAttribute(String, String, String, int)
- addAttribute.
-
addAttributeAcc(String, String, String)
-
function necessary since Access doesn't provide metadata info in the SQL interface
(...)
-
addRelation(String, Vector, Vector)
- addRelation.
-
addRelationAcc(String, String)
-
function necessary since Access doesn't provide metadata info in the SQL interface
(...)
-
deleteAttribute(String, String)
- deleteAttribute.
-
deleteAttributeAcc(String, String)
-
function necessary since Access doesn't provide metadata info in the SQL interface
(...)
-
deleteRelation(String, boolean)
- deleteRelation.
-
deleteRelationAcc(String)
-
function necessary since Access doesn't provide metadata info in the SQL interface
(...)
-
getDBManager()
- Returns the handle to this instance of the DBManager or creates a new
instance.
-
getLengthFromType(String)
- Helper function.
-
getNameFromType(String)
- Helper function.
-
getSchema(String)
- Helper function.
-
renameAttribute(String, String, String)
- renameAttribute.
-
renameAttributeAcc(String, String, String)
-
function necessary since Access doesn't provide metadata info in the SQL interface
(...)
-
renameRelation(String, String)
-
renames a table by dropping the old one and creating the new one.
-
renameRelationAcc(String, String)
-
function necessary since Access doesn't provide metadata info in the SQL interface
(...)
-
resetDB()
- Added by Xinz and koeller ;-)
Reset the database
-
resetDB(String)
- Added by Xinz
Reset the database
-
storeRelation(Table)
-
stores a Table object in a database.
instance
private DBMAccess instance
url
private String url
user
private String user
passwd
private String passwd
className
private String className
DB
private String DB
DBMAccess
public DBMAccess()
- Default Constructor
DBMAccess
public DBMAccess(String myISName,
String name,
String password,
String URL)
- Constructor with name/password
getDBManager
public void getDBManager()
- Returns the handle to this instance of the DBManager or creates a new
instance.
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
deleteRelation
public boolean deleteRelation(String name,
boolean silent)
- deleteRelation.
10/6/97 koeller
- Overrides:
- deleteRelation in class DBManager
renameAttribute
public boolean renameAttribute(String RelationName,
String oldName,
String newName)
- renameAttribute.
10/6/97 koeller
- Overrides:
- renameAttribute in class DBManager
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
deleteAttribute
public boolean deleteAttribute(String RelationName,
String attributeName)
- deleteAttribute.
10/6/97 koeller
- Overrides:
- deleteAttribute in class DBManager
addRelationAcc
public boolean addRelationAcc(String RelationName,
String schema)
- function necessary since Access doesn't provide metadata info in the SQL interface
(...)
deleteRelationAcc
private boolean deleteRelationAcc(String RelationName)
- function necessary since Access doesn't provide metadata info in the SQL interface
(...)
renameAttributeAcc
private boolean renameAttributeAcc(String relationName,
String oldName,
String newName)
- function necessary since Access doesn't provide metadata info in the SQL interface
(...)
renameRelationAcc
private boolean renameRelationAcc(String oldName,
String newName)
- function necessary since Access doesn't provide metadata info in the SQL interface
(...)
addAttributeAcc
private boolean addAttributeAcc(String relationName,
String attributeName,
String attributeType)
- function necessary since Access doesn't provide metadata info in the SQL interface
(...)
deleteAttributeAcc
private boolean deleteAttributeAcc(String relationName,
String attributeName)
- function necessary since Access doesn't provide metadata info in the SQL interface
(...)
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
getNameFromType
private String getNameFromType(String type)
- Helper function.
extracts a name from a (simple) SQL-type
getLengthFromType
private int getLengthFromType(String type)
- Helper function.
extracts a data length from a (simple) SQL-type
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
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)
resetDB
public void resetDB()
- Added by Xinz and koeller ;-)
Reset the database
resetDB
void resetDB(String filename)
- Added by Xinz
Reset the database
All Packages Class Hierarchy This Package Previous Next Index