Class RequiredFacetImpl

java.lang.Object
org.broadleafcommerce.core.search.domain.RequiredFacetImpl
All Implemented Interfaces:
Serializable, MultiTenantCloneable<RequiredFacet>, RequiredFacet

@Entity public class RequiredFacetImpl extends Object implements RequiredFacet
Author:
Jeff Fischer
See Also:
  • Field Details

  • Constructor Details

    • RequiredFacetImpl

      public RequiredFacetImpl()
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface RequiredFacet
    • setId

      public void setId(Long id)
      Specified by:
      setId in interface RequiredFacet
    • getRequiredFacet

      public SearchFacet getRequiredFacet()
      Specified by:
      getRequiredFacet in interface RequiredFacet
    • setRequiredFacet

      public void setRequiredFacet(SearchFacet requiredFacet)
      Specified by:
      setRequiredFacet in interface RequiredFacet
    • getSearchFacet

      public SearchFacet getSearchFacet()
      Specified by:
      getSearchFacet in interface RequiredFacet
    • setSearchFacet

      public void setSearchFacet(SearchFacet searchFacet)
      Specified by:
      setSearchFacet in interface RequiredFacet
    • createOrRetrieveCopyInstance

      public <G extends RequiredFacet> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException
      Description copied from interface: MultiTenantCloneable
      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(); //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 { CreateResponse createResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone(); //copy extended field values on myClone here return createResponse; }
      Specified by:
      createOrRetrieveCopyInstance in interface MultiTenantCloneable<RequiredFacet>
      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