public class H2ChildSet extends H2Set
This set will be stored in a separate table, and will be linked to its key in the main table via a foreign-key field.
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
fkId
The foreign key ID from the main table.
|
Constructor and Description |
---|
H2ChildSet(java.lang.Object fkId)
Create a new set and associate it with the specified key in the main table.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addSuper(java.lang.Object key)
Perform an add operation in this set, avoiding logging this change.
|
(package private) void |
logChange(long fileId,
long astId,
java.lang.Object key)
Log this change being made to the collection.
|
void |
persist()
Persist this collection to database.
|
(package private) void |
persistChanges(java.sql.PreparedStatement ps)
Persist the changes for this child set, using the specified insert statement.
|
add, addAll, clear, contains, remove
ceiling, clone, comparator, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, size, spliterator, subSet, subSet, tailSet, tailSet
containsAll, retainAll, toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compact, inPersist, unwrapValue, wrapValue
public H2ChildSet(java.lang.Object fkId)
fkId
- The foreign key ID from the main table.public void persist()
This is a no-op, as the main table will take care of persisting the values, in a single batch insert.
persist
in interface StoredCollection
persist
in class H2Set
void persistChanges(java.sql.PreparedStatement ps) throws java.sql.SQLException
ps
- The insert statement.java.sql.SQLException
- For SQL-related errors when setting the statement arguments.void addSuper(java.lang.Object key)
key
- The map key.void logChange(long fileId, long astId, java.lang.Object key)
fileId
- The AST file ID.astId
- The source AST ID.key
- The collection key.