Class FieldData

java.lang.Object
com.broadleafcommerce.content.domain.FieldData
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable

public class FieldData extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents the field data for fields on a ContentItem as defined by a ContentModel's ContentFields.
See Also:
  • Constructor Details

    • FieldData

      public FieldData()
  • Method Details

    • getId

      public String getId()
      The field's unique identifier
      Returns:
      the field's unique identifier
    • getContentItem

      public ContentItem getContentItem()
      The content item this field belongs to
      Returns:
      the content item this field belongs to
    • getName

      public String getName()
      The content field's name
      Returns:
      the content field's name
    • getValue

      public Object getValue()
      The field's value
      Returns:
      the field's value
    • getDisplayOrder

      public Integer getDisplayOrder()
      The field's display order, defined by the ContentModel
      Returns:
      the field's display order
    • isEnableRecommendations

      public boolean isEnableRecommendations()
      Whether this field should use recommendations for its product references. Only Product Reference type field can be configured with recommendations.
      Returns:
      if the field should use recommendations for its product references
      Since:
      Content Service 2.0.6, Release Train 2.2.0
    • getRecommendationModelType

      public String getRecommendationModelType()
      The type of Recommendation Model that should be queried when retrieving recommendations e.g. BOUGHT_ALSO_BOUGHT
      Since:
      Content Service 2.0.6, Release Train 2.2.0
    • getNumberOfRecommendations

      public Integer getNumberOfRecommendations()
      The number of recommendations requested from the recommendations engine
      Since:
      Content Service 2.0.6, Release Train 2.2.0
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      The field's unique identifier
      Parameters:
      id - the field's unique identifier
    • setContentItem

      public void setContentItem(ContentItem contentItem)
      The content item this field belongs to
      Parameters:
      contentItem - this field belongs to
    • setName

      public void setName(String name)
      The content field's name
      Parameters:
      name - the content field's name
    • setValue

      public void setValue(Object value)
      The field's value
      Parameters:
      value - the field's value
    • setDisplayOrder

      public void setDisplayOrder(Integer displayOrder)
      The field's display order, defined by the ContentModel
      Parameters:
      value - the field's display order
    • setEnableRecommendations

      public void setEnableRecommendations(boolean enableRecommendations)
      Whether this field should use recommendations for its product references. Only Product Reference type field can be configured with recommendations.
      Parameters:
      enableRecommendations - if the field should use recommendations for its product references
      Since:
      Content Service 2.0.6, Release Train 2.2.0
    • setRecommendationModelType

      public void setRecommendationModelType(String recommendationModelType)
      The type of Recommendation Model that should be queried when retrieving recommendations e.g. BOUGHT_ALSO_BOUGHT
      Since:
      Content Service 2.0.6, Release Train 2.2.0
    • setNumberOfRecommendations

      public void setNumberOfRecommendations(Integer numberOfRecommendations)
      The number of recommendations requested from the recommendations engine
      Since:
      Content Service 2.0.6, Release Train 2.2.0
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object