Annotation Interface DatabaseField


@Documented @Retention(RUNTIME) @Target(FIELD) public @interface DatabaseField
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<? extends ObjectMapper<?>>
     
    Define the name of the database field.
    int
    Define the position of the database field (is needed for passing field position when serializing object as PostgreSQL ROW).
    Class<? extends ValueTransformer<?,?>>
    Transformer class of type ValueTransformer that can be used to transform incoming value into a needed class (is needed for cases like non-standard way of passing enums).
  • Element Details

    • name

      String name
      Define the name of the database field.
      Default:
      ""
    • position

      int position
      Define the position of the database field (is needed for passing field position when serializing object as PostgreSQL ROW).
      Default:
      -1
    • transformer

      Class<? extends ValueTransformer<?,?>> transformer
      Transformer class of type ValueTransformer that can be used to transform incoming value into a needed class (is needed for cases like non-standard way of passing enums).
      Default:
      org.zalando.typemapper.core.fieldMapper.AnyTransformer.class
    • mapper

      Class<? extends ObjectMapper<?>> mapper
      Default:
      org.zalando.typemapper.core.fieldMapper.DefaultObjectMapper.class