Class UUIDPrimaryKeyGenerator
java.lang.Object
com.reallifedeveloper.tools.test.database.inmemory.UUIDPrimaryKeyGenerator
- All Implemented Interfaces:
PrimaryKeyGenerator<String>
A primary key generator that generates random UUIDs.
- Author:
- RealLifeDeveloper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnextPrimaryKey
(String previousMax) Gives the next primary key given the previous maximum primary key value.
-
Constructor Details
-
UUIDPrimaryKeyGenerator
public UUIDPrimaryKeyGenerator()
-
-
Method Details
-
nextPrimaryKey
Description copied from interface:PrimaryKeyGenerator
Gives the next primary key given the previous maximum primary key value.- Specified by:
nextPrimaryKey
in interfacePrimaryKeyGenerator<String>
- Parameters:
previousMax
- the previous maximum primary key value of any saved entity, ornull
to start from scratch- Returns:
- the next primary key
-