Class ProductTerm
java.lang.Object
com.broadleafcommerce.catalog.domain.product.ProductTerm
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
,com.broadleafcommerce.translation.mapping.SubIdentifiable
,Serializable
public class ProductTerm
extends Object
implements Serializable, com.broadleafcommerce.translation.mapping.SubIdentifiable, com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
Represents a configurable contract term for a
Product
. Terms are useful for configuring
different prices depending on the length of the term. The default term is used for the initial
display price.- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
- See Also:
-
Field Summary
Fields inherited from interface com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
DEFAULT_FIELD_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
com.broadleafcommerce.data.tracking.core.EmbeddedContextState
A subset ofTracking
information to expose the context state for this object.int
Time interval (number of seconds, minutes, hours, etc.)The type of time interval (seconds, minutes, hours, etc.)getId()
Identifier used for tracking purposes, primarily related to keeping track of which translations belong to which value in the list.getName()
A display name for the termint
hashCode()
boolean
Whether this term is the default term for the productvoid
setContextState
(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState) A subset ofTracking
information to expose the context state for this object.void
setDefault
(boolean isDefault) Whether this term is the default term for the productvoid
setDurationLength
(int durationLength) Time interval (number of seconds, minutes, hours, etc.)void
setDurationType
(String durationType) The type of time interval (seconds, minutes, hours, etc.)void
Identifier used for tracking purposes, primarily related to keeping track of which translations belong to which value in the list.void
A display name for the termtoString()
-
Constructor Details
-
ProductTerm
public ProductTerm()
-
-
Method Details
-
getId
Identifier used for tracking purposes, primarily related to keeping track of which translations belong to which value in the list.- Specified by:
getId
in interfacecom.broadleafcommerce.translation.mapping.SubIdentifiable
-
getName
A display name for the term -
getDurationLength
public int getDurationLength()Time interval (number of seconds, minutes, hours, etc.) -
getDurationType
The type of time interval (seconds, minutes, hours, etc.) -
isDefault
public boolean isDefault()Whether this term is the default term for the product -
getContextState
public com.broadleafcommerce.data.tracking.core.EmbeddedContextState getContextState()A subset ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
- Returns:
- a subset of
Tracking
information to expose the context state for this object
-
setId
Identifier used for tracking purposes, primarily related to keeping track of which translations belong to which value in the list.- Specified by:
setId
in interfacecom.broadleafcommerce.translation.mapping.SubIdentifiable
-
setName
A display name for the term -
setDurationLength
public void setDurationLength(int durationLength) Time interval (number of seconds, minutes, hours, etc.) -
setDurationType
The type of time interval (seconds, minutes, hours, etc.) -
setDefault
public void setDefault(boolean isDefault) Whether this term is the default term for the product -
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState) A subset ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-