Updates the cached value for a row @param value The value to cache @param primaryKeys The primary keys used to mutate the row
(Object value, Object... primaryKeys)
| 112 | * @param primaryKeys The primary keys used to mutate the row |
| 113 | */ |
| 114 | public synchronized void update(Object value, Object... primaryKeys) { |
| 115 | checkKeys(primaryKeys); |
| 116 | SQLCacheEntry entry = new SQLCacheEntry(primaryKeys); |
| 117 | if (!cache.containsKey(entry)) { |
| 118 | return; |
| 119 | } |
| 120 | cache.remove(entry); |
| 121 | modified.add(entry); |
| 122 | cache.put(entry, value); |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * Gets the cached value for a row, or queries it if it has not been cached yet |