Project

General

Profile

« Previous | Next » 

Revision 90046bc4

Added by Andreas Müller almost 8 years ago

Remove generics from Reference in cdmlib-model #5830

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/validation/constraint/ReferenceCheckValidator.java
7 7
import eu.etaxonomy.cdm.model.reference.ReferenceType;
8 8
import eu.etaxonomy.cdm.validation.annotation.ReferenceCheck;
9 9

  
10
public class ReferenceCheckValidator implements ConstraintValidator<ReferenceCheck, Reference<?>>{
10
public class ReferenceCheckValidator implements ConstraintValidator<ReferenceCheck, Reference>{
11 11

  
12 12
    @Override
13 13
    public void initialize(ReferenceCheck constraintAnnotation) {}
14 14

  
15 15
	@Override
16
    public boolean isValid(Reference<?> value, ConstraintValidatorContext constraintValidatorContext) {
16
    public boolean isValid(Reference value, ConstraintValidatorContext constraintValidatorContext) {
17 17
		boolean isValid = true;
18 18

  
19 19
		isValid &= validIsbn(value, constraintValidatorContext);
......
30 30

  
31 31

  
32 32

  
33
	private boolean validIsbn(Reference<?> value, ConstraintValidatorContext constraintValidatorContext){
33
	private boolean validIsbn(Reference value, ConstraintValidatorContext constraintValidatorContext){
34 34
		boolean isValid = true;
35 35

  
36 36
		if ((value.getType() != ReferenceType.Book && value.getType() != ReferenceType.Proceedings && value.getType() != ReferenceType.Generic ) ) {

Also available in: Unified diff