public class LocalHandle<T,PK,S extends Store<T,PK,S>> extends Object implements Store.Handle<T,PK,S>
| Modifier and Type | Class and Description |
|---|---|
static class |
LocalHandle.HandleStrength |
| Constructor and Description |
|---|
LocalHandle(LocalStoreBase<T,PK,S> store,
T obj,
PK primaryKey,
Map<S,Map<Extractor<T,? super PK,S>,? super PK>> cache,
Predicate<T,S>[] validators,
LocalHandle.HandleStrength handleStrength,
boolean cacheExtracted) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
<V> V |
extract(Extractor<T,V,S> extractor)
Extracts value from handle's object using given extractor
and internal handle's cache.
|
T |
get() |
protected Map<S,Map<Extractor<T,? super PK,S>,? super PK>> |
getCache() |
PK |
getPrimaryKey() |
int |
hashCode() |
boolean |
isValid() |
void |
remove()
Removes object referenced by this handle.
|
String |
toString() |
void |
update()
Clears cache and updates
indexes.
|
void |
update(T obj)
Updates object referenced by this handle.
|
public void update(T obj)
Store.Handlepublic void update()
Store.Handlepublic void remove()
Store.Handlepublic PK getPrimaryKey()
getPrimaryKey in interface Store.Handle<T,PK,S extends Store<T,PK,S>>public boolean isValid()
public <V> V extract(Extractor<T,V,S> extractor)
Store.Handle