Package io.micronaut.data.annotation
Annotation Interface EntityRepresentation
@Retention(RUNTIME)
@Target({TYPE,METHOD})
@Documented
@Inherited
public @interface EntityRepresentation
Defines entity representation for database operations. Is type is TABULAR it means default entity representation
and COLUMN will mean result will contain single column with the value of given type.
- Since:
- 4.0.0
- Author:
- radovanradic
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The column type.static enum
Supported entity representation types. -
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescription -
Field Summary
-
Field Details
-
DEFAULT_COLUMN
The default column name for the JSON data.- See Also:
-
-
Element Details
-
type
- Returns:
- The query result type
-
-
-
columnType
EntityRepresentation.ColumnType columnType- Returns:
- the column type if type is
EntityRepresentation.Type.COLUMN
- Default:
- JSON
-
column
String column- Returns:
- The column containing result if type is
EntityRepresentation.Type.COLUMN
- Default:
- "DATA"
-
jsonDataType
JsonDataType jsonDataType- Returns:
- The JSON data type that resulting column will hold if type is
EntityRepresentation.Type.COLUMN
and columnType isEntityRepresentation.ColumnType.JSON
. It helps to pick proper column reader based on result data type
- Default:
- DEFAULT
-