001package io.ebean.annotation; 002 003import java.lang.annotation.ElementType; 004import java.lang.annotation.Retention; 005import java.lang.annotation.RetentionPolicy; 006import java.lang.annotation.Target; 007 008/** 009 * A non-JPA standard alternative to using <code>@Column(nullable=false)</code> 010 * or javax validation <code>@NotNull</code>. 011 * <p> 012 * We would typically prefer to use the standard annotations but with entity beans 013 * written in Kotlin as constructor properties the javax validation <code>@NotNull</code> 014 * is applied as parameter on the constructor rather than as a property mapping. 015 * </p> 016 * <p> 017 * So it is generally not ideal to use this non-standard JPA annotation but some may prefer 018 * it style wise - especially with Kotlin. 019 * </p> 020 */ 021@Retention(RetentionPolicy.RUNTIME) 022@Target(ElementType.FIELD) 023public @interface NotNull { 024 025}