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 TypeMethodDescriptionvoidaddValueListener(IValueListener<T> listener) Adds the value listener.voiddiscard()Discards the changes stored in the model buffer since lastIModel.commit()operation.voiddispose()Disposes this model.get()protected final Tprotected final Tprotected ObjectProvides validation target for this validable object.booleanChecks the value for equality with the current stored value.protected final voidnotifyValueChanged(ChangeOrigin changeOrigin) Notifies the listeners about a change of this value.protected final voidAsynchronously notifies the listeners about a change of this value.voidremoveValueListener(IValueListener<T> listener) Removes the value listener.voidprotected final voidsetCommittedValue(T committedValue) protected final voidsetUncommittedValue(T uncommittedValue) protected final voidSets both the committed and the uncommitted values at the same time.toString()Methods inherited from class com._1c.g5.aef2.models.EditableModel
isEditable, setEditableMethods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setComponent, setOnlineMethods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, removeValidator, validate, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, getChange, getComponent, isOnline, removeModelListener, setComponentMethods 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:IModelDiscards the changes stored in the model buffer since lastIModel.commit()operation. -
set
-
isEqual
Description copied from interface:IValueChecks the value for equality with the current stored value. -
addValueListener
Description copied from interface:IValueAdds the value listener.- Specified by:
addValueListenerin interfaceIValue<T>- Parameters:
listener- the listener to add.
-
removeValueListener
Description copied from interface:IValueRemoves the value listener.- Specified by:
removeValueListenerin interfaceIValue<T>- Parameters:
listener- the listener to remove.
-
createWorkingCopy
- Specified by:
createWorkingCopyin interfaceIModel- Specified by:
createWorkingCopyin interfaceIValue<T>- Overrides:
createWorkingCopyin classModel- Returns:
- the model working copy or
nullif working copies is not supported by the model.
-
dispose
public void dispose()Description copied from interface:IModelDisposes this model. -
toString
-
getValidatorTarget
Description copied from class:ValidableProvides validation target for this validable object. Override this method to change the validation target of this validable.- Overrides:
getValidatorTargetin 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.
-