Project

General

Profile

Download (1.22 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2009 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

    
10

    
11
package eu.etaxonomy.cdm.validation.annotation;
12
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
13
import static java.lang.annotation.ElementType.FIELD;
14
import static java.lang.annotation.ElementType.METHOD;
15
import static java.lang.annotation.ElementType.TYPE;
16
import static java.lang.annotation.RetentionPolicy.RUNTIME;
17

    
18
import java.lang.annotation.Documented;
19
import java.lang.annotation.Retention;
20
import java.lang.annotation.Target;
21

    
22
import javax.validation.Constraint;
23
import javax.validation.Payload;
24

    
25
import eu.etaxonomy.cdm.validation.constraint.NullOrNotEmptyValidator;
26

    
27
@Target( { TYPE, METHOD, FIELD, ANNOTATION_TYPE })
28
@Retention(RUNTIME)
29
@Constraint(validatedBy = NullOrNotEmptyValidator.class)
30
@Documented
31
public @interface NullOrNotEmpty {
32

    
33
	String message() default "{eu.etaxonomy.cdm.validation.annotation.NullOrNotEmpty.message}";
34

    
35
	Class<? extends Payload>[] payload() default {};
36

    
37
	Class<?>[] groups() default {};
38
}
(14-14/20)