org.oreodata.ref
Class RecordReference
java.lang.Object
|
+--org.oreodata.ref.RecordProxy
|
+--org.oreodata.ref.RecordReference
- All Implemented Interfaces:
- Record, RecordPointer
- public class RecordReference
- extends RecordProxy
A soft or weak reference to a record.
- Author:
- Jonathan Revusky
Field Summary |
protected java.lang.ref.Reference |
ref
|
Constructor Summary |
RecordReference(java.lang.String dataSourceName,
java.lang.String type,
java.lang.Object primaryKey,
boolean weak)
|
Methods inherited from class org.oreodata.ref.RecordProxy |
clearFields, equals, freeze, get, get, getChildren, getMetadata, getMutableCopy, getParent, hasChildren, isImmutable, isRootElement, isStale, set, set, setMetadata, setPrimaryKey, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ref
protected java.lang.ref.Reference ref
RecordReference
public RecordReference(java.lang.String dataSourceName,
java.lang.String type,
java.lang.Object primaryKey,
boolean weak)
getUnderlyingRecord
public Record getUnderlyingRecord()
wipeCachedInfo
public void wipeCachedInfo()
getType
public java.lang.String getType()
- Specified by:
getType
in interface Record
- Overrides:
getType
in class RecordProxy
- Returns:
- the name of this record type
subclasses must implement this. e.g. "reminder"
getPrimaryKey
public java.lang.Object getPrimaryKey()
- Description copied from interface:
Record
- Retrieve the value of the record's primary key.
- Specified by:
getPrimaryKey
in interface Record
- Overrides:
getPrimaryKey
in class RecordProxy
- Returns:
- the value of this record's primary key, or null if it
has not been set.
createReference
protected void createReference(Record rec)
- This creates a soft reference with no reference queue.
A subclass of this class could override this.