Annotation Interface JsonViewField


@Retention(RUNTIME) @Target({FIELD,METHOD,RECORD_COMPONENT}) @Documented public @interface JsonViewField
Field level options for a property of a JsonView or JsonSubView.

@JsonView(entity = Customer.class)
public record CustomerView(
    @Id Long id,
    @JsonViewField(updatable = false) String email,
    @JsonViewField(etagCheck = false) String lastSeen
) {}

Currently supported only by Oracle Database 23ai and later.

Since:
5.3
Author:
graemerocher
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether the field contributes to the ETAG of the document.
    boolean
    Whether the field can be updated through the view.
  • Element Details

    • updatable

      boolean updatable
      Whether the field can be updated through the view. When false the field is generated with the NOUPDATE annotation and cannot be changed through the view.
      Returns:
      true if the field is updatable (default true)
      Default:
      true
    • etagCheck

      boolean etagCheck
      Whether the field contributes to the ETAG of the document. When false the field is generated with the NOCHECK annotation, so concurrent changes to it do not invalidate the document ETAG.
      Returns:
      true if the field is part of the ETAG check (default true)
      Default:
      true