|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
P - the type of the entity which contains the collection to update.E - the type of entities in the collection.public interface ListUpdator<P,E>
A simple contract to allow you to update some collections of an entity.
The purpose of the contract is to make possible (via a StorageService for example) some automatic and generic behaviour when you want to set a collection of childs into a entity.
| Method Summary | |
|---|---|
void |
addToList(P parent,
E e)
Add a erntity to his parent |
E |
getChild(P parent,
java.lang.String topiaId)
Obtain a child from the entity given his id. |
java.util.Collection<E> |
getChilds(P parent)
Obtain the collection of childs from the entity. |
void |
removeFromList(P parent,
E e)
Remove from a prent entity a given child. |
void |
setChilds(P parent,
java.util.Collection<E> childs)
Set the childs of an entity |
| Method Detail |
|---|
E getChild(P parent,
java.lang.String topiaId)
parent - the entity to querytopiaId - the id of the researched child entity.
null, if not found.java.util.Collection<E> getChilds(P parent)
parent - the entity to query.
void setChilds(P parent,
java.util.Collection<E> childs)
parent - the entity to be settedchilds - the collection of childs to set.
void addToList(P parent,
E e)
throws TopiaException
parent - the parent entitye - the entity to add in parent.
TopiaException - if any db problem while operation
void removeFromList(P parent,
E e)
throws TopiaException
parent - the parent entitye - the child to remove.
TopiaException - if any pb while operation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||