Package com._1c.g5.v8.dt.aef2.bm.models
Class BmMap<K,V>
- 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.map.MapModel<K,V>
-
- com._1c.g5.v8.dt.aef2.bm.models.BmMap<K,V>
-
- Type Parameters:
K- the type of the map keysV- the type of the map values
- All Implemented Interfaces:
IAttribute<IBmObject,org.eclipse.emf.ecore.EStructuralFeature>,IEditableModel,IEmfAttribute<IBmObject>,IModel,IEmfMapAttribute<K,V,IBmObject>,IMap<K,V>,IValidable,IModelApiAwareModel,Map<K,V>
- Direct Known Subclasses:
BmMultilanguageModel
public class BmMap<K,V> extends MapModel<K,V> implements IEmfMapAttribute<K,V,IBmObject>, IModelApiAwareModel
Represents a BM object feature map model.
-
-
Constructor Summary
Constructors Constructor Description BmMap(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature)Instantiates a new BM map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IModelApiTaskN<Void>createTask(IBmObject object, org.eclipse.emf.ecore.EStructuralFeature feature, Map<K,V> valueToApply)Creates anIModelApiTaskNthat executes during applying changes.voiddispose()Disposes this model.IChangegetChange()IModelApigetModelApi()Returns the model API.IBmObjectgetObject()Returns the object that keeps the attribute.org.eclipse.emf.ecore.EStructuralFeaturegetProperty()Returns the property.voidsetModelApi(IModelApi modelApi)Sets the specified API to the model.protected voidsetObjectValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, Map<K,V> 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.map.MapModel
addMapListener, clear, containsKey, containsValue, createWorkingCopy, discard, entrySet, fill, fromCollection, get, getCommittedMap, getUncommittedMap, isElementEqual, isEmpty, isEqual, keySet, notifyMapChanged, put, putAll, queueNotifyMapChanged, remove, removeMapListener, setCommittedMap, setMap, setUncommitedMap, size, toString, values
-
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 com._1c.g5.aef2.models.map.IMap
addMapListener, createWorkingCopy, fill, isEqual, removeMapListener
-
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.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
getChange
public IChange getChange()
-
dispose
public void dispose()
Description copied from interface:IModelDisposes this model.
-
getObject
public IBmObject getObject()
Description copied from interface:IAttributeReturns the object that keeps the attribute.- Specified by:
getObjectin interfaceIAttribute<K,V>- Returns:
- the object that keeps the attribute.
-
getProperty
public org.eclipse.emf.ecore.EStructuralFeature getProperty()
Description copied from interface:IAttributeReturns the property.- Specified by:
getPropertyin interfaceIAttribute<K,V>- Returns:
- the property.
-
setModelApi
public void setModelApi(IModelApi modelApi)
Description copied from interface:IModelApiAwareModelSets the specified API to the model.- Specified by:
setModelApiin interfaceIModelApiAwareModel- Parameters:
modelApi- the API, can benull.
-
getModelApi
public IModelApi getModelApi()
Description copied from interface:IModelApiAwareModelReturns the model API.- Specified by:
getModelApiin interfaceIModelApiAwareModel- Returns:
- the model API or
nullif it is not set.
-
createTask
protected IModelApiTaskN<Void> createTask(IBmObject object, org.eclipse.emf.ecore.EStructuralFeature feature, Map<K,V> valueToApply)
Creates anIModelApiTaskNthat 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, Map<K,V> 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.
-
-