Interface Reference
- All Superinterfaces:
ReferenceMixin
- All Known Subinterfaces:
AssociateRoleReference
,AttributeGroupReference
,BusinessUnitReference
,CartDiscountReference
,CartReference
,CategoryReference
,ChannelReference
,CustomerEmailTokenReference
,CustomerGroupReference
,CustomerPasswordTokenReference
,CustomerReference
,CustomObjectReference
,DirectDiscountReference
,DiscountCodeReference
,GenericReference<T>
,InventoryEntryReference
,OrderEditReference
,OrderReference
,PaymentReference
,ProductDiscountReference
,ProductReference
,ProductSelectionReference
,ProductTailoringReference
,ProductTypeReference
,QuoteReference
,QuoteRequestReference
,ReviewReference
,ShippingMethodReference
,ShoppingListReference
,StagedQuoteReference
,StandalonePriceReference
,StateReference
,StoreReference
,TaxCategoryReference
,TypeReference
,ZoneReference
A Reference represents a loose reference to another resource in the same Project identified by its id
. The typeId
indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj
field then.
Example to create a subtype instance using the builder pattern
Reference reference = Reference.associateRoleBuilder()
id("{id}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder for associateRole subtypebuilder for attributeGroup subtypestatic BusinessUnitReferenceBuilder
builder for businessUnit subtypestatic CartReferenceBuilder
builder for cart subtypestatic CartDiscountReferenceBuilder
builder for cartDiscount subtypestatic CategoryReferenceBuilder
builder for category subtypestatic ChannelReferenceBuilder
builder for channel subtypestatic CustomerReferenceBuilder
builder for customer subtypebuilder for customerEmailToken subtypebuilder for customerGroup subtypebuilder for customerPasswordToken subtypestatic Reference
factory method to create a deep copy of Referencebuilder for directDiscount subtypestatic DiscountCodeReferenceBuilder
builder for discountCode subtype@NotNull String
getId()
Unique ID of the referenced resource.@NotNull ReferenceTypeId
Type of referenced resource.builder for inventoryEntry subtypestatic CustomObjectReferenceBuilder
builder for keyValueDocument subtypestatic OrderReferenceBuilder
builder for order subtypestatic OrderEditReferenceBuilder
builder for orderEdit subtypestatic PaymentReferenceBuilder
builder for payment subtypestatic ProductReferenceBuilder
builder for product subtypebuilder for productDiscount subtypebuilder for productSelection subtypebuilder for productTailoring subtypestatic ProductTypeReferenceBuilder
builder for productType subtypestatic QuoteReferenceBuilder
builder for quote subtypestatic QuoteRequestReferenceBuilder
builder for quoteRequest subtypestatic ReviewReferenceBuilder
builder for review subtypevoid
Unique ID of the referenced resource.builder for shippingMethod subtypestatic ShoppingListReferenceBuilder
builder for shoppingList subtypestatic StagedQuoteReferenceBuilder
builder for stagedQuote subtypebuilder for standalonePrice subtypestatic StateReferenceBuilder
builder for state subtypestatic StoreReferenceBuilder
builder for store subtypestatic TaxCategoryReferenceBuilder
builder for taxCategory subtypestatic TypeReferenceBuilder
builder for type subtypestatic com.fasterxml.jackson.core.type.TypeReference<Reference>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withReference
(Function<Reference, T> helper) accessor map functionstatic ZoneReferenceBuilder
builder for zone subtypeMethods inherited from interface com.commercetools.api.models.common.ReferenceMixin
toResourceIdentifier
-
Method Details
-
getTypeId
Type of referenced resource.
- Specified by:
getTypeId
in interfaceReferenceMixin
- Returns:
- typeId
-
getId
Unique ID of the referenced resource.
- Specified by:
getId
in interfaceReferenceMixin
- Returns:
- id
-
setId
Unique ID of the referenced resource.
- 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
-
associateRoleBuilder
builder for associateRole subtype- Returns:
- builder
-
attributeGroupBuilder
builder for attributeGroup subtype- Returns:
- builder
-
businessUnitBuilder
builder for businessUnit subtype- Returns:
- builder
-
cartDiscountBuilder
builder for cartDiscount subtype- Returns:
- builder
-
cartBuilder
builder for cart subtype- Returns:
- builder
-
categoryBuilder
builder for category subtype- Returns:
- builder
-
channelBuilder
builder for channel subtype- Returns:
- builder
-
keyValueDocumentBuilder
builder for keyValueDocument subtype- Returns:
- builder
-
customerEmailTokenBuilder
builder for customerEmailToken subtype- Returns:
- builder
-
customerGroupBuilder
builder for customerGroup subtype- Returns:
- builder
-
customerPasswordTokenBuilder
builder for customerPasswordToken subtype- Returns:
- builder
-
customerBuilder
builder for customer subtype- Returns:
- builder
-
directDiscountBuilder
builder for directDiscount subtype- Returns:
- builder
-
discountCodeBuilder
builder for discountCode subtype- Returns:
- builder
-
inventoryEntryBuilder
builder for inventoryEntry subtype- Returns:
- builder
-
orderEditBuilder
builder for orderEdit subtype- Returns:
- builder
-
orderBuilder
builder for order subtype- Returns:
- builder
-
paymentBuilder
builder for payment subtype- Returns:
- builder
-
productDiscountBuilder
builder for productDiscount subtype- Returns:
- builder
-
productBuilder
builder for product subtype- Returns:
- builder
-
productSelectionBuilder
builder for productSelection subtype- Returns:
- builder
-
productTailoringBuilder
builder for productTailoring subtype- Returns:
- builder
-
productTypeBuilder
builder for productType subtype- Returns:
- builder
-
quoteBuilder
builder for quote subtype- Returns:
- builder
-
quoteRequestBuilder
builder for quoteRequest subtype- Returns:
- builder
-
reviewBuilder
builder for review subtype- Returns:
- builder
-
shippingMethodBuilder
builder for shippingMethod subtype- Returns:
- builder
-
shoppingListBuilder
builder for shoppingList subtype- Returns:
- builder
-
stagedQuoteBuilder
builder for stagedQuote subtype- Returns:
- builder
-
standalonePriceBuilder
builder for standalonePrice subtype- Returns:
- builder
-
stateBuilder
builder for state subtype- Returns:
- builder
-
storeBuilder
builder for store subtype- Returns:
- builder
-
taxCategoryBuilder
builder for taxCategory subtype- Returns:
- builder
-
typeBuilder
builder for type subtype- Returns:
- builder
-
zoneBuilder
builder for zone 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
-