Class EntitySerializationImpl.EntityDeserializer

java.lang.Object
io.jmix.core.impl.serialization.EntitySerializationImpl.EntityDeserializer
All Implemented Interfaces:
com.google.gson.JsonDeserializer<Entity>
Enclosing class:
EntitySerializationImpl

protected class EntitySerializationImpl.EntityDeserializer extends Object implements com.google.gson.JsonDeserializer<Entity>
  • Field Details

    • metaClass

      protected MetaClass metaClass
    • ignoreEntityName

      protected final boolean ignoreEntityName
  • Constructor Details

  • 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:
      deserialize in interface com.google.gson.JsonDeserializer<Entity>
      Throws:
      com.google.gson.JsonParseException
    • resolveMetaClass

      protected @Nullable MetaClass resolveMetaClass(@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. 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

      protected Object readEntity(com.google.gson.JsonObject jsonObject, @Nullable MetaClass metaClass)
    • propertyReadRequired

      protected boolean propertyReadRequired(String propertyName)
    • readFields

      protected void readFields(com.google.gson.JsonObject jsonObject, Object entity)
    • readSimpleProperty

      protected @Nullable Object readSimpleProperty(com.google.gson.JsonElement valueElement, Datatype propertyType)
    • readEmbeddedEntity

      protected Object readEmbeddedEntity(com.google.gson.JsonObject jsonObject, MetaProperty metaProperty)
    • readCollection

      protected Collection readCollection(com.google.gson.JsonArray jsonArray, MetaProperty metaProperty)
    • readSimpleCollection

      protected Collection readSimpleCollection(com.google.gson.JsonArray jsonArray, MetaProperty metaProperty)
    • clearFields

      protected void clearFields(Object entity)