Skip to content

Commit c266cf0

Browse files
committed
Added UUIDObjectTypeKeyGenerator
1 parent e854772 commit c266cf0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.mmnaseri.utils.spring.data.domain.impl.key;
2+
3+
import com.mmnaseri.utils.spring.data.domain.KeyGenerator;
4+
5+
import java.util.UUID;
6+
7+
/**
8+
* This class will generate unique UUIDs for use in entities.
9+
*/
10+
public class UUIDObjectTypeKeyGenerator implements KeyGenerator<UUID> {
11+
12+
@Override
13+
public UUID generate() {
14+
return UUID.randomUUID();
15+
}
16+
}

0 commit comments

Comments
 (0)