Package io.vertigo.struts2.core
Class AbstractUiListUnmodifiable<O extends io.vertigo.datamodel.structure.model.DtObject>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<io.vertigo.vega.webservice.model.UiObject<O>>
-
- io.vertigo.struts2.core.AbstractUiListUnmodifiable<O>
-
- Type Parameters:
O- the type of entity
- All Implemented Interfaces:
io.vertigo.vega.webservice.model.UiList<O>,Serializable,Iterable<io.vertigo.vega.webservice.model.UiObject<O>>,Collection<io.vertigo.vega.webservice.model.UiObject<O>>,List<io.vertigo.vega.webservice.model.UiObject<O>>
- Direct Known Subclasses:
UiListUnmodifiable
public abstract class AbstractUiListUnmodifiable<O extends io.vertigo.datamodel.structure.model.DtObject> extends AbstractList<io.vertigo.vega.webservice.model.UiObject<O>> implements io.vertigo.vega.webservice.model.UiList<O>, Serializable
Wrapper d'affichage des listes d'objets métier.- Author:
- npiedeloup
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ComponentRef<io.vertigo.datastore.entitystore.EntityStoreManager>entityStoreManagerAccès au storeManager.protected ComponentRef<io.vertigo.commons.transaction.VTransactionManager>transactionManagerAccès au transactionManager.-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidclearUiObjectBuffer()Vide le buffer des UiObjects (potentiellement modifiés).io.vertigo.vega.webservice.model.UiObject<O>get(int index)io.vertigo.vega.webservice.model.UiObject<O>getById(String keyFieldName, String keyValueAsString)Récupère un objet par la valeur de son identifiant.io.vertigo.datamodel.structure.definitions.DtDefinitiongetDtDefinition()Class<O>getObjectType()protected Collection<io.vertigo.vega.webservice.model.UiObject<O>>getUiObjectBuffer()intindexOf(Object o)protected voidinitUiObjectByIdIndex()Initialize l'index des UiObjects par Id.voidinitUiObjectByKeyIndex(String keyFieldName)Initialize l'index des UiObjects par Clé.protected abstract io.vertigo.datamodel.structure.model.DtList<O>obtainDtList()Récupère la liste des elements.protected Map<String,io.vertigo.vega.webservice.model.UiObject<O>>obtainUiObjectByIdMap(String keyFieldName)Récupère l'index des UiObjects par Id.intsize()-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, iterator, lastIndexOf, listIterator, listIterator, remove, 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, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArray
-
-
-
-
Field Detail
-
entityStoreManager
protected final ComponentRef<io.vertigo.datastore.entitystore.EntityStoreManager> entityStoreManager
Accès au storeManager.
-
transactionManager
protected final ComponentRef<io.vertigo.commons.transaction.VTransactionManager> transactionManager
Accès au transactionManager.
-
-
Method Detail
-
getObjectType
public Class<O> getObjectType()
- Specified by:
getObjectTypein interfaceio.vertigo.vega.webservice.model.UiList<O extends io.vertigo.datamodel.structure.model.DtObject>
-
initUiObjectByIdIndex
protected final void initUiObjectByIdIndex()
Initialize l'index des UiObjects par Id. Attention : nécessite la DtList (appel obtainDtList).
-
initUiObjectByKeyIndex
public final void initUiObjectByKeyIndex(String keyFieldName)
Initialize l'index des UiObjects par Clé. Attention : nécessite la DtList (appel obtainDtList).- Parameters:
keyFieldName- Nom du champs à indexer
-
obtainDtList
protected abstract io.vertigo.datamodel.structure.model.DtList<O> obtainDtList()
Récupère la liste des elements. Peut-être appelé souvant : doit assurer un cache local (transient au besoin) si chargement.- Returns:
- Liste des éléments
-
getDtDefinition
public final io.vertigo.datamodel.structure.definitions.DtDefinition getDtDefinition()
- Specified by:
getDtDefinitionin interfaceio.vertigo.vega.webservice.model.UiList<O extends io.vertigo.datamodel.structure.model.DtObject>- Returns:
- DtDefinition de l'objet métier
-
get
public final io.vertigo.vega.webservice.model.UiObject<O> get(int index)
-
size
public final int size()
- Specified by:
sizein interfaceCollection<O extends io.vertigo.datamodel.structure.model.DtObject>- Specified by:
sizein interfaceList<O extends io.vertigo.datamodel.structure.model.DtObject>- Specified by:
sizein classAbstractCollection<io.vertigo.vega.webservice.model.UiObject<O extends io.vertigo.datamodel.structure.model.DtObject>>
-
indexOf
public int indexOf(Object o)
-
getById
public io.vertigo.vega.webservice.model.UiObject<O> getById(String keyFieldName, String keyValueAsString) throws io.vertigo.datamodel.structure.definitions.FormatterException
Récupère un objet par la valeur de son identifiant. Utilisé par les select, radio et autocomplete en mode ReadOnly.- Parameters:
keyFieldName- Nom du champ identifiantkeyValueAsString- Valeur de l'identifiant- Returns:
- UiObject
- Throws:
io.vertigo.datamodel.structure.definitions.FormatterException- Format error
-
obtainUiObjectByIdMap
protected final Map<String,io.vertigo.vega.webservice.model.UiObject<O>> obtainUiObjectByIdMap(String keyFieldName)
Récupère l'index des UiObjects par Id.- Parameters:
keyFieldName- Nom du champ identifiant- Returns:
- Index des UiObjects par Id
-
getUiObjectBuffer
protected final Collection<io.vertigo.vega.webservice.model.UiObject<O>> getUiObjectBuffer()
- Returns:
- Liste des uiObjects bufferisés (potentiellement modifiés).
-
clearUiObjectBuffer
protected final void clearUiObjectBuffer()
Vide le buffer des UiObjects (potentiellement modifiés).
-
-