
org.yop.orm.annotations.JoinColumn Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of orm Show documentation
Show all versions of orm Show documentation
YOP-orm is a lightweight ORM wannabe. Hit and run, no session, no bytecode generation, SQL-like syntax.
Strong constraints on the Database schema.
Java 8 is required.
Ω≡{Ⓐ}
The newest version!
package org.yop.orm.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* A relation to another Yopable object.
*
* You don't have to explicitly set the cardinality. Yop simply reads the relation field :
*
* - Yopable → Collection of Yopables : one to many
* - Yopable → Yopable : one to one
* - Collection of Yopables → Yopable : many to one
* - Anything else → error
*
*
*
* The relation can either be :
*
* - unidirectional → local or remote is set
* - bidirectional → local and remote are set
*
*
* There is no fallback when neither {@link #local()} nor {@link #remote()} is set !
* Please either set one of them or both !
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface JoinColumn {
/** The name of the join column on the local table (1 → 1 or N → 1) */
String local() default "";
/** The name of the join column on the target table (1 → 1 or 1 → N) */
String remote() default "";
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy