Package st.orm

Interface Entity<ID>

Type Parameters:
ID - the type of the entity's primary key.
All Superinterfaces:
Data

public interface Entity<ID> extends Data
Optional marker interface for record-based entities.

This interface is used to support the EntityRepository, which provides CRUD logic out-of-the-box.

  • Method Summary

    Modifier and Type
    Method
    Description
    default ID
    id()
    Returns the primary key of the entity.
  • Method Details

    • id

      default ID id()
      Returns the primary key of the entity.

      The primary key can be any type, such as a Integer or Long, but entities with compound keys are also supported.

      Returns:
      the primary key of the entity.