Class NoIdEntityEntry

java.lang.Object
io.jmix.core.entity.BaseEntityEntry
io.jmix.core.entity.NoIdEntityEntry
All Implemented Interfaces:
EntityEntry, Serializable, Cloneable

public class NoIdEntityEntry extends BaseEntityEntry
An EntityEntry implementation for model objects without identifiers.
Used by enhancing process when JmixEntity does not include any of annotations:

Such entities should not be saved in any persistent storage.

See Also:
  • Constructor Details

    • NoIdEntityEntry

      public NoIdEntityEntry(Entity source)
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class BaseEntityEntry
    • getEntityId

      @Nullable public Object getEntityId()
    • setEntityId

      public void setEntityId(@Nullable Object id)
    • getGeneratedIdOrNull

      public Object getGeneratedIdOrNull()
      Description copied from interface: EntityEntry
      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)
    • setGeneratedId

      public void setGeneratedId(Object id)
      Description copied from interface: EntityEntry
      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.
    • copy

      public void copy(EntityEntry entry)
      Description copied from interface: EntityEntry
      Copies the state of entity entry.
      Specified by:
      copy in interface EntityEntry
      Overrides:
      copy in class BaseEntityEntry