Interface PrimaryKeyGenerator<ID>
- Type Parameters:
ID- the type of the keys generated
- All Known Implementing Classes:
IntegerPrimaryKeyGenerator,LongPrimaryKeyGenerator,UUIDPrimaryKeyGenerator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A generator of primary keys of a certain type.
- Author:
- RealLifeDeveloper
-
Method Summary
Modifier and TypeMethodDescriptionnextPrimaryKey(@Nullable ID previousMax) Gives the next primary key given the previous maximum primary key value.
-
Method Details
-
nextPrimaryKey
Gives the next primary key given the previous maximum primary key value.- Parameters:
previousMax- the previous maximum primary key value of any saved entity, ornullto start from scratch- Returns:
- the next primary key
-