KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > datasystem > interfaces > _Database


1 package com.daffodilwoods.daffodildb.server.datasystem.interfaces;
2
3 import com.daffodilwoods.database.resource.DException;
4 import java.util.*;
5 import com.daffodilwoods.database.general.QualifiedIdentifier;
6
7 /**
8  *
9  * <p>Title: _Database</p>
10 * <p>Description: Its an interface that declares all the database operations.</p>
11  */

12 public interface _Database {
13
14   /**
15    * Used to retreive a table from the database.
16    * @param tableName Name of the table
17    * @return an object of table.
18    * @throws DException
19    */

20    public _Table getTable(QualifiedIdentifier tableName ) throws DException;
21
22    /**
23     * Retreives all the tables that exist in the database.
24     * @return a list of tables that exist in the database.
25     * @throws DException
26     */

27
28    /**
29     * Used to create a table with given parameters in the database
30     * @param tableName name of the table
31     * @param columnInfo Information required to create the table.
32     * @throws DException
33     */

34    public void createTable(QualifiedIdentifier tableName, Object JavaDoc columnInfo) throws DException;
35
36    /**
37     * Used to modify the table definition according to the new requirements
38     * @param tableName Name of the table
39     * @param oldDefinition Old table definition
40     * @param newDefinition New definition of the table
41     * @throws DException
42     */

43
44    /**
45     * Used to drop the table from the database.
46     * @param tableName Name of the table
47     * @throws DException
48     */

49    public void dropTable(QualifiedIdentifier tableName) throws DException;
50
51    /**
52     * Used to get the user who is working on the database
53     * @return Database user who is working on the database
54     * @throws DException
55     */

56    _DatabaseUser getDatabaseUser() throws DException;
57    /**
58     * Used to remove the entry of the table from the map.
59     * @param tableName Name of the table
60     * @throws DException
61     */

62    public void removeTable(QualifiedIdentifier tableName) throws DException;
63    public _DatabaseUser getTempDatabaseUser() throws DException;
64
65    _DatabaseUser getDatabaseUser(ArrayList tableNames) throws DException;
66     public void addFreeCluster(_DatabaseUser user, int address)throws DException;
67
68 }
69
Popular Tags