EVEDemo.SWEEP
Class RelationExtent

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

public class RelationExtent
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

See Also:
Serialized Form

Field Summary
(package private)  java.util.Enumeration theIterator
          this enumaretion used for iterator
(package private)  java.util.Vector tuples
           
 
Constructor Summary
RelationExtent()
           
RelationExtent(java.io.DataInputStream din)
          Create RelationExtent from A DataInputStream(file)
RelationExtent(int Count, java.lang.String Value)
          Create RelationExtent from String and the Count.
RelationExtent(java.sql.ResultSet rs, int colNum)
           
RelationExtent(java.sql.ResultSet rs, int colNum, java.lang.String sign)
          should skip sign.
 
Method Summary
 void addTuple(Tuple newTuple)
           
 void calSign(int[] flags)
          Recalculate the sign for each tuple, depends on the signs.
 java.lang.Object clone()
          clone this RelationExtent
private  void DeleteOppositeTuples()
           
 void doProject(int[] flags)
          Do the projection on the extends depends on the flags.
 Tuple find(Tuple newTuple)
          Find the corresponding tuple in this relationextent without compare the counter
 Tuple getTuple(int i)
           
 void initIterator()
           
 void insertTuple(Tuple newTuple)
           
 RelationExtent minus(RelationExtent sndExtent)
           
 boolean moreTuple()
           
 int nextExtentSQL(java.lang.StringBuffer Query)
          This function will generate a part of SQL.
 int nextExtentSQL(java.lang.StringBuffer Query, java.lang.String sign)
          This function will generate a part of SQL.
 RelationExtent plus(RelationExtent sndExtent)
           
private  void reverse()
           
 int size()
           
 java.lang.String toString()
          Output the RelationExtent to String.
 void write(java.io.DataOutputStream dout)
           
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

tuples

java.util.Vector tuples

theIterator

java.util.Enumeration theIterator
this enumaretion used for iterator
Constructor Detail

RelationExtent

public RelationExtent()

RelationExtent

public RelationExtent(int Count,
                      java.lang.String Value)
Create RelationExtent from String and the Count. Only for integration with Andreas on Data Update Performance Evaluation.
Parameters:
Count - Count of the tuples
Value - Value of tuple, format: "A|B|C"

RelationExtent

public RelationExtent(java.io.DataInputStream din)
Create RelationExtent from A DataInputStream(file)

RelationExtent

public RelationExtent(java.sql.ResultSet rs,
                      int colNum)
               throws java.lang.Exception

RelationExtent

public RelationExtent(java.sql.ResultSet rs,
                      int colNum,
                      java.lang.String sign)
               throws java.lang.Exception
should skip sign. and set the Sign bit.
Method Detail

initIterator

public void initIterator()

moreTuple

public boolean moreTuple()

nextExtentSQL

public int nextExtentSQL(java.lang.StringBuffer Query)
This function will generate a part of SQL. It will generate a part of "insert" SQL.

nextExtentSQL

public int nextExtentSQL(java.lang.StringBuffer Query,
                         java.lang.String sign)
This function will generate a part of SQL. It will generate a part of "insert" SQL. Add SWEEPSIGN field.

minus

public RelationExtent minus(RelationExtent sndExtent)
                     throws java.lang.Exception

plus

public RelationExtent plus(RelationExtent sndExtent)
                    throws java.lang.Exception

getTuple

public Tuple getTuple(int i)

size

public int size()

reverse

private void reverse()

DeleteOppositeTuples

private void DeleteOppositeTuples()

write

public void write(java.io.DataOutputStream dout)

insertTuple

public void insertTuple(Tuple newTuple)
                 throws java.lang.Exception

addTuple

public void addTuple(Tuple newTuple)
              throws java.lang.Exception

find

public Tuple find(Tuple newTuple)
           throws java.lang.Exception
Find the corresponding tuple in this relationextent without compare the counter
Parameters:
Tuple - the finding tuple
the - matched tuple, otherwise null

clone

public java.lang.Object clone()
clone this RelationExtent
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Output the RelationExtent to String.
Overrides:
toString in class java.lang.Object

doProject

public void doProject(int[] flags)
               throws java.lang.Exception
Do the projection on the extends depends on the flags. e.g. have tuple (1,2,3,4,5), flags(0,3,2,0,1), then the result is (5,2,3).

calSign

public void calSign(int[] flags)
             throws java.lang.NullPointerException
Recalculate the sign for each tuple, depends on the signs.