Interface Buffered

All Known Subinterfaces:
CheckBox, ColorPicker, ComboBox<V>, CurrencyField<V>, DateField<V>, DatePicker<V>, EntityComboBox<V>, EntityPicker<V>, EntitySuggestionField<V>, FileStorageUploadField, FileUploadField, MaskedField<V>, PasswordField, ResizableTextArea<V>, RichTextArea, SingleFileUploadField, TagPicker<V>, TextArea<V>, TextField<V>, TextInputField<V>, TimeField<V>, ValuePicker<V>, ValuesPicker<V>, WebdavDocumentUploadField
All Known Implementing Classes:
AbstractFileStorageUploadField, AbstractSingleFileUploadField, AbstractTextArea, CheckBoxImpl, ColorPickerImpl, ComboBoxImpl, CurrencyFieldImpl, DateFieldImpl, DatePickerImpl, EntityComboBoxImpl, EntityPickerImpl, EntitySuggestionFieldImpl, FileStorageUploadFieldImpl, FileUploadFieldImpl, MaskedFieldImpl, PasswordFieldImpl, ResizableTextAreaImpl, RichTextAreaImpl, SearchFieldImpl, TagPickerImpl, TextAreaImpl, TextFieldImpl, TimeFieldImpl, ValuePickerImpl, ValuesPickerImpl, WebdavDocumentUploadFieldImpl

public interface Buffered
Data aware component that supports buffered write mode.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Updates all changes since the previous commit to the data source.
    void
    Discards all changes since last commit.
    boolean
     
    boolean
    Tests if the value stored in the object has been modified since it was last updated from the data source.
    void
    setBuffered(boolean buffered)
    Sets the buffered mode.
  • Method Details

    • commit

      void commit()
      Updates all changes since the previous commit to the data source.
    • discard

      void discard()
      Discards all changes since last commit. The object updates its value from the data source.
    • isBuffered

      boolean isBuffered()
      Returns:
      true if buffered mode is on, false otherwise
    • setBuffered

      @StudioProperty(defaultValue="false") void setBuffered(boolean buffered)
      Sets the buffered mode.

      When in buffered mode, an internal buffer will be used to store changes until commit() is called. Calling discard() 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() and discard() methods serve no purpose.

      Parameters:
      buffered - true if buffered mode should be turned on, false otherwise
    • isModified

      boolean isModified()
      Tests if the value stored in the object has been modified since it was last updated from the data source.
      Returns:
      true if the value in the object has been modified since the last data source update, false if not.