Package io.jmix.core.impl.serialization
Class EntitySerializationImpl.EntityDeserializer
java.lang.Object
io.jmix.core.impl.serialization.EntitySerializationImpl.EntityDeserializer
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<Entity>
- Enclosing class:
EntitySerializationImpl
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEntityDeserializer(@Nullable MetaClass metaClass, EntitySerializationOption... options) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclearFields(Object entity) deserialize(com.google.gson.JsonElement jsonElement, Type typeOfT, com.google.gson.JsonDeserializationContext context) protected booleanpropertyReadRequired(String propertyName) protected CollectionreadCollection(com.google.gson.JsonArray jsonArray, MetaProperty metaProperty) protected ObjectreadEmbeddedEntity(com.google.gson.JsonObject jsonObject, MetaProperty metaProperty) protected ObjectreadEntity(com.google.gson.JsonObject jsonObject, @Nullable MetaClass metaClass) protected voidreadFields(com.google.gson.JsonObject jsonObject, Object entity) protected CollectionreadSimpleCollection(com.google.gson.JsonArray jsonArray, MetaProperty metaProperty) protected @Nullable ObjectreadSimpleProperty(com.google.gson.JsonElement valueElement, Datatype propertyType) protected @Nullable MetaClassresolveMetaClass(@Nullable Type typeOfT) Returns the MetaClass to deserialize into: the one passed to this deserializer if any, otherwise the one corresponding to the declared Java type.
-
Field Details
-
metaClass
-
ignoreEntityName
protected final boolean ignoreEntityName
-
-
Constructor Details
-
EntityDeserializer
-
-
Method Details
-
deserialize
public Entity deserialize(com.google.gson.JsonElement jsonElement, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException - Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<Entity>- Throws:
com.google.gson.JsonParseException
-
resolveMetaClass
Returns the MetaClass to deserialize into: the one passed to this deserializer if any, otherwise the one corresponding to the declared Java type. The latter is relevant for entities nested in POJOs and records, where the declared type of the field is the only information about the entity type available locally. -
readEntity
-
propertyReadRequired
-
readFields
-
readSimpleProperty
-
readEmbeddedEntity
protected Object readEmbeddedEntity(com.google.gson.JsonObject jsonObject, MetaProperty metaProperty) -
readCollection
-
readSimpleCollection
protected Collection readSimpleCollection(com.google.gson.JsonArray jsonArray, MetaProperty metaProperty) -
clearFields
-