All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.simonvt.schematic.annotation.PrimaryKeyConstraint Maven / Gradle / Ivy

The newest version!
package net.simonvt.schematic.annotation;


import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.CLASS;

/** Adds the PRIMARY KEY constraint on a table level */
@Retention(CLASS) @Target(TYPE)
public @interface PrimaryKeyConstraint {

    /** Optional name for constraint */
    String name() default "";

    /** Column names to be used in constraint */
    String[] columns();

    /**
     * Defines conflict resolution algorithm.
     * By default {@link ConflictResolutionType#NONE} is used.
     * */
    ConflictResolutionType onConflict() default ConflictResolutionType.NONE;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy