1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.metaschema.databind.model.annotations;
7   
8   import static java.lang.annotation.RetentionPolicy.RUNTIME;
9   
10  import java.lang.annotation.Documented;
11  import java.lang.annotation.ElementType;
12  import java.lang.annotation.Retention;
13  import java.lang.annotation.Target;
14  
15  import edu.umd.cs.findbugs.annotations.NonNull;
16  
17  @Documented
18  @Retention(RUNTIME)
19  @Target(ElementType.ANNOTATION_TYPE)
20  public @interface AssemblyConstraints {
21    /**
22     * Get the index constraints for this assembly.
23     *
24     * @return the index constraints or an empty array if no index constraints are
25     *         defined
26     */
27    @NonNull
28    Index[] index() default {};
29  
30    /**
31     * Get the unique constraints for this assembly.
32     *
33     * @return the unique constraints or an empty array if no unique constraints are
34     *         defined
35     */
36    @NonNull
37    IsUnique[] unique() default {};
38  
39    /**
40     * Get the cardinality constraints for this assembly.
41     *
42     * @return the cardinality constraints or an empty array if no cardinality
43     *         constraints are defined
44     */
45    @NonNull
46    HasCardinality[] cardinality() default {};
47  }