public class H2ChildMap extends H2Map
This map 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 |
---|
H2ChildMap(java.lang.Object fkId)
Create a new map and associate it with the specified key in the main table.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
logChange(long fileId,
long astId,
java.lang.Object key,
java.lang.Object value)
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 map, using the specified insert statement.
|
(package private) void |
putSuper(java.lang.Object key,
java.lang.Object value)
Perform a put operation in this map, avoiding logging this change.
|
clear, compact, containsKey, forceChange, get, put, putAll, remove, remove, unwrapValue, wrapValue
clone, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, putIfAbsent, replace, replace, replaceAll, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
inPersist
public H2ChildMap(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 H2Map
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 putSuper(java.lang.Object key, java.lang.Object value)
key
- The map key.value
- The map value.void logChange(long fileId, long astId, java.lang.Object key, java.lang.Object value)
fileId
- The AST file ID.astId
- The source AST ID.key
- The collection key.value
- The value, which is non-null only for maps.