Class CandidateItemOfferImpl
java.lang.Object
org.broadleafcommerce.core.offer.domain.CandidateItemOfferImpl
- All Implemented Interfaces:
Serializable,Cloneable,MultiTenantCloneable<CandidateItemOffer>,CandidateItemOffer
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckCloneable(CandidateItemOffer itemOffer) clone()<G extends CandidateItemOffer>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.booleangetId()getOffer()intinthashCode()voidsetDiscountedPrice(Money discountedPrice) voidvoidvoidsetOrderItem(OrderItem orderItem)
-
Field Details
-
LOG
public static final org.apache.commons.logging.Log LOG -
serialVersionUID
public static final long serialVersionUID- See Also:
-
id
-
orderItem
-
offer
-
deproxiedOffer
-
-
Constructor Details
-
CandidateItemOfferImpl
public CandidateItemOfferImpl()
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceCandidateItemOffer
-
setId
- Specified by:
setIdin interfaceCandidateItemOffer
-
getOrderItem
- Specified by:
getOrderItemin interfaceCandidateItemOffer
-
setOrderItem
- Specified by:
setOrderItemin interfaceCandidateItemOffer
-
setOffer
- Specified by:
setOfferin interfaceCandidateItemOffer
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfaceCandidateItemOffer
-
getOffer
- Specified by:
getOfferin interfaceCandidateItemOffer
-
getDiscountedPrice
- Specified by:
getDiscountedPricein interfaceCandidateItemOffer
-
setDiscountedPrice
- Specified by:
setDiscountedPricein interfaceCandidateItemOffer
-
checkCloneable
public void checkCloneable(CandidateItemOffer itemOffer) throws CloneNotSupportedException, SecurityException, NoSuchMethodException -
clone
- Specified by:
clonein interfaceCandidateItemOffer- Overrides:
clonein classObject
-
hashCode
public int hashCode() -
equals
-
createOrRetrieveCopyInstance
public <G extends CandidateItemOffer> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException Description copied from interface:MultiTenantCloneableClone 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(); //copy extended field values on myClone here return createResponse; }Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity:public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponsecreateResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone(); //copy extended field values on myClone here return createResponse; } - Specified by:
createOrRetrieveCopyInstancein interfaceMultiTenantCloneable<CandidateItemOffer>- 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
-