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
-
Element Details
-
updatable
boolean updatableWhether the field can be updated through the view. Whenfalsethe field is generated with theNOUPDATEannotation and cannot be changed through the view.- Returns:
- true if the field is updatable (default true)
- Default:
true
-
etagCheck
boolean etagCheckWhether the field contributes to the ETAG of the document. Whenfalsethe field is generated with theNOCHECKannotation, 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
-