|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--algebraTree.SchemaSQLOperator
Field Summary | |
protected boolean |
isLeaf
for intermediate results |
static boolean |
LEAF
these are DEFINEs for the Leafness status of an operator |
protected DBManager |
localDB
for intermediate results |
protected java.lang.String |
localQuery
I forgot what this was for... |
static boolean |
NOLEAF
these are DEFINEs for the Leafness status of an operator |
protected java.lang.String |
outputTableName
the name of the output table of this operator. |
(package private) Table |
pivotData
operator stores its pivotData for incremental update propagation. |
(package private) DBManager |
sourceDB
currently, only one source DB is supported. |
Constructor Summary | |
SchemaSQLOperator(DBManager myLocalDB,
boolean leafness)
|
Method Summary | |
protected boolean |
addPivot(java.lang.String pivotName)
add a pivot string to the pivot vector. |
private boolean |
changePivotCount(java.lang.String pivotName,
int increment)
change the pivot count for a certain element by a certain amount. |
protected abstract java.util.Vector |
computeLocalQueries()
returns a vector of strings of queries that have to be executed for this operator |
protected boolean |
decPivotCount(java.lang.String pivotName)
decrement pivot count. |
protected boolean |
delPivot(java.lang.String pivotName)
delete a pivot string from the pivot vector. |
protected boolean |
dropLocalTable()
drops this operator's table from the DB. |
protected boolean |
executeQuery()
executes all queries returned by computeLocalQueries(). |
protected boolean |
executeQuery(java.lang.String SQL)
Executes a query passed in a parameter against this node's database. |
protected Table |
executeUpdateQuery(java.lang.String tableName,
java.util.Vector schema,
Table updateTable)
this function builds an update query for data-changes and executes it. |
(package private) void |
executeUpdates(java.util.Vector updates)
This function takes a vector of updates and applies it to the outputRelation of this operator. |
protected void |
finalize()
in the finalize method we drop local tables. |
protected int |
findPivotCount(java.lang.String pivotName)
|
java.lang.String |
getRelName()
this is needed to find out what table name this operator has used. |
protected boolean |
incPivotCount(java.lang.String pivotName)
increments the count for a pivot element in this operator's (materialized) pivot vector. |
(package private) java.util.Vector |
propagateUpdate(Update upd)
every operator must know how to propagate incremental updates of any kind. |
void |
setQuery(java.lang.String s)
|
(package private) void |
setRelName(java.lang.String s)
sets the relation name of this operator. |
boolean |
setSourceDB(DBManager setSourceDB)
|
(package private) java.util.Vector |
tableToDeleteUpdates(java.lang.String tableName,
Table delta)
this function translates all tuples in delta into delete-tuple updates in table tableName |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final boolean LEAF
public static final boolean NOLEAF
protected DBManager localDB
protected boolean isLeaf
protected java.lang.String localQuery
protected java.lang.String outputTableName
Table pivotData
computeResult()
and will
then be maintained incrementally;DBManager sourceDB
Constructor Detail |
public SchemaSQLOperator(DBManager myLocalDB, boolean leafness)
Method Detail |
protected void finalize()
finalize
in class java.lang.Object
public void setQuery(java.lang.String s)
public java.lang.String getRelName()
void setRelName(java.lang.String s)
public boolean setSourceDB(DBManager setSourceDB)
protected boolean executeQuery(java.lang.String SQL)
protected boolean executeQuery()
protected boolean dropLocalTable()
protected abstract java.util.Vector computeLocalQueries()
void executeUpdates(java.util.Vector updates)
java.util.Vector propagateUpdate(Update upd)
protected int findPivotCount(java.lang.String pivotName)
protected boolean incPivotCount(java.lang.String pivotName)
protected boolean decPivotCount(java.lang.String pivotName)
private boolean changePivotCount(java.lang.String pivotName, int increment)
protected boolean addPivot(java.lang.String pivotName)
protected boolean delPivot(java.lang.String pivotName)
protected Table executeUpdateQuery(java.lang.String tableName, java.util.Vector schema, Table updateTable)
tableName
- is the name of the table to be queriedrelSchema
- is a vector of strings holding the attribute
names to be added to the where-clauseupdateTable
- is a table with attribute names and values
(the update to be constructed).java.util.Vector tableToDeleteUpdates(java.lang.String tableName, Table delta)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |