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