public enum GenericIdGenerator extends Enum<GenericIdGenerator> implements IdGenerator
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
String |
generateId(Collection<String> scopeIds,
Bundle bundle)
Generates a random String.
|
String |
getIdBase(Bundle bundle)
Return the base data for the id, sans scoping.
|
static UUID |
getTimeBasedUUID()
Get a new time-based UUID.
|
com.google.common.collect.ListMultimap<String,String> |
handleIdCollision(Collection<String> scopeIds,
Bundle bundle) |
static GenericIdGenerator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GenericIdGenerator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GenericIdGenerator INSTANCE
public static GenericIdGenerator[] values()
for (GenericIdGenerator c : GenericIdGenerator.values()) System.out.println(c);
public static GenericIdGenerator valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic com.google.common.collect.ListMultimap<String,String> handleIdCollision(Collection<String> scopeIds, Bundle bundle)
handleIdCollision
in interface IdGenerator
scopeIds
- The entity's parent scope identifiersbundle
- The entity's bundle datapublic String generateId(Collection<String> scopeIds, Bundle bundle)
generateId
in interface IdGenerator
scopeIds
- array of scope idsbundle
- The entity's bundle datapublic String getIdBase(Bundle bundle)
getIdBase
in interface IdGenerator
bundle
- The entity's bundle.public static UUID getTimeBasedUUID()
Copyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.