Class AbstractPojoEntity

All Implemented Interfaces:
EntityReference, Entity, EntityImplementor

public abstract class AbstractPojoEntity extends AbstractDirtyCheckingEntity
A base class for dynamically created Entity instances (see JavassistEntityPojoFactory. This class is used for all entities which are mapped by hibernate. Used for XML based entities.
  • Constructor Details

    • AbstractPojoEntity

      public AbstractPojoEntity()
  • Method Details

    • getInnerInterceptor

      public EntityInterceptor getInnerInterceptor()
      Specified by:
      getInnerInterceptor in class AbstractHibernateEntity
    • getKey

      @Nullable public @Nullable PrimaryKey getKey()
      Description copied from interface: Entity
      Get the primary key of this entity.
      Returns:
      The primary key of this entity, or null if in CONCEPTION state.
      See Also:
    • getOldValue

      @Nullable public <T> T getOldValue(String field, Class<T> targetType)
      Description copied from interface: Entity
      Get the old value of a field.
      Parameters:
      field - The field to get the old value from.
      targetType - The target Java type.
      Returns:
      the old value of the field (cached value read from database).
    • resolve

      public RelationQuery resolve(String relation)
      Description copied from interface: Entity
      Resolve a relation. Throws if there is no such relation, check the model if you're unsure!

      The returned RelationQuery may be modified by interceptors already when you receive it. For example, in the entity system, there is (as of now) the NiceModelEntityInterceptorFactory which appends the default ordering rules of the EntityModel on query.

      Parameters:
      relation - The name of the relation
      Returns:
      The executable RelationQuery.
    • syncInverseCollection

      public void syncInverseCollection(RelationModel relationModel, Entity entity, boolean added)
      Specified by:
      syncInverseCollection in class AbstractHibernateEntity
    • getState

      public Entity.State getState()
      Description copied from interface: Entity
      Get the current state of the entity.
      Returns:
      The current state of the entity.
    • isUnsaved

      protected boolean isUnsaved(@Nullable @Nullable org.hibernate.engine.spi.EntityEntry entry)
      Specified by:
      isUnsaved in class AbstractDirtyCheckingEntity