Package io.jmix.core

Interface CopyingSystemState<T>

Type Parameters:
T - entity type
All Known Implementing Classes:
DataSet, KeyValueEntity, VariableInstanceData

public interface CopyingSystemState<T>
Interface to be implemented by entities having a state which is not reflected in metadata. It's usually a non-persistent state which resides in fields with types not supported by metadata, like Object.

Some framework mechanisms copy entity instances by copying the state of all properties known to metadata (let's call it "main" state). If you want the "system" state to be copied along with the main state, implement this interface and copy the state in the copyFrom(Object) method.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copyFrom(T source)
    Invoked by the framework when copying the entity instance.
  • Method Details

    • copyFrom

      void copyFrom(T source)
      Invoked by the framework when copying the entity instance.
      Parameters:
      source - source entity