public class LiveRef<T> extends Ref<T>
Implementation of Refs which are "live" and connected to the datastore so they can fetch entity values even if they have not already been loaded. This is the standard Ref implementation.
Modifier and Type | Field and Description |
---|---|
protected Objectify |
ofy
So that Refs can be associated with a session
|
Modifier | Constructor and Description |
---|---|
protected |
LiveRef()
For GWT serialization
|
|
LiveRef(Key<T> key)
Create a Ref based on the key
|
|
LiveRef(Key<T> key,
Objectify ofy)
Create a Ref based on the key, with the specified session
|
Modifier and Type | Method and Description |
---|---|
T |
get()
Obtain the entity value associated with the key.
|
boolean |
isLoaded()
If an entity has been loaded into the session or is otherwise available, this will return true.
|
protected Object |
writeReplace()
When this serializes, write out the DeadRef version.
|
protected transient Objectify ofy
public T get()
Ref
public boolean isLoaded()
Ref
protected Object writeReplace() throws ObjectStreamException
ObjectStreamException
Copyright © 2016. All rights reserved.