Class ExplicitlySetBmcModel
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
public abstract class ExplicitlySetBmcModel extends Object
Base class for models implementing the explicitly set behavior.Subclasses should be annotated with com.fasterxml.jackson.annotation.JsonFilter(com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME).
All the properties that were explicitly set by user will be serialized, even if set to null.
-
-
Field Summary
Fields Modifier and Type Field Description static StringEXPLICITLY_SET_FILTER_NAMEThe name of the explicitly set filter for usage in serialization / deserialization implementationsstatic StringEXPLICITLY_SET_PROPERTY_NAMEThe name of the explicitly set map property for usage in serialization / deserialization implementations
-
Constructor Summary
Constructors Constructor Description ExplicitlySetBmcModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()protected voidmarkPropertyAsExplicitlySet(String propertyName)Specify that a model property was explicitly set by user.StringtoString()booleanwasPropertyExplicitlySet(String propertyName)Get whether a property was explicitly specified by user.
-
-
-
Field Detail
-
EXPLICITLY_SET_FILTER_NAME
public static final String EXPLICITLY_SET_FILTER_NAME
The name of the explicitly set filter for usage in serialization / deserialization implementations- See Also:
- Constant Field Values
-
EXPLICITLY_SET_PROPERTY_NAME
public static final String EXPLICITLY_SET_PROPERTY_NAME
The name of the explicitly set map property for usage in serialization / deserialization implementations- See Also:
- Constant Field Values
-
-
Method Detail
-
markPropertyAsExplicitlySet
protected void markPropertyAsExplicitlySet(String propertyName)
Specify that a model property was explicitly set by user.The method should be used inside property setters.
- Parameters:
propertyName- the name of the model property to mark as set by user. Should match the property name exactly.
-
wasPropertyExplicitlySet
public boolean wasPropertyExplicitlySet(String propertyName)
Get whether a property was explicitly specified by user.It is highly unlikely that this is the method you want to use as a user.
- Parameters:
propertyName- the name of the property.- Returns:
- whether the property was explicitly specified by user.
-
-