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 protected
AbstractUiListModifiable(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 boolean
add(D dto)
boolean
add(UiObject<D> uiObject)
boolean
checkFormat(UiMessageStack uiMessageStack)
Vérifie les UiObjects de la liste et remplis la pile d'erreur.protected abstract UiObject<D>
createUiObject(D dto)
boolean
equals(Object o)
UiObject<D>
get(int row)
DtDefinition
getDtDefinition()
DtListDelta<D>
getDtListDelta()
Class<D>
getObjectType()
int
hashCode()
int
indexOf(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)
boolean
remove(UiObject<D> dto)
int
size()
protected String
toContextKey(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:
getObjectType
in interfaceUiList<D extends DtObject>
- Returns:
- the object type of the list
-
getDtDefinition
public DtDefinition getDtDefinition()
- Specified by:
getDtDefinition
in 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:
checkFormat
in 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:
mergeAndCheckInput
in interfaceUiList<D extends DtObject>
uiMessageStack
- Pile des messages qui sera mise à jour- Returns:
- Liste métier valid�e.
-
equals
public boolean equals(Object o)
-
-