Annotation Type NotNull


  • @Retention(RUNTIME)
    @Target(FIELD)
    public @interface NotNull
    A non-JPA standard alternative to using @Column(nullable=false) or javax validation @NotNull.

    We would typically prefer to use the standard annotations but with entity beans written in Kotlin as constructor properties the javax validation @NotNull is applied as parameter on the constructor rather than as a property mapping.

    So it is generally not ideal to use this non-standard JPA annotation but some may prefer it style wise - especially with Kotlin.