|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.sql.writebatch.TableBatch
public class TableBatch
A class representing all changes to be made to an SQL table.
| Constructor Summary | |
|---|---|
TableBatch()
Constructor for this class. |
|
| Method Summary | |
|---|---|
int |
addRow(java.lang.Object idValue,
java.lang.String[] colNames,
java.lang.Object[] values)
Adds a row to the batch. |
void |
clear()
Clears the batch. |
int |
deleteRow(java.lang.String idField,
java.lang.Object idValue)
Deletes a row from the batch. |
java.lang.String[] |
getColNames()
Returns the column names. |
java.lang.String |
getIdField()
Returns the idField. |
java.util.Set<java.lang.Object> |
getIdsToDelete()
Returns the delete set. |
java.util.Map<java.lang.Object,java.lang.Object> |
getIdsToInsert()
Returns the insert map. |
int |
getSize()
Returns the current amount of data, in bytes, held in this object. |
protected static int |
sizeOfArray(java.lang.Object[] array)
Calculates the size of an array, in bytes. |
protected static int |
sizeOfList(java.util.List<java.lang.Object[]> list)
Calculates the size of a List of arrays, in bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TableBatch()
| Method Detail |
|---|
public int addRow(java.lang.Object idValue,
java.lang.String[] colNames,
java.lang.Object[] values)
idValue - the value of the ID field for this row, or null if there is no relevant
idFieldcolNames - an array of names of fields that are in the tablevalues - an array of Objects to be put in the row, in the same order as colNames
public int deleteRow(java.lang.String idField,
java.lang.Object idValue)
idField - the name of the field that is the IDidValue - the value of the ID field for this row
public java.lang.String[] getColNames()
public java.lang.String getIdField()
public java.util.Map<java.lang.Object,java.lang.Object> getIdsToInsert()
public java.util.Set<java.lang.Object> getIdsToDelete()
public void clear()
clear in interface Tablepublic int getSize()
getSize in interface Tableprotected static int sizeOfArray(java.lang.Object[] array)
array - the array
protected static int sizeOfList(java.util.List<java.lang.Object[]> list)
list - a List of arrays
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||