EVEDemo.SWEEP
Class DatabaseInterface

java.lang.Object
  |
  +--EVEDemo.SWEEP.DatabaseInterface

public class DatabaseInterface
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
(package private) static java.sql.Connection con
           
(package private) static int cur_cursors
          The currend cursor-opened.
(package private) static int cursor_open
          The maximum number of statements I can created at the same time.
(package private) static java.lang.String driver
           
(package private) static java.lang.String logname
           
(package private) static java.lang.String logpass
           
(package private) static int unique
           
(package private) static java.lang.String url
           
 
Constructor Summary
DatabaseInterface()
           
 
Method Summary
(package private)  void closeCursor(java.sql.Statement stmt)
          closeCursor for this statement.
 void createTable(Relation theRelation)
           
 void createTable(Relation theRelation, java.lang.String sign)
          Add Sign Field SWEEPSIGN.
 void createTable(Relation theRelation, java.lang.String sign, java.sql.Statement stmt)
          Add Sign Field SWEEPSIGN.
 void dropTable(Relation theRelation)
           
 void dropTable(Relation theRelation, java.sql.Statement stmt)
           
 Relation executeQuery(java.lang.String Query)
           
 void executeUpdate(java.lang.String Query)
           
 void finalize()
           
 Relation getRelation(java.lang.String RelationName, int Index)
           
 Relation join(Relation theView, Relation theRelation)
          Join operation on the remote IS.
 Relation joinLocal(Relation theView, Relation theRelation)
          Join on the Local Datawarehouse.
 Relation joinLocalOn(Relation theView, Relation theRelation, java.lang.String Attr1, java.lang.String Attr2)
          Join on the Local Datawarehouse on the specified Join attributes.
 Relation joinOn(Relation theView, Relation theRelation, java.lang.String att1, java.lang.String att2)
          Join operation on the remote IS.
(package private)  int nextUnique()
           
(package private)  java.sql.Statement openCursor()
          openCursor for this connection.
(package private)  void UpdateView(ViewDefinition View, Relation theUpdate)
          This Function will update the View stored on the Oracle by using the Update.
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

con

static java.sql.Connection con

url

static java.lang.String url

driver

static java.lang.String driver

logname

static java.lang.String logname

logpass

static java.lang.String logpass

cursor_open

static int cursor_open
The maximum number of statements I can created at the same time.

cur_cursors

static int cur_cursors
The currend cursor-opened.

unique

static int unique
Constructor Detail

DatabaseInterface

public DatabaseInterface()
Method Detail

openCursor

java.sql.Statement openCursor()
openCursor for this connection.

closeCursor

void closeCursor(java.sql.Statement stmt)
closeCursor for this statement.

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

createTable

public void createTable(Relation theRelation,
                        java.lang.String sign,
                        java.sql.Statement stmt)
Add Sign Field SWEEPSIGN. Now I need this method can support more than one threads call it. So, I need to distinguish the statements each time some threads called.

createTable

public void createTable(Relation theRelation,
                        java.lang.String sign)
Add Sign Field SWEEPSIGN. Now I need this method can support more than one threads call it. So, I need to distinguish the statements each time some threads called.

createTable

public void createTable(Relation theRelation)

join

public Relation join(Relation theView,
                     Relation theRelation)
Join operation on the remote IS.

joinOn

public Relation joinOn(Relation theView,
                       Relation theRelation,
                       java.lang.String att1,
                       java.lang.String att2)
Join operation on the remote IS. It will join on different named attribute. Att1 and att2. This joinOn function will add the relation name to the attribute names of the local relations in the Result.

joinLocal

public Relation joinLocal(Relation theView,
                          Relation theRelation)
Join on the Local Datawarehouse.

joinLocalOn

public Relation joinLocalOn(Relation theView,
                            Relation theRelation,
                            java.lang.String Attr1,
                            java.lang.String Attr2)
Join on the Local Datawarehouse on the specified Join attributes.

dropTable

public void dropTable(Relation theRelation)

dropTable

public void dropTable(Relation theRelation,
                      java.sql.Statement stmt)

getRelation

public Relation getRelation(java.lang.String RelationName,
                            int Index)

executeUpdate

public void executeUpdate(java.lang.String Query)
                   throws java.lang.Exception

executeQuery

public Relation executeQuery(java.lang.String Query)
                      throws java.lang.Exception

UpdateView

void UpdateView(ViewDefinition View,
                Relation theUpdate)
This Function will update the View stored on the Oracle by using the Update. 1. It will project the Update to View Schema.

2. Convert projected Update to Oracle.

Problem: How to delete tuple from oracle for only couple of them, e.g.

Original: (5,6)[5], Delete: (5,6)[3], Result: (5,6)[2]. Solution: delete from

where and rownum =1;

nextUnique

int nextUnique()