|
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.RelationStorage
public class RelationStorage
A store for maintaining the relations between a prevalent object and the other prevalent objects in the prevalent system. This store is consulted for determining the actions to be performed when deleting prevalent objects. This store is mainly responsible for enforcing managed relations between prevalent objects.
© Copyright 2008 Sans Pareil Technologies, Inc.
| Nested Class Summary | |
|---|---|
private class |
RelationStorage.DeleteRule
A class used to capture the names of the fields in a prevalent object that are related to the prevalent object being managed by this store. |
| Field Summary | |
|---|---|
private String |
className
The name of the prevalent object whose relations are being mapped. |
private Map<String,RelationStorage.DeleteRule> |
map
A map used to store the meta data associated with a prevalent object. |
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
RelationStorage(String name)
Create a new instance of the storage for the specified class name. |
|
| Method Summary | |
|---|---|
void |
add(PrevalentObject object,
String field,
ForeignKey.DeleteAction action)
A a new relationship to the store for the specified prevalent object. |
String |
getClassName()
Return the fully qualified class name of the prevalent object for which the reference relations are being stored. |
Map<String,ForeignKey.DeleteAction> |
getDeleteRules(String name)
Return a map of field name of delete actions for the specified prevalent class with which the class being managed has relations. |
Collection<String> |
getRelations()
Return the names of the classes that hold a reference to the prevalent class that is being managed. |
| 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<String,RelationStorage.DeleteRule> map
key to the map is the type of prevalent object, while
the value is a ForeignKey.DeleteAction object that
defines the action to be applied.
private final String className
| Constructor Detail |
|---|
public RelationStorage(String name)
name - The className value to use.| Method Detail |
|---|
public void add(PrevalentObject object,
String field,
ForeignKey.DeleteAction action)
object - The prevalent object that is related to the prevalent
object identified by className.field - The name of the field in object that is an
instance of type className.action - The delete action to use on the fiele when
the instance of type className is deleted.public Collection<String> getRelations()
public Map<String,ForeignKey.DeleteAction> getDeleteRules(String name)
name - The name of prevalent class with which relations are
maintained.
RelationStorage.DeleteRule.getRules()public String getClassName()
className value.
|
SPT Object Database API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||