org.h2.result
Class ResultTempTable

java.lang.Object
  extended by org.h2.result.ResultTempTable
All Implemented Interfaces:
ResultExternal

public class ResultTempTable
extends java.lang.Object
implements ResultExternal

This class implements the temp table buffer for the LocalResult class.


Method Summary
 int addRow(Value[] values)
          Add a row to this object.
 int addRows(java.util.ArrayList<Value[]> rows)
          Add a number of rows to the result.
 void close()
          Close this object and delete the temporary file.
 boolean contains(Value[] values)
          Check if the given row exists in this object.
 ResultExternal createShallowCopy()
          Create a shallow copy of this object if possible.
 void done()
          This method is called after all rows have been added.
 Value[] next()
          Get the next row from the result.
 int removeRow(Value[] values)
          Remove the row with the given values from this object if such a row exists.
 void reset()
          Reset the current position of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createShallowCopy

public ResultExternal createShallowCopy()
Description copied from interface: ResultExternal
Create a shallow copy of this object if possible.

Specified by:
createShallowCopy in interface ResultExternal
Returns:
the shallow copy, or null

removeRow

public int removeRow(Value[] values)
Description copied from interface: ResultExternal
Remove the row with the given values from this object if such a row exists.

Specified by:
removeRow in interface ResultExternal
Parameters:
values - the row
Returns:
the new row count

contains

public boolean contains(Value[] values)
Description copied from interface: ResultExternal
Check if the given row exists in this object.

Specified by:
contains in interface ResultExternal
Parameters:
values - the row
Returns:
true if it exists

addRow

public int addRow(Value[] values)
Description copied from interface: ResultExternal
Add a row to this object.

Specified by:
addRow in interface ResultExternal
Parameters:
values - the row to add
Returns:
the new number of rows in this object

addRows

public int addRows(java.util.ArrayList<Value[]> rows)
Description copied from interface: ResultExternal
Add a number of rows to the result.

Specified by:
addRows in interface ResultExternal
Parameters:
rows - the list of rows to add
Returns:
the new number of rows in this object

close

public void close()
Description copied from interface: ResultExternal
Close this object and delete the temporary file.

Specified by:
close in interface ResultExternal

done

public void done()
Description copied from interface: ResultExternal
This method is called after all rows have been added.

Specified by:
done in interface ResultExternal

next

public Value[] next()
Description copied from interface: ResultExternal
Get the next row from the result.

Specified by:
next in interface ResultExternal
Returns:
the next row or null

reset

public void reset()
Description copied from interface: ResultExternal
Reset the current position of this object.

Specified by:
reset in interface ResultExternal