java.lang.Object
com.broadleafcommerce.catalog.provider.jpa.domain.asset.JpaProductAssetTag
All Implemented Interfaces:
Serializable

@Entity public class JpaProductAssetTag extends Object implements Serializable
JpaProductAsset.tags are meant to be query-able and individually modifiable, and thus it is necessary to maintain them in a separate table. Due to some key limitations in @ElementCollection with both functionality in CriteriaQuery and performance, we are defining a separate table.

We use a composite key of the tag value + the asset ID to ensure JPA recognizes which tags are the same and which tags are new based upon the tag value rather than some separate ID field.

Author:
Samarth Dhruva (samarthd)
See Also:
  • Constructor Details

    • JpaProductAssetTag

      public JpaProductAssetTag()
  • Method Details

    • getAsset

      public JpaProductAsset getAsset()
      The JpaProductAsset that this tag belongs to.
    • getTag

      public String getTag()
      The actual tag value.
      Returns:
      the actual tag value
      See Also:
      • EntityAsset.tags
      • JpaProductAsset.tags
    • setAsset

      public void setAsset(JpaProductAsset asset)
      The JpaProductAsset that this tag belongs to.
    • setTag

      public void setTag(String tag)
      The actual tag value.
      Parameters:
      tag - the actual tag value
      See Also:
      • EntityAsset.tags
      • JpaProductAsset.tags
    • toString

      public String toString()
      Overrides:
      toString in class 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