Class PageAttributeImpl

java.lang.Object
org.broadleafcommerce.cms.page.domain.PageAttributeImpl
All Implemented Interfaces:
Serializable, PageAttribute, MultiTenantCloneable<PageAttribute>, ProfileEntity, ValueAssignable<String>

@Entity public class PageAttributeImpl extends Object implements PageAttribute, ProfileEntity
See Also:
  • Field Details

    • id

      protected Long id
    • name

      protected String name
    • value

      protected String value
    • page

      protected Page page
  • Constructor Details

    • PageAttributeImpl

      public PageAttributeImpl()
  • Method Details

    • getId

      public Long getId()
      Description copied from interface: PageAttribute
      Returns the id
      Specified by:
      getId in interface PageAttribute
      Returns:
      the id
    • setId

      public void setId(Long id)
      Description copied from interface: PageAttribute
      Sets the id
      Specified by:
      setId in interface PageAttribute
    • getValue

      public String getValue()
      Description copied from interface: ValueAssignable
      The value
      Specified by:
      getValue in interface ValueAssignable<String>
      Returns:
      The value
    • setValue

      public void setValue(String value)
      Description copied from interface: ValueAssignable
      The value
      Specified by:
      setValue in interface ValueAssignable<String>
      Parameters:
      value - The value
    • getName

      public String getName()
      Description copied from interface: ValueAssignable
      The name
      Specified by:
      getName in interface ValueAssignable<String>
      Returns:
      The name
    • setName

      public void setName(String name)
      Description copied from interface: ValueAssignable
      The name
      Specified by:
      setName in interface ValueAssignable<String>
      Parameters:
      name - The name
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getPage

      public Page getPage()
      Description copied from interface: PageAttribute
      Returns the Page
      Specified by:
      getPage in interface PageAttribute
      Returns:
      the Page
    • setPage

      public void setPage(Page page)
      Description copied from interface: PageAttribute
      Sets the Page
      Specified by:
      setPage in interface PageAttribute
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • createOrRetrieveCopyInstance

      public <G extends PageAttribute> 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<PageAttribute>
      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