Interface ReferenceField
- All Superinterfaces:
CustomField
A field with a reference value.
Example to create an instance using the builder pattern
ReferenceField referenceField = ReferenceField.builder()
.value(valueBuilder -> valueBuilder)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ReferenceFieldBuilder
builder()
builder factory method for ReferenceFieldstatic ReferenceFieldBuilder
builder
(ReferenceField template) create builder for ReferenceField instancestatic ReferenceField
deepCopy
(ReferenceField template) factory method to create a deep copy of ReferenceField@NotNull @Valid KeyReference
getValue()
References a resource by keystatic ReferenceField
of()
factory methodstatic ReferenceField
of
(ReferenceField template) factory method to create a shallow copy ReferenceFieldvoid
setValue
(KeyReference value) References a resource by keystatic com.fasterxml.jackson.core.type.TypeReference<ReferenceField>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withReferenceField
(Function<ReferenceField, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.customfields.CustomField
getType, withCustomField
-
Field Details
-
REFERENCE
discriminator value for ReferenceField- See Also:
-
-
Method Details
-
getValue
References a resource by key
- Returns:
- value
-
setValue
References a resource by key
- Parameters:
value
- value to be set
-
of
factory method- Returns:
- instance of ReferenceField
-
of
factory method to create a shallow copy ReferenceField- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ReferenceField- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ReferenceField- Returns:
- builder
-
builder
create builder for ReferenceField instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withReferenceField
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
-