Interface Buffered
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
BufferedValidatable,Field<T>
- All Known Implementing Classes:
AbstractField,AbstractSelect,AbstractTextField,CheckBox,ComboBox,CustomField,DateField,Form,InlineDateField,ListSelect,NativeSelect,OptionGroup,PasswordField,PopupDateField,ProgressBar,ProgressIndicator,RichTextArea,Select,Slider,Table,TextArea,TextField,Tree,TreeTable,TwinColSelect
@Deprecated public interface Buffered extends Serializable
Deprecated.As of 8.0, no replacement available, seeBinder.writeBean(Object),Binder.clearFields()Defines the interface to commit and discard changes to an object, supporting buffering.
In buffered mode the initial value is read from the data source and then buffered. Any subsequential writes or reads will be done on the buffered value. Calling
commit()will write the buffered value to the data source while callingdiscard()while discard the buffered value and re-read the value from the data source.In non-buffered mode the value is always read directly from the data source. Any write is done directly to the data source with no buffering in between. Reads are also done directly from the data source. Calling
commit()ordiscard()in this mode is efficiently a no-op.- Since:
- 3.0
- Author:
- Vaadin Ltd.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBuffered.SourceExceptionDeprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidcommit()Deprecated.Updates all changes since the previous commit to the data source.voiddiscard()Deprecated.Discards all changes since last commit.booleanisBuffered()Deprecated.Checks the buffered mode.booleanisModified()Deprecated.Tests if the value stored in the object has been modified since it was last updated from the data source.voidsetBuffered(boolean buffered)Deprecated.Sets the buffered mode to the specified status.
-
-
-
Method Detail
-
commit
void commit() throws Buffered.SourceException, Validator.InvalidValueExceptionDeprecated.Updates all changes since the previous commit to the data source. The value stored in the object will always be updated into the data source whencommitis called.- Throws:
Buffered.SourceException- if the operation fails because of an exception is thrown by the data source. The cause is included in the exception.Validator.InvalidValueException- if the operation fails because validation is enabled and the values do not validate
-
discard
void discard() throws Buffered.SourceExceptionDeprecated.Discards all changes since last commit. The object updates its value from the data source.- Throws:
Buffered.SourceException- if the operation fails because of an exception is thrown by the data source. The cause is included in the exception.
-
setBuffered
void setBuffered(boolean buffered)
Deprecated.Sets the buffered mode to the specified status.When in buffered mode, an internal buffer will be used to store changes until
commit()is called. Callingdiscard()will revert the internal buffer to the value of the data source.When in non-buffered mode both read and write operations will be done directly on the data source. In this mode the
commit()anddiscard()methods serve no purpose.- Parameters:
buffered- true if buffered mode should be turned on, false otherwise- Since:
- 7.0
-
isBuffered
boolean isBuffered()
Deprecated.Checks the buffered mode.- Returns:
- true if buffered mode is on, false otherwise
- Since:
- 7.0
-
isModified
boolean isModified()
Deprecated.Tests if the value stored in the object has been modified since it was last updated from the data source.- Returns:
trueif the value in the object has been modified since the last data source update,falseif not.
-
-