Top Description Fields Constructors Methods
org.eclipse.persistence.annotations

public final Enum IdValidation

extends Enum<IdValidation>
Class Inheritance
Imports
org.eclipse.persistence.descriptors.ClassDescriptor

IdValidation configures which id values are considered valid when loading from the database. This configuration is set either using the PrimaryKey annotation or using the ClassDescriptor API. This configuration is also used to determine if a sequence number is required.
Author
James Sutherland
Since
EclipseLink 1.0
See Also
PrimaryKey#validation(), ClassDescriptor#setIdValidation(IdValidation)

Field Summary

Modifier and TypeField and Description
public static final IdValidation
NEGATIVE

null, 0 and negative values are not allowed for ids extending Number and primitive int and long ids.

public static final IdValidation
NONE

No identifier validation is performed.

public static final IdValidation
NULL

Only null is invalid All other values are considered valid.

public static final IdValidation
ZERO

null and 0 are not allowed for primitive int and long ids.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static IdValidation
public static IdValidation[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

NEGATIVEback to summary
public static final IdValidation NEGATIVE

null, 0 and negative values are not allowed for ids extending Number and primitive int and long ids.

NONEback to summary
public static final IdValidation NONE

No identifier validation is performed.

NULLback to summary
public static final IdValidation NULL

Only null is invalid All other values are considered valid. This is the default configuration when composite identifiers are used and sequencing is not used.

ZEROback to summary
public static final IdValidation ZERO

null and 0 are not allowed for primitive int and long ids. This is the default configuration for a simple identifier.

Constructor Detail

IdValidationback to summary
private IdValidation()

Method Detail

valueOfback to summary
public static IdValidation valueOf(String name)
valuesback to summary
public static IdValidation[] values()