Annotation Type GeneratedValue


  • @Retention(RUNTIME)
    @Target({METHOD,FIELD,ANNOTATION_TYPE})
    @Documented
    public @interface GeneratedValue
    Designates a property as a generated value. Typically not used directly but instead mapped to via annotation such as javax.persistence.GeneratedValue.
    Since:
    1.0.0
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String definition
      In the case of sequence generators if you wish to define statement that creates the sequence, you can do so here.
      java.lang.String ref
      In the case of sequence generators if you wish to alter the name of the sequence generator do so with this member.
      GeneratedValue.Type value
      The generation type.
    • Element Detail

      • value

        GeneratedValue.Type value
        The generation type.
        Returns:
        The generation type.
        Default:
        io.micronaut.data.annotation.GeneratedValue.Type.AUTO
      • definition

        java.lang.String definition
        In the case of sequence generators if you wish to define statement that creates the sequence, you can do so here.
        Returns:
        The sequence definition
        Default:
        ""
      • ref

        java.lang.String ref
        In the case of sequence generators if you wish to alter the name of the sequence generator do so with this member.
        Returns:
        The name to use to reference the sequence generator
        Default:
        ""