Klasse FieldReference
java.lang.Object
org.apache.fulcrum.intake.validator.FieldReference
Helper Class to manage relations between fields. The following
comparisons are supported:
Name | Valid Values | Default Value |
---|---|---|
less-than | <name of other field> | |
greater-than | <name of other field> | |
less-than-or-equal | <name of other field> | |
greater-than-or-equal | <name of other field> |
- Version:
- $Id$
- Autor:
- Thomas Vandahl
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic <T> void
checkReferences
(List<FieldReference> fieldReferences, CompareCallback<T> compareCallback, T value, Group group) Check the parsed value against the referenced fieldsstatic FieldReference.Comparison
getComparisonType
(String key) Map the comparison strings to their numeric counterpartsvoid
setComparison
(FieldReference.Comparison compare) void
setFieldName
(String fieldName) void
setMessage
(String message)
-
Konstruktordetails
-
FieldReference
public FieldReference()Constructor
-
-
Methodendetails
-
getComparison
- Gibt zurück:
- the comparison type
-
setComparison
- Parameter:
compare
- the comparison type to set
-
getFieldName
- Gibt zurück:
- the field name
-
setFieldName
- Parameter:
fieldName
- the field name to set
-
getMessage
- Gibt zurück:
- the message
-
setMessage
- Parameter:
message
- the message to set
-
getComparisonType
Map the comparison strings to their numeric counterparts- Parameter:
key
- the string representation of a comparison operator- Gibt zurück:
- the numeric representation of the given comparison operator
-
checkReferences
public static <T> void checkReferences(List<FieldReference> fieldReferences, CompareCallback<T> compareCallback, T value, Group group) throws ValidationException Check the parsed value against the referenced fields- Typparameter:
T
- the field type- Parameter:
fieldReferences
- List of field references to checkcompareCallback
- Callback to the actual compare operationvalue
- the parsed value of the related fieldgroup
- the group the related field belongs to- Löst aus:
ValidationException
- if the validation against at least one related field fails
-