public class UUID extends java.lang.Object implements KeyGenerator
Constructor and Description |
---|
UUID() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
newKey()
Provide a new UUID key
|
static long |
newLongKey()
Generate a long key.
|
static long |
newLongKey(java.lang.String seed)
Provide a long ID, based on the hash value of a string (i.e.
|
static java.lang.String |
newUUIDHash(java.lang.String value)
Provide a UUID, based on the hash value of a string (i.e.
|
java.lang.Object |
setAutoKey(java.lang.reflect.Field field,
java.lang.Object instance)
set an autoKey within an object instance
|
java.lang.Object |
setAutoKey(org.resoa.json.JSONObject json,
java.lang.String keyName,
java.lang.String referenceID)
Set an AutoKey within a JSON Object
|
public java.lang.Object setAutoKey(java.lang.reflect.Field field, java.lang.Object instance)
setAutoKey
in interface KeyGenerator
field
- instance
- public java.lang.Object setAutoKey(org.resoa.json.JSONObject json, java.lang.String keyName, java.lang.String referenceID)
setAutoKey
in interface KeyGenerator
json
- keyName
- the primary key node namereferenceID
- a reference ID, which should be included within key generationpublic static java.lang.String newKey()
public static java.lang.String newUUIDHash(java.lang.String value)
value
- the string to be hashedpublic static long newLongKey()
public static long newLongKey(java.lang.String seed)
seed
- the string to be hashedCopyright © 2005-2014 The Resoa Project, resoa.org.