Package com.github.jasminb.jsonapi
Enum SerializationFeature
- java.lang.Object
-
- java.lang.Enum<SerializationFeature>
-
- com.github.jasminb.jsonapi.SerializationFeature
-
- All Implemented Interfaces:
Serializable,Comparable<SerializationFeature>
public enum SerializationFeature extends Enum<SerializationFeature>
Enumeration that defines list of serialization features that can be set toResourceConverter.- Author:
- jbegic
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INCLUDE_IDIf enabled,Idattribute will be serializedINCLUDE_JSONAPI_OBJECTIf enabled JSON API object will be serialized.INCLUDE_LINKSIf enabled, links attribute will be serializedINCLUDE_METAIf enabled, meta attribute will be serializedINCLUDE_RELATIONSHIP_ATTRIBUTESThis option if enabled instructs resource converter to serialize entire relationship objects (type and id are serialized by default)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<SerializationFeature>getDefaultFeatures()Returns set of features that are enabled by default.static SerializationFeaturevalueOf(String name)Returns the enum constant of this type with the specified name.static SerializationFeature[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INCLUDE_RELATIONSHIP_ATTRIBUTES
public static final SerializationFeature INCLUDE_RELATIONSHIP_ATTRIBUTES
This option if enabled instructs resource converter to serialize entire relationship objects (type and id are serialized by default)
-
INCLUDE_META
public static final SerializationFeature INCLUDE_META
If enabled, meta attribute will be serialized
-
INCLUDE_LINKS
public static final SerializationFeature INCLUDE_LINKS
If enabled, links attribute will be serialized
-
INCLUDE_ID
public static final SerializationFeature INCLUDE_ID
If enabled,Idattribute will be serialized
-
INCLUDE_JSONAPI_OBJECT
public static final SerializationFeature INCLUDE_JSONAPI_OBJECT
If enabled JSON API object will be serialized.
-
-
Method Detail
-
values
public static SerializationFeature[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SerializationFeature c : SerializationFeature.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SerializationFeature valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getDefaultFeatures
public static Set<SerializationFeature> getDefaultFeatures()
Returns set of features that are enabled by default.- Returns:
- returns features that are enabled by default
-
-