Interface MultiTenantCloneable<T>
- All Known Subinterfaces:
Address
,AdvancedOfferPromotionMessageXref
,BandedPriceFulfillmentOption
,BandedWeightFulfillmentOption
,BundleOrderItem
,BundleOrderItemFeePrice
,CandidateItemOffer
,Category
,CategoryAttribute
,CategoryExcludedSearchFacet
,CategoryProductXref
,CategorySearchFacet
,CategoryXref
,Customer
,CustomerAddress
,CustomerAttribute
,CustomerPayment
,CustomerPhone
,DataDrivenEnumeration
,DataDrivenEnumerationValue
,DiscreteOrderItem
,DiscreteOrderItemFeePrice
,DynamicPriceDiscreteOrderItem
,FeaturedProduct
,Field
,FieldDefinition
,FieldGroup
,FixedPriceFulfillmentOption
,FulfillmentGroup
,FulfillmentGroupFee
,FulfillmentGroupItem
,FulfillmentOption
,GiftWrapOrderItem
,ImageStaticAsset
,IndexField
,IndexFieldType
,Offer
,OfferCode
,OfferInfo
,OfferItemCriteria
,OfferOfferRuleXref
,OfferPriceData
,OfferQualifyingCriteriaXref
,OfferRule
,OfferTargetCriteriaXref
,OfferTier
,Order
,OrderAttribute
,OrderItem
,OrderItemAttribute
,OrderItemPriceDetail
,OrderItemPriceDetailAdjustment
,OrderMultishipOption
,OrderPayment
,Page
,PageAttribute
,PageField
,PageItemCriteria
,PageRule
,PageTemplate
,PageTemplateFieldGroupXref
,PaymentTransaction
,PersonalMessage
,Product
,ProductAttribute
,ProductBundle
,ProductOption
,ProductOptionValue
,ProductOptionXref
,PromotionMessage
,RequiredFacet
,SearchFacet
,SearchFacetRange
,Sku
,SkuAttribute
,SkuBundleItem
,SkuProductOptionValueXref
,StaticAsset
,StaticAssetDescription
,StructuredContent
,StructuredContentField
,StructuredContentFieldGroupXref
,StructuredContentFieldTemplate
,StructuredContentFieldXref
,StructuredContentItemCriteria
,StructuredContentRule
,StructuredContentType
,SystemProperty
,TaxDetail
,Translation
,URLHandler
- All Known Implementing Classes:
AddressImpl
,BandedPriceFulfillmentOptionImpl
,BandedWeightFulfillmentOptionImpl
,BundleOrderItemFeePriceImpl
,BundleOrderItemImpl
,CandidateItemOfferImpl
,CategoryAttributeImpl
,CategoryExcludedSearchFacetImpl
,CategoryImpl
,CategoryMediaXrefImpl
,CategoryProductXrefImpl
,CategorySearchFacetImpl
,CategoryXrefImpl
,CrossSaleProductImpl
,CustomerAddressImpl
,CustomerAttributeImpl
,CustomerImpl
,CustomerPaymentImpl
,CustomerPhoneImpl
,DataDrivenEnumerationImpl
,DataDrivenEnumerationValueImpl
,Dimension
,DiscreteOrderItemFeePriceImpl
,DiscreteOrderItemImpl
,DynamicPriceDiscreteOrderItemImpl
,FeaturedProductImpl
,FieldDefinitionImpl
,FieldGroupImpl
,FieldImpl
,FixedPriceFulfillmentOptionImpl
,FulfillmentGroupFeeImpl
,FulfillmentGroupImpl
,FulfillmentGroupItemImpl
,FulfillmentOptionImpl
,GiftWrapOrderItemImpl
,ImageStaticAssetImpl
,IndexFieldImpl
,IndexFieldTypeImpl
,LegacyOfferUsesImpl
,MediaImpl
,NullOrderImpl
,NullSystemProperty
,NullURLHandler
,OfferCodeImpl
,OfferImpl
,OfferInfoImpl
,OfferItemCriteriaImpl
,OfferOfferRuleXrefImpl
,OfferPriceDataImpl
,OfferQualifyingCriteriaXrefImpl
,OfferRuleImpl
,OfferTargetCriteriaXrefImpl
,OrderAttributeImpl
,OrderImpl
,OrderItemAttributeImpl
,OrderItemImpl
,OrderItemPriceDetailAdjustmentImpl
,OrderItemPriceDetailImpl
,OrderMultishipOptionImpl
,OrderPaymentImpl
,PageAttributeImpl
,PageFieldImpl
,PageImpl
,PageItemCriteriaImpl
,PageRuleImpl
,PageTemplateFieldGroupXrefImpl
,PageTemplateImpl
,PaymentTransactionImpl
,PersonalMessageImpl
,ProductAttributeImpl
,ProductBundleImpl
,ProductImpl
,ProductOptionImpl
,ProductOptionValueImpl
,ProductOptionXrefImpl
,PromotionMessageImpl
,RequiredFacetImpl
,SearchFacetImpl
,SearchFacetRangeImpl
,SkuAttributeImpl
,SkuBundleItemImpl
,SkuImpl
,SkuMediaXrefImpl
,SkuProductOptionValueXrefImpl
,StaticAssetDescriptionImpl
,StaticAssetImpl
,StructuredContentFieldGroupXrefImpl
,StructuredContentFieldImpl
,StructuredContentFieldTemplateImpl
,StructuredContentFieldXrefImpl
,StructuredContentImpl
,StructuredContentItemCriteriaImpl
,StructuredContentRuleImpl
,StructuredContentTypeImpl
,SystemPropertyImpl
,TaxDetailImpl
,TranslationImpl
,UpSaleProductImpl
,URLHandlerDTO
,URLHandlerImpl
,Weight
public interface MultiTenantCloneable<T>
Describes an entity (or @Embeddable) that is able to be cloned for the purpose of multiple tenancy.
- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescription<G extends T>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.
-
Method Details
-
createOrRetrieveCopyInstance
<G extends T> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException Clone this entity for the purpose of multiple tenancy. Note, extending classes should follow this pattern:public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context); if (createResponse.isAlreadyPopulated()) { return createResponse; } MyClass myClone = createResponse.getClone();
Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity://copy extended field values on myClone here
return createResponse; }
public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse
createResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone(); //copy extended field values on myClone here
return createResponse; }
- Parameters:
context
- a context object providing persistence and library functionality for copying entities- Returns:
- the resulting copy container, possibly already persisted
- Throws:
CloneNotSupportedException
- if there's a problem detected with the cloning configuration
-