Interface IdentifiableEntity<E extends IdentifiableEntity,T>

All Superinterfaces:
io.requery.Persistable
All Known Implementing Classes:
AbstractAnalyticsEvent, AbstractDownloadRequest, AbstractDownloadRequestSet, AbstractOfflineVideo

public interface IdentifiableEntity<E extends IdentifiableEntity,T> extends io.requery.Persistable
Defines the contract of a Persistable object can be identified using a key.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.requery.query.LogicalCondition<? extends io.requery.query.Expression<T>,?>
    Gets a LogicalCondition that can be used to match this entity by it's unique identifier.
    io.requery.query.LogicalCondition<? extends io.requery.query.Expression<T>,?>
    Gets a LogicalCondition that can be used to match an entity by it's unique identifier.
    Gets the unique identifier of the entity.
  • Method Details

    • getKey

      @NonNull T getKey()
      Gets the unique identifier of the entity.
      Returns:
      null or the unique identifier.
    • getIdentityCondition

      io.requery.query.LogicalCondition<? extends io.requery.query.Expression<T>,?> getIdentityCondition(T key)
      Gets a LogicalCondition that can be used to match an entity by it's unique identifier.
      Parameters:
      key - the unique identifier of the entity.
      Returns:
      the logical condition.
    • getIdentityCondition

      io.requery.query.LogicalCondition<? extends io.requery.query.Expression<T>,?> getIdentityCondition()
      Gets a LogicalCondition that can be used to match this entity by it's unique identifier.
      Returns:
      the logical condition.