R
- cached row typepublic abstract class UncommittedRow<R>
extends java.lang.Object
AbstractCache
. Contains a key used to
store uncommitted row in cache and a reference to the corresponding row object for that key.Constructor and Description |
---|
UncommittedRow(CacheKey cacheKey,
R row)
Constructs for a key and correspond row.
|
Modifier and Type | Method and Description |
---|---|
abstract UncommittedRow<R> |
delete(R row)
Performs a delete of new row on existing uncommitted row.
|
abstract UncommittedRow<R> |
deleted(R row)
Notifies cache that row has been deleted from database.
|
CacheKey |
getCacheKey()
Gets the cache key for uncommitted row.
|
R |
getRow()
Gets the row associated with this uncommitted row.
|
abstract UncommittedRow<R> |
insert(R row)
Performs an insert of new row on existing uncommitted row.
|
abstract UncommittedRow<R> |
inserted(R row)
Notifies cache that row has been inserted into database.
|
abstract UncommittedRow<R> |
save(R row)
Performs a save of new row on existing uncommitted row.
|
abstract UncommittedRow<R> |
saved(R row)
Notifies cache that row has been saved in database.
|
abstract R |
select()
Performs a primary key select on the uncommitted row.
|
abstract R |
selected(R row)
Notifies cache that row has been selected from database.
|
void |
setRow(R row)
Sets a replacement row for the existing row in this uncommitted row.
|
abstract UncommittedRow<R> |
update(R row)
Performs an update of new row on existing uncommitted row.
|
abstract void |
updateCommitted(Cache<R> cache)
Put this uncommitted row in committed map of cache.
|
abstract UncommittedRow<R> |
updated(R row)
Notifies cache that row has been updated in database.
|
public abstract R select() throws CacheException
CacheException
- if errorpublic abstract UncommittedRow<R> insert(R row) throws CacheException
DuplicateCacheException
unless uncommitted row represents a deleted row.row
- row to insertCacheException
- if errorpublic abstract UncommittedRow<R> update(R row) throws CacheException
row
- row to updateCacheException
- if errorpublic abstract UncommittedRow<R> save(R row) throws CacheException
row
- row to saveCacheException
- if errorpublic abstract UncommittedRow<R> delete(R row) throws CacheException
row
- row to deleteCacheException
- if errorpublic abstract R selected(R row) throws CacheException
row
- row that has been selectedCacheException
- if errorpublic abstract UncommittedRow<R> inserted(R row) throws CacheException
row
- row that has been insertedCacheException
- if errorpublic abstract UncommittedRow<R> updated(R row) throws CacheException
row
- row that has been updatedCacheException
- if errorpublic abstract UncommittedRow<R> saved(R row) throws CacheException
row
- row that has been savedCacheException
- if errorpublic abstract UncommittedRow<R> deleted(R row) throws CacheException
row
- row that has been deletedCacheException
- if errorpublic abstract void updateCommitted(Cache<R> cache) throws CacheException
cache
- cache to affectCacheException
- if errorpublic CacheKey getCacheKey()
public void setRow(R row)
row
- new rowpublic R getRow()