Package io.jmix.core

Enum Class EntitySerializationOption

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

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

    • COMPACT_REPEATED_ENTITIES

      public static final EntitySerializationOption COMPACT_REPEATED_ENTITIES
      If an entity occurs in object graph several times, then the second and next occurrences will be replaced just with a JSON object with the single field - entity identifier.
    • SERIALIZE_NULLS

      public static final EntitySerializationOption SERIALIZE_NULLS
      Specifies that fields with null values should be serialized. The default behavior is not to serialize nulls.
    • SERIALIZE_INSTANCE_NAME

      public static final EntitySerializationOption SERIALIZE_INSTANCE_NAME
      Specifies that entity instance name will be serialized. The default behavior is not to serialize instance name.
    • DO_NOT_SERIALIZE_RO_NON_PERSISTENT_PROPERTIES

      public static final EntitySerializationOption DO_NOT_SERIALIZE_RO_NON_PERSISTENT_PROPERTIES
      Specifies that read-only non-persistent properties (getter methods annotated with @MetaProperty) should NOT be serialized.
    • PRETTY_PRINT

      public static final EntitySerializationOption PRETTY_PRINT
      Specifies that JSON must be pretty printed
    • DO_NOT_SERIALIZE_DENIED_PROPERTY

      public static final EntitySerializationOption DO_NOT_SERIALIZE_DENIED_PROPERTY
      Specifies that not allowed properties should NOT be serialized.
    • SERIALIZE_SECRET_FIELDS

      public static final EntitySerializationOption SERIALIZE_SECRET_FIELDS
      Specifies that fields with io.jmix.core.annotation.Secret annotation should be serialized. By default, secret fields are not written to the result JSON.
  • Method Details

    • values

      public static EntitySerializationOption[] 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 EntitySerializationOption 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