Package com._1c.g5.aef2.models.value
Class Value<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>
- All Implemented Interfaces:
IEditableModel
,IModel
,IValue<T>
,IValidable
- Direct Known Subclasses:
AbstractInfobaseApplicationEditorModel
,BmTrendlineArrayModelValue
,BmValue
,EmfValue
,PojoValue
,ValueWorkingCopy
,ViewModelValue
Base
IValue
implementation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addValueListener
(IValueListener<T> listener) Adds the value listener.void
discard()
Discards the changes stored in the model buffer since lastIModel.commit()
operation.void
dispose()
Disposes this model.get()
protected final T
protected final T
protected Object
Provides validation target for this validable object.boolean
Checks the value for equality with the current stored value.protected final void
notifyValueChanged
(ChangeOrigin changeOrigin) Notifies the listeners about a change of this value.protected final void
Asynchronously notifies the listeners about a change of this value.void
removeValueListener
(IValueListener<T> listener) Removes the value listener.void
protected final void
setCommittedValue
(T committedValue) protected final void
setUncommittedValue
(T uncommittedValue) protected final void
Sets both the committed and the uncommitted values at the same time.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, 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, commit, getChange, getComponent, isOnline, removeModelListener, setComponent
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
Constructor Details
-
Value
public Value()
-
-
Method Details
-
get
-
discard
public void discard()Description copied from interface:IModel
Discards the changes stored in the model buffer since lastIModel.commit()
operation. -
set
-
isEqual
Description copied from interface:IValue
Checks the value for equality with the current stored value. -
addValueListener
Description copied from interface:IValue
Adds the value listener.- Specified by:
addValueListener
in interfaceIValue<T>
- Parameters:
listener
- the listener to add.
-
removeValueListener
Description copied from interface:IValue
Removes the value listener.- Specified by:
removeValueListener
in interfaceIValue<T>
- Parameters:
listener
- the listener to remove.
-
createWorkingCopy
- Specified by:
createWorkingCopy
in interfaceIModel
- Specified by:
createWorkingCopy
in interfaceIValue<T>
- Overrides:
createWorkingCopy
in classModel
- Returns:
- the model working copy or
null
if working copies is not supported by the model.
-
dispose
public void dispose()Description copied from interface:IModel
Disposes this model. -
toString
-
getValidatorTarget
Description copied from class:Validable
Provides validation target for this validable object. Override this method to change the validation target of this validable.- Overrides:
getValidatorTarget
in classValidable
- Returns:
- this object validation target.
-
getCommittedValue
- Returns:
- the committed value, under normal conditions it should be in sync with data source.
-
setCommittedValue
- Parameters:
committedValue
- the new committed value to set.- See Also:
-
getUncommittedValue
- Returns:
- the buffered but yet uncommitted value.
-
setUncommittedValue
- Parameters:
uncommittedValue
- the new uncommitted value to set.
-
setValue
Sets both the committed and the uncommitted values at the same time.- Parameters:
value
- the value to set.
-
notifyValueChanged
Notifies the listeners about a change of this value. -
queueNotifyValueChanged
protected final void queueNotifyValueChanged()Asynchronously notifies the listeners about a change of this value.
-