public abstract class AbstractReference extends Object implements PersistitReference
PersistitReference
. A
concrete subclass implements the method: which should return the Object associated with the supplied id, orpublic Object lookup(Object id)
null
if there is none. The meaning of the identifier, and the
mechanism used to look up and deserialize the associated object (the
referent), are implementation-specific.Modifier and Type | Field and Description |
---|---|
protected Object |
_id |
protected boolean |
_knownNull |
protected Object |
_referent |
Modifier | Constructor and Description |
---|---|
protected |
AbstractReference()
No-arg constructor supplied for object serialization/deserialization.
|
protected |
AbstractReference(Object id)
Construct a reference using the persistent identity of an object.
|
protected |
AbstractReference(Object id,
Object referent)
Construct a reference to the referent Object with the supplied persistent
identifier.
|
Modifier and Type | Method and Description |
---|---|
Object |
get()
Gets the referent object.
|
protected abstract Object |
lookup(Object id)
Look up and instantiate an object using its persistent identifier.
|
protected Object _id
protected boolean _knownNull
protected transient Object _referent
protected AbstractReference()
protected AbstractReference(Object id, Object referent)
lookup
on the
persistent identifier. the object that would be returned by the lookupid
- The persistent identifier. The value of the id must be
associated with a unique referent object, and must be stable
over time.referent
- The object identified by the idprotected AbstractReference(Object id)
get
method will cause the
object to be looked up and instantiated.id
- public Object get()
get
in interface PersistitReference
Copyright © 2025 Open Identity Platform Community. All rights reserved.