|
SPT Object Database API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.prevayler.ReferenceStorage
public class ReferenceStorage
A class used as the storage mechanism for storing the references to other prevalent objects from prevalent objects stored in the system.
© Copyright 2008 Sans Pareil Technologies, Inc.
| Nested Class Summary | |
|---|---|
private class |
ReferenceStorage.FieldStorage
The storage for all the references fields in a prevalent object. |
| Field Summary | |
|---|---|
private static long |
serialVersionUID
|
private Map<Object,ReferenceStorage.FieldStorage> |
storage
A map used to maintain the references for a prevalent object identified by its object id. |
| Constructor Summary | |
|---|---|
ReferenceStorage()
|
|
| Method Summary | |
|---|---|
void |
add(PrevalentObject object,
String name,
Object oid)
Add the specified reference information for the prevalent object to the store. |
Collection<String> |
getFields(PrevalentObject object)
Return a collection of field names that represent the references to other prevalent objects in the store for the specified prevalent object. |
Object |
getValue(PrevalentObject object,
String name)
Return the value associated with the specified prevalent object and reference field name. |
void |
remove(PrevalentObject object)
Remove the specified prevalent object from the store. |
void |
remove(PrevalentObject object,
String field)
Remove the reference(s) for the specified field in the specified prevalent object. |
void |
remove(PrevalentObject object,
String field,
Object objectId)
Remove the reference for the specified prevalent object from the specified field. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private final Map<Object,ReferenceStorage.FieldStorage> storage
| Constructor Detail |
|---|
public ReferenceStorage()
| Method Detail |
|---|
public void add(PrevalentObject object,
String name,
Object oid)
object - The prevalent object whose reference information is being
added to the store.name - The name of the field that contains a reference.oid - The oid for the referenced field.ReferenceStorage.FieldStorage.add(java.lang.String, java.lang.Object)public Collection<String> getFields(PrevalentObject object)
object - The prevalent object whose references are to be fetched.
ReferenceStorage.FieldStorage.getFields()
public Object getValue(PrevalentObject object,
String name)
object - The prevalent object in which the referenced field existsname - The name of the reference field.
ReferenceStorage.FieldStorage.getValue(java.lang.String)public void remove(PrevalentObject object)
object - The prevalent object to remove from the store.
public void remove(PrevalentObject object,
String field)
object - The prevalent object whose field reference(s) are to be
removed.field - The field whose reference(s) are to be removed.
public void remove(PrevalentObject object,
String field,
Object objectId)
object - The prevalent object whose reference is to be removed.field - The field in the prevalent object whose reference is to
be removed.objectId - The reference that is to be removed.
|
SPT Object Database API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||