Top Description Inners Methods
org.hibernate.validator.constraints

public @Interface UUID

extends Annotation
Annotations
@Documented
@Constraint
validatedBy:
@Target:METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE
@Retention:RUNTIME
@Repeatable:List
Imports
java.lang.annotation.Documented, .Repeatable, .Retention, .Target, org.hibernate.validator.constraints.UUID.List, jakarta.validation.Constraint, .Payload

Checks that the annotated character sequence is a valid UUID.

Validation characteristics:

The supported type is CharSequence. null is considered valid.

Author
Daniel Heid
Since
8.0.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
UUID.LetterCase

Required letter case for hex characters

public static @interface
UUID.List

Defines several @UUID annotations on the same element.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

allow empty strings. Per default does not allow empty strings
allowEmpty
()

public boolean

Returns:

true if nil UUIDs 00000000-0000-0000-0000-000000000000 are valid Per default nil UUIDs are valid
allowNil
()

public Class<?>[]
public UUID.LetterCase

Returns:

the required letter case Per default only lower case is valid
letterCase
()

public String
public Class<? extends Payload>[]
public int[]

Returns:

the allowed UUID variant numbers Per default variants 0 to 2 are allowed
variant
()

Must not be lower than variant 0

public int[]

Returns:

the accepted UUID version numbers Per default versions 1 to 5 are allowed
version
()

Must not be lower than version 1

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

allowEmptyback to summary
public boolean allowEmpty()
Returns:boolean

allow empty strings. Per default does not allow empty strings

allowNilback to summary
public boolean allowNil()
Returns:boolean

true if nil UUIDs 00000000-0000-0000-0000-000000000000 are valid Per default nil UUIDs are valid

groupsback to summary
public Class<?>[] groups()
letterCaseback to summary
public UUID.LetterCase letterCase()
Returns:UUID.LetterCase

the required letter case Per default only lower case is valid

See Also
LetterCase
messageback to summary
public String message()
payloadback to summary
public Class<? extends Payload>[] payload()
variantback to summary
public int[] variant()

Must not be lower than variant 0

Returns:int[]

the allowed UUID variant numbers Per default variants 0 to 2 are allowed

versionback to summary
public int[] version()

Must not be lower than version 1

Returns:int[]

the accepted UUID version numbers Per default versions 1 to 5 are allowed

org.hibernate.validator.constraints back to summary

public final Enum UUID.LetterCase

extends Enum<UUID.LetterCase>
Class Inheritance

Required letter case for hex characters

Field Summary

Modifier and TypeField and Description
public static final UUID.LetterCase
INSENSITIVE

Every letter case is valid

public static final UUID.LetterCase
LOWER_CASE

Only lower case is valid

public static final UUID.LetterCase
UPPER_CASE

Only upper case is valid

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

Field Detail

INSENSITIVEback to summary
public static final UUID.LetterCase INSENSITIVE

Every letter case is valid

LOWER_CASEback to summary
public static final UUID.LetterCase LOWER_CASE

Only lower case is valid

UPPER_CASEback to summary
public static final UUID.LetterCase UPPER_CASE

Only upper case is valid

Constructor Detail

LetterCaseback to summary
private LetterCase()

Method Detail

valueOfback to summary
public static UUID.LetterCase valueOf(String name)
valuesback to summary
public static UUID.LetterCase[] values()
org.hibernate.validator.constraints back to summary

public @Interface UUID.List

extends Annotation
Annotations
@Target:METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE
@Retention:RUNTIME
@Documented

Defines several @UUID annotations on the same element.

Method Summary

Modifier and TypeMethod and Description
public UUID[]
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public UUID[] value()