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)
    • getLoadedProperties

      @Nullable Set<String> getLoadedProperties()
      Optional set of names of properties loaded from data store.
    • setLoadedProperties

      void setLoadedProperties(@Nullable Set<String> loadedProperties)
    • getSecurityState

      SecurityState getSecurityState()
    • setSecurityState

      void setSecurityState(SecurityState securityState)
    • addPropertyChangeListener

      void addPropertyChangeListener(EntityPropertyChangeListener listener)
      Adds a listener to track attributes changes. The listener will be added using a weak reference.
      See Also:
    • addPropertyChangeListener

      void addPropertyChangeListener(EntityPropertyChangeListener listener, boolean weakReference)
      Adds a listener to track attributes changes.
    • 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()