001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package gov.nist.secauto.metaschema.databind.model.annotations; 007 008import static java.lang.annotation.RetentionPolicy.RUNTIME; 009 010import java.lang.annotation.Documented; 011import java.lang.annotation.ElementType; 012import java.lang.annotation.Retention; 013import java.lang.annotation.Target; 014 015import edu.umd.cs.findbugs.annotations.NonNull; 016 017@Documented 018@Retention(RUNTIME) 019@Target(ElementType.ANNOTATION_TYPE) 020public @interface AssemblyConstraints { 021 /** 022 * Get the index constraints for this assembly. 023 * 024 * @return the index constraints or an empty array if no index constraints are 025 * defined 026 */ 027 @NonNull 028 Index[] index() default {}; 029 030 /** 031 * Get the unique constraints for this assembly. 032 * 033 * @return the unique constraints or an empty array if no unique constraints are 034 * defined 035 */ 036 @NonNull 037 IsUnique[] unique() default {}; 038 039 /** 040 * Get the cardinality constraints for this assembly. 041 * 042 * @return the cardinality constraints or an empty array if no cardinality 043 * constraints are defined 044 */ 045 @NonNull 046 HasCardinality[] cardinality() default {}; 047}