Interface CustomObjectReference
- All Superinterfaces:
Identifiable<CustomObject>
,IdentifiableObjHolder<CustomObject>
,Reference
,ReferenceMixin
public interface CustomObjectReference
extends Reference, Identifiable<CustomObject>, IdentifiableObjHolder<CustomObject>
Reference to a CustomObject.
Example to create an instance using the builder pattern
CustomObjectReference customObjectReference = CustomObjectReference.builder()
.id("{id}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CustomObjectReference -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomObjectReferenceBuilder
builder()
builder factory method for CustomObjectReferencestatic CustomObjectReferenceBuilder
builder
(CustomObjectReference template) create builder for CustomObjectReference instancestatic CustomObjectReference
deepCopy
(CustomObjectReference template) factory method to create a deep copy of CustomObjectReference@NotNull String
getId()
Unique identifier of the referenced CustomObject.@Valid CustomObject
getObj()
Contains the representation of the expanded CustomObject.static CustomObjectReference
of()
factory methodstatic CustomObjectReference
of
(CustomObjectReference template) factory method to create a shallow copy CustomObjectReferencevoid
Unique identifier of the referenced CustomObject.void
setObj
(CustomObject obj) Contains the representation of the expanded CustomObject.static com.fasterxml.jackson.core.type.TypeReference<CustomObjectReference>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.common.Reference
getTypeId, withReference
Methods inherited from interface com.commercetools.api.models.common.ReferenceMixin
toResourceIdentifier
-
Field Details
-
KEY_VALUE_DOCUMENT
discriminator value for CustomObjectReference- See Also:
-
-
Method Details
-
getObj
Contains the representation of the expanded CustomObject. Only present in responses to requests with Reference Expansion for CustomObjects.
- Specified by:
getObj
in interfaceIdentifiableObjHolder<CustomObject>
- Returns:
- obj
-
getId
Unique identifier of the referenced CustomObject.
- Specified by:
getId
in interfaceIdentifiable<CustomObject>
- Specified by:
getId
in interfaceReference
- Specified by:
getId
in interfaceReferenceMixin
- Returns:
- id
-
setObj
Contains the representation of the expanded CustomObject. Only present in responses to requests with Reference Expansion for CustomObjects.
- Parameters:
obj
- value to be set
-
setId
Unique identifier of the referenced CustomObject.
-
of
factory method- Returns:
- instance of CustomObjectReference
-
of
factory method to create a shallow copy CustomObjectReference- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CustomObjectReference- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CustomObjectReference- Returns:
- builder
-
builder
create builder for CustomObjectReference instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCustomObjectReference
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-