Interface Reference
- All Known Subinterfaces:
CategoryReference
,ProductReference
,ProductTypeReference
public interface Reference
Reference
Example to create a subtype instance using the builder pattern
Example to create a subtype instance using the builder pattern
Reference reference = Reference.categoryBuilder()
id("{id}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CategoryReferenceBuilder
builder for category subtypestatic Reference
factory method to create a deep copy of Reference@NotNull String
getId()
@NotNull ReferenceTypeId
static ProductReferenceBuilder
builder for product subtypestatic ProductTypeReferenceBuilder
builder for productType subtypevoid
set idstatic com.fasterxml.jackson.core.type.TypeReference<Reference>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withReference
(Function<Reference, T> helper) accessor map function
-
Method Details
-
getTypeId
- Returns:
- typeId
-
getId
- Returns:
- id
-
setId
set id- Parameters:
id
- value to be set
-
deepCopy
factory method to create a deep copy of Reference- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
categoryBuilder
builder for category subtype- Returns:
- builder
-
productBuilder
builder for product subtype- Returns:
- builder
-
productTypeBuilder
builder for productType subtype- Returns:
- builder
-
withReference
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
-