Package io.jmix.core
Enum Class EntitySerializationOption
- All Implemented Interfaces:
Serializable
,Comparable<EntitySerializationOption>
,Constable
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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIf 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.Specifies that not allowed properties should NOT be serialized.Specifies that read-only non-persistent properties (getter methods annotated with @MetaProperty) should NOT be serialized.Specifies that JSON must be pretty printedSpecifies that entity instance name will be serialized.Specifies that fields with null values should be serialized.Specifies that fields withio.jmix.core.annotation.Secret
annotation should be serialized. -
Method Summary
Modifier and TypeMethodDescriptionstatic EntitySerializationOption
Returns the enum constant of this class with the specified name.static EntitySerializationOption[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
Specifies that fields with null values should be serialized. The default behavior is not to serialize nulls. -
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
Specifies that read-only non-persistent properties (getter methods annotated with @MetaProperty) should NOT be serialized. -
PRETTY_PRINT
Specifies that JSON must be pretty printed -
DO_NOT_SERIALIZE_DENIED_PROPERTY
Specifies that not allowed properties should NOT be serialized. -
SERIALIZE_SECRET_FIELDS
Specifies that fields withio.jmix.core.annotation.Secret
annotation should be serialized. By default, secret fields are not written to the result JSON.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-