Package io.jmix.core
Interface FetchPlanSerialization
- All Known Implementing Classes:
FetchPlanSerializationImpl
public interface FetchPlanSerialization
Class that is used for serialization and deserialization of fetch plan to JSON.
-
Method Summary
Modifier and TypeMethodDescriptionDeserializes a JSON object to fetch plan.toJson
(FetchPlan fetchPlan, FetchPlanSerializationOption... options) Serializes a fetch plan to JSON objecttoJson
(FetchPlan fetchPlan, Function<MetaClass, String> entityNameExtractor, FetchPlanSerializationOption... options) Serializes a fetch plan to JSON string.
-
Method Details
-
fromJson
Deserializes a JSON object to fetch plan. The method automatically identifies whether the fetch plan was serialized with theFetchPlanSerializationOption.COMPACT_FORMAT
option.- Parameters:
json
- JSON objects that represents the fetch plan- Returns:
- a fetchPlan
-
toJson
Serializes a fetch plan to JSON object- Parameters:
fetchPlan
- a fetchPlanoptions
- options specifying how a JSON object graph should be serialized- Returns:
- a string that represents a JSON object
-
toJson
String toJson(FetchPlan fetchPlan, Function<MetaClass, String> entityNameExtractor, FetchPlanSerializationOption... options) Serializes a fetch plan to JSON string.- Parameters:
fetchPlan
- a fetchPlanentityNameExtractor
- a function that returns an entity name by MetaClassoptions
- options specifying how a JSON object graph should be serialized- Returns:
- a string that represents a JSON object
-