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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CustomObjectReference -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomObjectReferenceBuilderbuilder()builder factory method for CustomObjectReferencestatic CustomObjectReferenceBuilderbuilder(CustomObjectReference template) create builder for CustomObjectReference instancecopyDeep()static CustomObjectReferencedeepCopy(CustomObjectReference template) factory method to create a deep copy of CustomObjectReference@NotNull StringgetId()Unique identifier of the referenced CustomObject.@Valid CustomObjectgetObj()Contains the representation of the expanded CustomObject.static CustomObjectReferenceof()factory methodstatic CustomObjectReferenceof(CustomObjectReference template) factory method to create a shallow copy CustomObjectReferencevoidUnique identifier of the referenced CustomObject.voidsetObj(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> Taccessor map functionMethods inherited from interface com.commercetools.api.models.common.Reference
getTypeId, withReferenceMethods 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:
getObjin interfaceIdentifiableObjHolder<CustomObject>- Returns:
- obj
-
getId
Unique identifier of the referenced CustomObject.
- Specified by:
getIdin interfaceIdentifiable<CustomObject>- Specified by:
getIdin interfaceReference- Specified by:
getIdin 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
-
copyDeep
CustomObjectReference copyDeep() -
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
-