Package com._1c.g5.aef2.standard.models
Class ViewModelValue<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.value.Value<T>
com._1c.g5.aef2.standard.models.ViewModelValue<T>
- All Implemented Interfaces:
IAttribute<org.eclipse.emf.ecore.EObject,
,org.eclipse.emf.ecore.EStructuralFeature> IEditableModel
,IEmfAttribute<org.eclipse.emf.ecore.EObject>
,IModel
,IEmfValueAttribute<T,
,org.eclipse.emf.ecore.EObject> IValue<T>
,IViewModelModel
,IViewModelValue<T>
,IValidable
public class ViewModelValue<T>
extends Value<T>
implements IEmfValueAttribute<T,org.eclipse.emf.ecore.EObject>, IViewModelValue<T>
The special model implementation for
IViewModel
.
It performs all operations within root component processing queue instead of immediate
processing.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionViewModelValue
(IViewModel object, org.eclipse.emf.ecore.EStructuralFeature feature, IEventChannel channel) Instantiates a new ViewModel value. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Sets the model initialization flag which means that all model operations performed beforeIViewModelModel.endInitialization()
will not invoke notification events.void
commit()
Commits the changes to the data model.void
dispose()
Disposes this model.void
Resets the model initialization flag that is set byIViewModelModel.beginInitialization()
.Returns the object that keeps the attribute.org.eclipse.emf.ecore.EStructuralFeature
Returns the property.void
void
setComponent
(IComponent<?> component) Associate this model with the component.Methods inherited from class com._1c.g5.aef2.models.value.Value
addValueListener, createWorkingCopy, discard, get, getCommittedValue, getUncommittedValue, getValidatorTarget, isEqual, notifyValueChanged, queueNotifyValueChanged, removeValueListener, setCommittedValue, setUncommittedValue, setValue, 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, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setOnline
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, 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.IModel
addModelListener, discard, getComponent, isOnline, removeModelListener
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
Methods inherited from interface com._1c.g5.aef2.models.value.IValue
addValueListener, createWorkingCopy, get, isEqual, removeValueListener
-
Constructor Details
-
ViewModelValue
public ViewModelValue(IViewModel object, org.eclipse.emf.ecore.EStructuralFeature feature, IEventChannel channel) Instantiates a new ViewModel value.- Parameters:
object
- the object, cannot benull
.feature
- the feature, cannot benull
.channel
- theIEventChannel
, cannot benull
.
-
-
Method Details
-
beginInitialization
public void beginInitialization()Description copied from interface:IViewModelModel
Sets the model initialization flag which means that all model operations performed beforeIViewModelModel.endInitialization()
will not invoke notification events.- Specified by:
beginInitialization
in interfaceIViewModelModel
-
endInitialization
public void endInitialization()Description copied from interface:IViewModelModel
Resets the model initialization flag that is set byIViewModelModel.beginInitialization()
.- Specified by:
endInitialization
in interfaceIViewModelModel
-
commit
public void commit()Description copied from interface:IModel
Commits the changes to the data model. -
set
-
getChange
-
dispose
public void dispose()Description copied from interface:IModel
Disposes this model. -
setComponent
Description copied from interface:IModel
Associate this model with the component.- Specified by:
setComponent
in interfaceIModel
- Overrides:
setComponent
in classModel
- Parameters:
component
- the component to associate with.
-
getObject
Description copied from interface:IAttribute
Returns the object that keeps the attribute.- Specified by:
getObject
in interfaceIAttribute<org.eclipse.emf.ecore.EObject,
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<org.eclipse.emf.ecore.EObject,
org.eclipse.emf.ecore.EStructuralFeature> - Returns:
- the property.
-