Package io.jmix.core

Enum Class FetchPlanSerializationOption

java.lang.Object
java.lang.Enum<FetchPlanSerializationOption>
io.jmix.core.FetchPlanSerializationOption
All Implemented Interfaces:
Serializable, Comparable<FetchPlanSerializationOption>, Constable

public enum FetchPlanSerializationOption extends Enum<FetchPlanSerializationOption>
An object that configures how to serialize a fetch plan to JSON. Objects of this type are used by methods of the FetchPlanSerialization. This object may be also used during the deserialization.
  • Enum Constant Details

    • COMPACT_FORMAT

      public static final FetchPlanSerializationOption COMPACT_FORMAT
      Specifies that fetch plan is serialized in the compact format. In compact format repeated nested fetch plans are replaced with just a fetch plan name. For example fetch plan for customerGroup2 is defined with a string:
       {
        "name": "customer-fp",
        "entity": "sample_Customer",
        "properties": [
            "name",
            {
                "name": "customerGroup",
                "fetchPlan": {
                    "name": "customerGroup-fp",
                    "properties": [
                        "id",
                        "createdBy",
                        "createTs",
                        "name"
                    ]
                }
            },
            {
                "name": "customerGroup2",
                "fetchPlan": "customerGroup-fp"
            }
        ]
       }
       
    • INCLUDE_FETCH_MODE

      public static final FetchPlanSerializationOption INCLUDE_FETCH_MODE
      Specifies that an information about properties fetch mode will be included to the JSON. Default fetchMode value (AUTO) will not be included.
  • Method Details

    • values

      public static FetchPlanSerializationOption[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FetchPlanSerializationOption valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null