|
RSE Release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A class for managing a list of shadow objects that reference master objects.
Sometimes we have a master list of objects, and we let the user select a subset of that list and we wish to persist that users selections. To accomplish this, in your Rose model, follow these steps:
Once you have an instantiated and populated instance of this class, you can either choose to save it to disk in its own file (save/restore methods are supplied for this) or you can simply choose to store it as part of your own class via your own save and restore methods. If using MOF, and the containment of the manager class is modelled in your own containing class, this will happen automatically when you use mof to save your containing class instance.
| Method Summary | |
int |
addReferencingObject(IRSEBasePersistableReferencingObject object)
Add a referencing object to the managed list. |
String |
getName()
|
IRSEBasePersistableReferencingObject |
getReferencedObject(IRSEBasePersistableReferencedObject object)
Search list of referencing objects to see if one of them references the given referencable object. |
int |
getReferencingObjectCount()
Return how many referencing objects are currently in the list. |
List |
getReferencingObjectList()
|
int |
getReferencingObjectPosition(IRSEBasePersistableReferencingObject object)
Return the zero-based position of the given referencing object within the list. |
IRSEBasePersistableReferencingObject[] |
getReferencingObjects()
Return an array of the referencing objects currently being managed. |
boolean |
isReferenced(IRSEBasePersistableReferencedObject object)
Return true if the given referencable object is indeed referenced by a referencing object in the current list. |
void |
moveReferencingObjectPosition(int newPosition,
IRSEBasePersistableReferencingObject object)
Move the given referencing object to a new zero-based position in the list. |
void |
removeAllReferencingObjects()
Remove all objects from the list. |
void |
removeAndDeReferenceAllReferencingObjects()
Remove and dereference all objects from the list. |
int |
removeAndDeReferenceReferencingObject(IRSEBasePersistableReferencingObject object)
Remove and dereferences a referencing object from the managed list. |
int |
removeReferencingObject(IRSEBasePersistableReferencingObject object)
Remove a referencing object from the managed list. |
void |
setName(String value)
|
void |
setReferencingObjects(IRSEBasePersistableReferencingObject[] objects,
boolean deReference)
Set in one shot the list of referencing objects. |
| Method Detail |
public IRSEBasePersistableReferencingObject[] getReferencingObjects()
public void setReferencingObjects(IRSEBasePersistableReferencingObject[] objects,
boolean deReference)
objects - An array of referencing objects which is to become the new list.deReference - true to first de-reference all objects in the existing list.public int addReferencingObject(IRSEBasePersistableReferencingObject object)
public int removeReferencingObject(IRSEBasePersistableReferencingObject object)
Does NOT call removeReference on the master referenced object.
public int removeAndDeReferenceReferencingObject(IRSEBasePersistableReferencingObject object)
DOES call removeReference on the master referenced object.
public void removeAllReferencingObjects()
Does NOT call removeReference on the master referenced objects.
public void removeAndDeReferenceAllReferencingObjects()
DOES call removeReference on the master referenced objects.
public int getReferencingObjectCount()
public int getReferencingObjectPosition(IRSEBasePersistableReferencingObject object)
object - The referencing object to find position of.
public void moveReferencingObjectPosition(int newPosition,
IRSEBasePersistableReferencingObject object)
newPosition - New zero-based positionobject - The referencing object to movepublic boolean isReferenced(IRSEBasePersistableReferencedObject object)
object - The referencable object to which to search for a referencing object within this list
public IRSEBasePersistableReferencingObject getReferencedObject(IRSEBasePersistableReferencedObject object)
object - The referencable object to which to search for a referencing object within this list
public String getName()
public void setName(String value)
value - The new value of the Name attributepublic List getReferencingObjectList()
|
RSE Release 3.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||