Class AbstractUiListModifiable<D extends DtObject>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<UiObject<D>>
-
- io.vertigo.vega.engines.webservice.json.AbstractUiListModifiable<D>
-
- Type Parameters:
D- Type d'objet
- All Implemented Interfaces:
UiList<D>,Serializable,Iterable<UiObject<D>>,Collection<UiObject<D>>,List<UiObject<D>>
- Direct Known Subclasses:
UiListModifiable
public abstract class AbstractUiListModifiable<D extends DtObject> extends AbstractList<UiObject<D>> implements UiList<D>, Serializable
Version modifiable des UiList.- Author:
- npiedeloup
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractUiListModifiable(DtList<D> dtList, String inputKey)Constructor.AbstractUiListModifiable(DtList<D> dtList, String inputKey, Consumer<U> postInit)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanadd(D dto)booleanadd(UiObject<D> uiObject)booleancheckFormat(UiMessageStack uiMessageStack)Vérifie les UiObjects de la liste et remplis la pile d'erreur.protected abstract UiObject<D>createUiObject(D dto)booleanequals(Object o)UiObject<D>get(int row)DtDefinitiongetDtDefinition()DtListDelta<D>getDtListDelta()Class<D>getObjectType()inthashCode()intindexOf(Object o)Get indexOf element : support UiObject and DtObject.Iterator<UiObject<D>>iterator()DtList<D>mergeAndCheckInput(List<DtObjectValidator<D>> validators, UiMessageStack uiMessageStack)Vérifie les UiObjects de la liste, met à jour les objets métiers et retourne la liste.UiObject<D>remove(int index)booleanremove(UiObject<D> dto)intsize()protected StringtoContextKey(String inputKey, int index)-
Methods inherited from class java.util.AbstractList
add, addAll, clear, lastIndexOf, listIterator, listIterator, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, addAll, addAll, clear, contains, containsAll, isEmpty, lastIndexOf, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArray
-
-
-
-
Method Detail
-
getObjectType
public Class<D> getObjectType()
- Specified by:
getObjectTypein interfaceUiList<D extends DtObject>- Returns:
- the object type of the list
-
getDtDefinition
public DtDefinition getDtDefinition()
- Specified by:
getDtDefinitionin interfaceUiList<D extends DtObject>- Returns:
- DtDefinition de l'objet métier
-
remove
public boolean remove(UiObject<D> dto)
- Parameters:
dto- Element to removed- Returns:
- If element was removed
-
add
public boolean add(D dto)
- Parameters:
dto- Element to add- Returns:
- true (as specified by Collection.add)
-
getDtListDelta
public DtListDelta<D> getDtListDelta()
- Returns:
- DtListDelta
-
indexOf
public int indexOf(Object o)
Get indexOf element : support UiObject and DtObject. UiObject is always build over a DtObject.
-
size
public int size()
-
checkFormat
public boolean checkFormat(UiMessageStack uiMessageStack)
Vérifie les UiObjects de la liste et remplis la pile d'erreur.- Specified by:
checkFormatin interfaceUiList<D extends DtObject>- Parameters:
uiMessageStack- Pile des messages qui sera mise à jour- Returns:
- if the object is valid (no format errors) if it's not valid you must not call mergeAndCheckInput
-
mergeAndCheckInput
public DtList<D> mergeAndCheckInput(List<DtObjectValidator<D>> validators, UiMessageStack uiMessageStack)
Vérifie les UiObjects de la liste, met à jour les objets métiers et retourne la liste.- Specified by:
mergeAndCheckInputin interfaceUiList<D extends DtObject>uiMessageStack- Pile des messages qui sera mise à jour- Returns:
- Liste métier valid�e.
-
equals
public boolean equals(Object o)
-
-