protected class EntitySerialization.EntitySerializer extends java.lang.Object implements com.google.gson.JsonSerializer<Entity>
Modifier and Type | Field and Description |
---|---|
protected boolean |
compactRepeatedEntities |
protected boolean |
serializeInstanceName |
protected View |
view |
Constructor and Description |
---|
EntitySerializer(View view,
EntitySerializationOption... options) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
propertyWritingAllowed(com.haulmont.chile.core.model.MetaProperty metaProperty,
Entity entity) |
com.google.gson.JsonElement |
serialize(Entity entity,
java.lang.reflect.Type typeOfSrc,
com.google.gson.JsonSerializationContext context) |
protected com.google.gson.JsonArray |
serializeCollection(java.util.Collection value,
View view,
java.util.Set<Entity> cyclicReferences) |
protected com.google.gson.JsonObject |
serializeEntity(Entity entity,
View view,
java.util.Set<Entity> cyclicReferences) |
protected com.google.gson.JsonArray |
serializeSimpleCollection(java.util.Collection fieldValue,
com.haulmont.chile.core.model.MetaProperty property) |
protected void |
writeFields(Entity entity,
com.google.gson.JsonObject jsonObject,
View view,
java.util.Set<Entity> cyclicReferences) |
protected void |
writeIdField(Entity entity,
com.google.gson.JsonObject jsonObject) |
protected void |
writeSimpleProperty(com.google.gson.JsonObject jsonObject,
@NotNull java.lang.Object fieldValue,
com.haulmont.chile.core.model.MetaProperty property) |
protected boolean compactRepeatedEntities
protected boolean serializeInstanceName
protected View view
public EntitySerializer(@Nullable View view, EntitySerializationOption... options)
public com.google.gson.JsonElement serialize(Entity entity, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
serialize
in interface com.google.gson.JsonSerializer<Entity>
protected com.google.gson.JsonObject serializeEntity(Entity entity, @Nullable View view, java.util.Set<Entity> cyclicReferences)
protected void writeIdField(Entity entity, com.google.gson.JsonObject jsonObject)
protected boolean propertyWritingAllowed(com.haulmont.chile.core.model.MetaProperty metaProperty, Entity entity)
protected void writeFields(Entity entity, com.google.gson.JsonObject jsonObject, @Nullable View view, java.util.Set<Entity> cyclicReferences)
protected void writeSimpleProperty(com.google.gson.JsonObject jsonObject, @NotNull @NotNull java.lang.Object fieldValue, com.haulmont.chile.core.model.MetaProperty property)
protected com.google.gson.JsonArray serializeCollection(java.util.Collection value, @Nullable View view, java.util.Set<Entity> cyclicReferences)
protected com.google.gson.JsonArray serializeSimpleCollection(java.util.Collection fieldValue, com.haulmont.chile.core.model.MetaProperty property)