public class IdentityStrategy extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static IdentityStrategy |
CUSTOM
An extension strategy not in the standard JDO/JPA list.
|
static IdentityStrategy |
IDENTITY
strategy="identity" in JDO and JPA
The value "identity" specifies that the column identified as the key
column is managed by the database as an autoincrementing identity type.
|
static IdentityStrategy |
INCREMENT
strategy="increment" in JDO and "table" in JPA
The value "increment" specifies a strategy that simply finds the largest
key already in the database and increments the key value for new
instances.
|
static IdentityStrategy |
NATIVE
strategy="native" in JDO, and "auto" in JPA
The value "native" allows the JDO implementation to pick the most
suitable strategy based on the underlying database.
|
static IdentityStrategy |
SEQUENCE
strategy="sequence" in JDO and JPA
The value "sequence" specifies that a named database sequence is used to
generate key values for the table.
|
static IdentityStrategy |
UUIDHEX
strategy="uuid-hex"
The value "uuid-hex" specifies a strategy that generates a 128-bit UUID
unique within a network (the IP address of the machine running the
application is part of the id) and represents the result as a
32-character String.
|
static IdentityStrategy |
UUIDSTRING
strategy="uuid-string"
The value "uuid-string" specifies a strategy that generates a 128-bit
UUID unique within a network (the IP address of the machine running the
application is part of the id) and represents the result as a
16-character String.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getCustomName()
Accessor for the custom name (if using strategy type of CUSTOM).
|
static IdentityStrategy |
getIdentityStrategy(String value)
Gets an IdentityStrategy for the given value argument.
|
int |
getType()
Accessor for the type.
|
int |
hashCode() |
String |
toString()
Returns a string representation of the object.
|
public static final IdentityStrategy NATIVE
public static final IdentityStrategy SEQUENCE
public static final IdentityStrategy IDENTITY
public static final IdentityStrategy INCREMENT
public static final IdentityStrategy UUIDSTRING
public static final IdentityStrategy UUIDHEX
public static final IdentityStrategy CUSTOM
public String getCustomName()
public String toString()
public int getType()
public static IdentityStrategy getIdentityStrategy(String value)
value
- the String representation of IdentityStrategyCopyright © 2017. All rights reserved.