Package org.stubit.springdata
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 Summary
FieldsModifier and TypeFieldDescriptionprotected ConcurrentHashMap<ID,T> AConcurrentHashMapto store the data. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
data
AConcurrentHashMapto store the data.
-
-
Constructor Details
-
RepositoryStub
public RepositoryStub()
-
-
Method Details
-
getId
Extracts theIdorIdorEmbeddedIdannotated field value from the entity.- Parameters:
entity- the entity to extract the id from- Returns:
- the value of the
IdorEmbeddedIdannotated field.
-