Package io.jmix.core

Interface EntityEntry

All Superinterfaces:
Serializable
All Known Implementing Classes:
BaseEntityEntry, EmbeddableEntityEntry, KeyValueEntity.KeyValueEntityEntry, NoIdEntityEntry, NullableIdEntityEntry

public interface EntityEntry extends Serializable
  • Method Details

    • getSource

      Entity getSource()
    • getEntityId

      @Nullable Object getEntityId()
    • setEntityId

      void setEntityId(@Nullable Object id)
    • getGeneratedIdOrNull

      @Nullable Object getGeneratedIdOrNull()
      GeneratedId will be determined at enhancing time as follows:
      1. primary key (Id, EmbeddedId or JmixId attribute) will be used if it has JmixGeneratedValue annotation,
      2. any other UUID JmixGeneratedValue property will be chosen if primary key doesn't have JmixGeneratedValue annotation,
      3. primary key or some synthetic id will be used if there is no JmixGeneratedValue satisfiyng conditions below (see EntityEntry implementations for details).

      This algorithm used for BaseEntityEntry and NullableIdEntityEntry. See implementing classes description to clarify whether each of them will be used (directly or through subclass creation during enhancing process)
    • getGeneratedId

      default Object getGeneratedId()
    • setGeneratedId

      void setGeneratedId(Object id)
      GeneratedId needed to identify entity, including hashCode calculation (see EntityInternals.hashCode(Entity)). Thus it has to be copied at the very beginning of entity copy creation.
      Parameters:
      id -
    • getAttributeValue

      @Nullable <T> T getAttributeValue(String name)
    • setAttributeValue

      default void setAttributeValue(String name, @Nullable Object value)
    • setAttributeValue

      void setAttributeValue(String name, @Nullable Object value, boolean checkEquals)
    • isEmbeddable

      default boolean isEmbeddable()
    • isNew

      boolean isNew()
    • isManaged

      boolean isManaged()
    • isDetached

      boolean isDetached()
    • isRemoved

      boolean isRemoved()
    • setNew

      void setNew(boolean _new)
    • setManaged

      void setManaged(boolean managed)
    • setDetached

      void setDetached(boolean detached)
    • setRemoved

      void setRemoved(boolean removed)
    • getSecurityState

      SecurityState getSecurityState()
    • setSecurityState

      void setSecurityState(SecurityState securityState)
    • addPropertyChangeListener

      void addPropertyChangeListener(EntityPropertyChangeListener listener)
      Add listener to track attributes changes.
      Parameters:
      listener - listener
    • removePropertyChangeListener

      void removePropertyChangeListener(EntityPropertyChangeListener listener)
      Remove listener.
      Parameters:
      listener - listener to remove
    • removeAllListeners

      void removeAllListeners()
    • copy

      void copy(@Nullable EntityEntry entry)
      Copies the state of entity entry.
    • addExtraState

      void addExtraState(EntityEntryExtraState extraState)
    • getExtraState

      @Nullable EntityEntryExtraState getExtraState(Class<?> extraStateType)
    • getAllExtraState

      Collection<EntityEntryExtraState> getAllExtraState()