Package net.tangly.gleam.model
Interface JsonField<T,U>
- Type Parameters:
T
- type of the entity owning the fieldU
- type of the property
- All Known Implementing Classes:
JsonArray
,JsonProperty
Defines the abstraction of a mapping between a Java property - simple type, another class mapped to a JSON entity, or a collection mapped to a JSON array - and a JSON property,
type, or array.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Export the JSON value from the associated property after an optional conversion.void
Import the JSON value and set the associated property after an optional conversion.key()
Return the JSON property key name storing the property in a JSON structure.static String
-
Method Details
-
imports
Import the JSON value and set the associated property after an optional conversion. Multiple JSON values can be used if the object is complex.- Parameters:
entity
- entity which property will be imported and setobject
- JSON object containing the values- See Also:
-
exports
Export the JSON value from the associated property after an optional conversion. Multiple JSON values can be written if the object is a complex one.- Parameters:
entity
- entity which property will be exported as TSV valueobject
- JSON object to write the TSV value(s)- See Also:
-
key
String key()Return the JSON property key name storing the property in a JSON structure.- Returns:
- key of the property
-
string
-