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>
Modifier and Type | Method and Description |
---|---|
void |
addToList(P parent,
E e)
Add a erntity to his parent
|
E |
getChild(P parent,
String topiaId)
Obtain a child from the entity given his id.
|
Collection<E> |
getChilds(P parent)
Obtain the collection of childs from the entity.
|
String |
getPropertyName()
Obtain the name of the property containing childs.
|
boolean |
isEmpty(P parent)
Tests if the given entity has some childs.
|
void |
removeAll(P parent)
Remove all childs of the given parent.
|
void |
removeFromList(P parent,
E e)
Remove from a prent entity a given child.
|
void |
setChilds(P parent,
Collection<E> childs)
Set the childs of an entity
|
int |
size(P parent)
Obtain the number of childs for the given parent.
|
String getPropertyName()
E getChild(P parent, String topiaId)
parent
- the entity to querytopiaId
- the id of the researched child entity.null
, if not found.Collection<E> getChilds(P parent)
parent
- the entity to query.int size(P parent)
parent
- the entity to queryboolean isEmpty(P parent)
parent
- the entity to querytrue
is the given parent has no child.void setChilds(P parent, 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 entity to modifiye
- the entity to add in parent.TopiaException
- if any db problem while operationvoid removeFromList(P parent, E e) throws TopiaException
parent
- the entity to modifiye
- the child to remove.TopiaException
- if any pb while operation.void removeAll(P parent)
parent
- the entity to modifyCopyright © 2004–2022 Code Lutin. All rights reserved.