Top Description Inners Methods
org.hibernate.validator.constraints

public @Interface ModCheck

extends Annotation
Annotations
@Documented
@Deprecated
@Constraint
validatedBy:
@Target:METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE
@Retention:RUNTIME
@Repeatable:List
Static Imports
java.lang.annotation.ElementType.ANNOTATION_TYPE, .ElementType.CONSTRUCTOR, .ElementType.FIELD, .ElementType.METHOD, .ElementType.PARAMETER, .ElementType.TYPE_USE, .RetentionPolicy.RUNTIME

Deprecated

As of release 5.1.0, replaced by Mod10Check and Mod11Check

Modulo check constraint.

Allows to validate that a series of digits pass the mod 10 or mod 11 checksum algorithm.

The supported type is CharSequence. null is considered valid.

Authors
George Gastaldi, Hardy Ferentschik

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static @interface
ModCheck.List

Defines several @ModCheck annotations on the same element.

public static enum

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

The position of the check digit in input. Per default it is assumes that the check digit is part of the specified range. If set, the digit at the specified position is used as check digit. If set it the following holds true: checkDigitPosition > 0 && (checkDigitPosition < startIndex || checkDigitPosition >= endIndex.
checkDigitPosition
()

public int

Returns:

the end index (exclusive) for calculating the checksum. If not specified the whole value is considered
endIndex
()

public Class<?>[]
public boolean

Returns:

Returns true if non digit characters should be ignored, false if a non digit character results in a validation error. startIndex and endIndex are always only referring to digit characters.
ignoreNonDigitCharacters
()

public String
public ModCheck.ModType

Returns:

The modulus algorithm to be used
modType
()

public int

Returns:

The multiplier to be used by the chosen mod algorithm
multiplier
()

public Class<? extends Payload>[]
public int

Returns:

the start index (inclusive) for calculating the checksum. If not specified 0 is assumed.
startIndex
()

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

checkDigitPositionback to summary
public int checkDigitPosition()
Returns:int

The position of the check digit in input. Per default it is assumes that the check digit is part of the specified range. If set, the digit at the specified position is used as check digit. If set it the following holds true: checkDigitPosition > 0 && (checkDigitPosition < startIndex || checkDigitPosition >= endIndex.

endIndexback to summary
public int endIndex()
Returns:int

the end index (exclusive) for calculating the checksum. If not specified the whole value is considered

groupsback to summary
public Class<?>[] groups()
ignoreNonDigitCharactersback to summary
public boolean ignoreNonDigitCharacters()
Returns:boolean

Returns true if non digit characters should be ignored, false if a non digit character results in a validation error. startIndex and endIndex are always only referring to digit characters.

messageback to summary
public String message()
modTypeback to summary
public ModCheck.ModType modType()
Returns:ModCheck.ModType

The modulus algorithm to be used

multiplierback to summary
public int multiplier()
Returns:int

The multiplier to be used by the chosen mod algorithm

payloadback to summary
public Class<? extends Payload>[] payload()
startIndexback to summary
public int startIndex()
Returns:int

the start index (inclusive) for calculating the checksum. If not specified 0 is assumed.

org.hibernate.validator.constraints back to summary

public @Interface ModCheck.List

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

Defines several @ModCheck annotations on the same element.

Method Summary

Modifier and TypeMethod and Description
public ModCheck[]
value()

Deprecated as a consequence of ModCheck being deprecated.
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public ModCheck[] value()

Deprecated

as a consequence of ModCheck being deprecated. See corresponding docs for further information.

org.hibernate.validator.constraints back to summary

public final Enum ModCheck.ModType

extends Enum<ModCheck.ModType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ModCheck.ModType
MOD10

Represents a MOD10 algorithm (Also known as Luhn algorithm)

public static final ModCheck.ModType
MOD11

Represents a MOD11 algorithm.

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

Field Detail

MOD10back to summary
public static final ModCheck.ModType MOD10

Represents a MOD10 algorithm (Also known as Luhn algorithm)

MOD11back to summary
public static final ModCheck.ModType MOD11

Represents a MOD11 algorithm. A remainder of 10 or 11 in the algorithm is mapped to the check digit 0.

Constructor Detail

ModTypeback to summary
private ModType()

Method Detail

valueOfback to summary
public static ModCheck.ModType valueOf(String name)
valuesback to summary
public static ModCheck.ModType[] values()