Package org.intermine.sql.writebatch
Class IndirectionTableBatch
- java.lang.Object
-
- org.intermine.sql.writebatch.IndirectionTableBatch
-
-
Constructor Summary
Constructors Modifier Constructor Description IndirectionTableBatch(java.lang.String leftColName, java.lang.String rightColName)
Constructor for this class.protected
IndirectionTableBatch(java.lang.String leftColName, java.lang.String rightColName, java.util.Set<Row> toInsert)
Constructor for dodgy temp table deleting stuff
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addRow(int left, int right)
Adds a row to the batch.void
clear()
Clears the batch.int
deleteRow(int left, int right)
Deletes a row from the batch.java.lang.String
getLeftColName()
Returns the left column name.java.lang.String
getRightColName()
Returns the right column name.java.util.Set<Row>
getRowsToDelete()
Returns the Set of rows to delete.java.util.Set<Row>
getRowsToInsert()
Returns the Set of rows to insert.int
getSize()
Returns the current amount of data, in bytes, held in this object.
-
-
-
Constructor Detail
-
IndirectionTableBatch
public IndirectionTableBatch(java.lang.String leftColName, java.lang.String rightColName)
Constructor for this class. Generates a batch with no data to write.- Parameters:
leftColName
- the left column namerightColName
- the right column name
-
IndirectionTableBatch
protected IndirectionTableBatch(java.lang.String leftColName, java.lang.String rightColName, java.util.Set<Row> toInsert)
Constructor for dodgy temp table deleting stuff- Parameters:
leftColName
- the left column namerightColName
- the right column nametoInsert
- the Set of Rows to insert
-
-
Method Detail
-
addRow
public int addRow(int left, int right)
Adds a row to the batch. Whatever the previous state of the database and batch, the table will end up with one row matching the arguments.- Parameters:
left
- the left int valueright
- the right int value- Returns:
- the number of bytes by which the batch should be deemed to have expanded
-
deleteRow
public int deleteRow(int left, int right)
Deletes a row from the batch. Whatever the previous state of the database and batch, the table will end up with no rows that match the arguments.- Parameters:
left
- the left int valueright
- the right int value- Returns:
- the number of bytes by which the batch should be deemed to have expanded
-
getLeftColName
public java.lang.String getLeftColName()
Returns the left column name.- Returns:
- leftColName
-
getRightColName
public java.lang.String getRightColName()
Returns the right column name.- Returns:
- rightColName
-
getRowsToDelete
public java.util.Set<Row> getRowsToDelete()
Returns the Set of rows to delete.- Returns:
- rowsToDelete
-
getRowsToInsert
public java.util.Set<Row> getRowsToInsert()
Returns the Set of rows to insert.- Returns:
- rowsToInsert
-
-