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

tech.ydb.yoj.databind.schema.GlobalIndex Maven / Gradle / Ivy

Go to download

Core data-binding logic used by YOJ (YDB ORM for Java) to convert between Java objects and database rows (or anything representable by a Java Map, really).

The newest version!
package tech.ydb.yoj.databind.schema;

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

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

/**
 * Specifies the index for the annotated entity.
 *
 * 
 *    Example:
 *
 *    @GlobalIndex(name="views_index", fields = {"name", "type"})
 *    public class Customer { ... }
 * 
*/ @Target(TYPE) @Retention(RUNTIME) @Repeatable(GlobalIndexes.class) public @interface GlobalIndex { /** * Index name. */ String name(); /** * List of annotated class fields representing index columns. */ String[] fields(); /** * Index type */ Type type() default Type.GLOBAL; enum Type { GLOBAL, UNIQUE } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy