Class RepositoryStub<T,ID>

java.lang.Object
org.stubit.springdata.RepositoryStub<T,ID>
All Implemented Interfaces:
org.springframework.data.repository.Repository<T,ID>
Direct Known Subclasses:
CrudRepositoryStub

@NullMarked public abstract class RepositoryStub<T,ID> extends Object implements org.springframework.data.repository.Repository<T,ID>
Simple abstract Repository stub implementation using a ConcurrentHashMap to store data.
See Also:
  • Repository
  • Field Details

  • Constructor Details

    • RepositoryStub

      public RepositoryStub()
  • Method Details

    • getId

      protected ID getId(T entity)
      Extracts the Id or Id or EmbeddedId annotated field value from the entity.
      Parameters:
      entity - the entity to extract the id from
      Returns:
      the value of the Id or EmbeddedId annotated field.