Annotation Interface JsonSubView
@Retention(RUNTIME)
@Target({ANNOTATION_TYPE,TYPE,FIELD})
@Documented
@MappedEntity
@EntityRepresentation(type=COLUMN,
columnType=JSON)
public @interface JsonSubView
The annotation defining Json Duality SubView. Currently supported only by Oracle database.
A JsonView can contain JsonSubViews, which have the same structure as JsonViews.
Since only JsonView creation scripts are generated, we need both annotations to differ them.
@JsonSubView(entity = Class.class, operations = { JsonView.Operation.UPDATE, JsonView.Operation.INSERT })
public class TeacherScheduleSubView {
\@Id
\@GeneratedValue(GeneratedValue.Type.IDENTITY)
\@MappedProperty(value = "id")
private Long classID;
private String name;
}
- Since:
- 5.0.0
- Author:
- dimitrijezravkovic
- See Also:
-
Field Summary
Fields -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe name of the single column in the view.Class<?> The entity class.The supported sql operations array.Only applies to supported databases.The Json View name in the database.
-
Field Details
-
DEFAULT_COLUMN_NAME
- See Also:
-
-
Element Details
-
entity
Class<?> entityThe entity class. Specify an entity class annotated withMappedEntitythat this JSON sub view corresponds to. Valid entity class is one that defines the properties used in this class.- Returns:
- the entity class (default void)
- Default:
void.class
-
operations
JsonView.Operation[] operationsThe supported sql operations array.- Returns:
- the supported operations array (default [UPDATE, INSERT, DELETE])
- Default:
{INSERT, UPDATE, DELETE}
-
column
The name of the single column in the view.- Returns:
- the column name (default DATA)
- Default:
"DATA"
-
value
The Json View name in the database.- Returns:
- the json view
- Default:
""
-
schema
Only applies to supported databases.- Returns:
- the schema to use for the query
- Default:
""
-
alias
- Returns:
- The view alias to use for the query
- Default:
""
-