Package com._1c.g5.v8.dt.aef2.bm.models
Class BmList<T>
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.models.EditableModel
-
- com._1c.g5.aef2.models.list.ListModel<T>
-
- com._1c.g5.v8.dt.aef2.bm.models.BmList<T>
-
- Type Parameters:
T
- the type of the list values
- All Implemented Interfaces:
IAttribute<IBmObject,org.eclipse.emf.ecore.EStructuralFeature>
,IEditableModel
,IEmfAttribute<IBmObject>
,IModel
,IEmfListAttribute<T,IBmObject>
,IList<T>
,IValidable
,IModelApiAwareModel
,Iterable<T>
,Collection<T>
,List<T>
- Direct Known Subclasses:
AbstractBmChoiceParametersModel
,BmChoiceParameterLinksModel
,BmListIRequiredPermissionsModel
,BmListMobileApplicationUrlsModel
,BmListSelectionModel
,BmTimeScaleLevelsLinkModel
,NavigatorTableModel
,NavigatorTreeDialogActionBarBmList
public class BmList<T> extends ListModel<T> implements IEmfListAttribute<T,IBmObject>, IModelApiAwareModel
Represents a BM object feature list model.
-
-
Constructor Summary
Constructors Constructor Description BmList(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature)
Instantiates a new BM list.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static IModelApiTaskN<Void>
adapt(IBmTask<?> bmTask)
Converts the specified BM task toIModelApiTaskN
.protected IModelApiTaskN<Void>
createTask(IBmObject object, org.eclipse.emf.ecore.EStructuralFeature feature, List<T> valueToApply)
Creates anIModelApiTaskN
that executes during applying changes.void
dispose()
Disposes this model.IChange
getChange()
IModelApi
getModelApi()
Returns the model API.IBmObject
getObject()
Returns the object that keeps the attribute.org.eclipse.emf.ecore.EStructuralFeature
getProperty()
Returns the property.void
setModelApi(IModelApi modelApi)
Sets the specified API to the model.protected void
setObjectValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, List<T> newValue)
Sets the new value of the provided model object feature during the commit.
The method is invoked within the task, so the given objects have the relevant state (e.g.-
Methods inherited from class com._1c.g5.aef2.models.list.ListModel
add, add, addAll, addAll, addListListener, clear, contains, containsAll, createWorkingCopy, discard, fill, get, getCommittedList, getUncommittedList, indexOf, isElementEqual, isEmpty, isEqual, iterator, lastIndexOf, listIterator, listIterator, notifyListChanged, queueNotifyListChanged, remove, remove, removeAll, removeListListener, retainAll, set, setCommittedList, setList, setUncommitedList, size, subList, toArray, toArray, toString
-
Methods inherited from class com._1c.g5.aef2.models.EditableModel
isEditable, setEditable
-
Methods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setComponent, setOnline
-
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, getValidatorTarget, removeValidator, validate, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface com._1c.g5.aef2.models.list.IList
addListListener, createWorkingCopy, fill, isEqual, removeListListener
-
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, discard, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Method Detail
-
getChange
public IChange getChange()
-
dispose
public void dispose()
Description copied from interface:IModel
Disposes this model.
-
getObject
public IBmObject getObject()
Description copied from interface:IAttribute
Returns the object that keeps the attribute.- Specified by:
getObject
in interfaceIAttribute<IBmObject,org.eclipse.emf.ecore.EStructuralFeature>
- Returns:
- the object that keeps the attribute.
-
getProperty
public org.eclipse.emf.ecore.EStructuralFeature getProperty()
Description copied from interface:IAttribute
Returns the property.- Specified by:
getProperty
in interfaceIAttribute<IBmObject,org.eclipse.emf.ecore.EStructuralFeature>
- Returns:
- the property.
-
setModelApi
public void setModelApi(IModelApi modelApi)
Description copied from interface:IModelApiAwareModel
Sets the specified API to the model.- Specified by:
setModelApi
in interfaceIModelApiAwareModel
- Parameters:
modelApi
- the API, can benull
.
-
getModelApi
public IModelApi getModelApi()
Description copied from interface:IModelApiAwareModel
Returns the model API.- Specified by:
getModelApi
in interfaceIModelApiAwareModel
- Returns:
- the model API or
null
if it is not set.
-
createTask
protected IModelApiTaskN<Void> createTask(IBmObject object, org.eclipse.emf.ecore.EStructuralFeature feature, List<T> valueToApply)
Creates anIModelApiTaskN
that executes during applying changes.- Parameters:
object
- the object to change, cannot benull
.feature
- the feature the feature to change, cannot benull
.valueToApply
- the value to apply.- Returns:
- the created
IModelApiTaskN
.
-
setObjectValue
protected void setObjectValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, List<T> newValue)
Sets the new value of the provided model object feature during the commit.
The method is invoked within the task, so the given objects have the relevant state (e.g. attached to transaction).- Parameters:
object
- the object to set new value, cannot benull
.feature
- the feture to set, cannot benull
.newValue
- the new value to set, can benull
.
-
adapt
protected static IModelApiTaskN<Void> adapt(IBmTask<?> bmTask)
Converts the specified BM task toIModelApiTaskN
.NOTE: this method is required until exists the API (tasks) that encapsulates the business logic in the BM task manner.
- Parameters:
bmTask
- the BM task, cannot benull
.- Returns:
- model api task, never
null
.
-
-