Class NullSystemProperty

java.lang.Object
org.broadleafcommerce.common.config.domain.NullSystemProperty
All Implemented Interfaces:
Serializable, SystemProperty, MultiTenantCloneable<SystemProperty>

public class NullSystemProperty extends Object implements SystemProperty
Class created for caching misses as some cache implementations, such as Redis, are unable to serialize a proxy (see AbstractCacheMissAware and SystemPropertiesDaoImpl)
Author:
Jay Aisenbrey (cja769)
See Also:
  • Constructor Details

    • NullSystemProperty

      public NullSystemProperty()
  • Method Details

    • createOrRetrieveCopyInstance

      public <G extends SystemProperty> 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<SystemProperty>
      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
    • getId

      public Long getId()
      Description copied from interface: SystemProperty
      Unique id of the DB record
      Specified by:
      getId in interface SystemProperty
      Returns:
    • setId

      public void setId(Long id)
      Description copied from interface: SystemProperty
      Sets the id of the DB record
      Specified by:
      setId in interface SystemProperty
    • getName

      public String getName()
      Description copied from interface: SystemProperty
      The name of the property as it exists in property files (for example googleAnalytics.webPropertyId)
      Specified by:
      getName in interface SystemProperty
      Returns:
    • setName

      public void setName(String name)
      Description copied from interface: SystemProperty
      Sets the property name.
      Specified by:
      setName in interface SystemProperty
    • getOverrideGeneratedPropertyName

      public Boolean getOverrideGeneratedPropertyName()
      Description copied from interface: SystemProperty
      Declares whether or not the property name has been overridden, rather than using the default generated value.
      Specified by:
      getOverrideGeneratedPropertyName in interface SystemProperty
      Returns:
    • setOverrideGeneratedPropertyName

      public void setOverrideGeneratedPropertyName(Boolean overrideGeneratedPropertyName)
      Description copied from interface: SystemProperty
      Sets the overrideGeneratedPropertyName.
      Specified by:
      setOverrideGeneratedPropertyName in interface SystemProperty
    • getValue

      public String getValue()
      Description copied from interface: SystemProperty
      Returns the property value.
      Specified by:
      getValue in interface SystemProperty
    • setValue

      public void setValue(String value)
      Description copied from interface: SystemProperty
      Sets the property value.
      Specified by:
      setValue in interface SystemProperty
    • getPropertyType

      public SystemPropertyFieldType getPropertyType()
      Description copied from interface: SystemProperty
      Returns the property field type. If not set, returns STRING
      Specified by:
      getPropertyType in interface SystemProperty
      Returns:
    • setPropertyType

      public void setPropertyType(SystemPropertyFieldType type)
      Description copied from interface: SystemProperty
      Sets the property field type.
      Specified by:
      setPropertyType in interface SystemProperty
    • getFriendlyName

      public String getFriendlyName()
      Specified by:
      getFriendlyName in interface SystemProperty
      Returns:
      the friendly name of this property
    • setFriendlyName

      public void setFriendlyName(String friendlyName)
      Description copied from interface: SystemProperty
      Sets the friendly name of this property
      Specified by:
      setFriendlyName in interface SystemProperty
    • getFriendlyGroup

      public String getFriendlyGroup()
      Specified by:
      getFriendlyGroup in interface SystemProperty
      Returns:
      the griendly group name of this property
    • setFriendlyGroup

      public void setFriendlyGroup(String friendlyGroup)
      Description copied from interface: SystemProperty
      Sets the friendly group name of this property
      Specified by:
      setFriendlyGroup in interface SystemProperty
    • getFriendlyTab

      public String getFriendlyTab()
      Specified by:
      getFriendlyTab in interface SystemProperty
      Returns:
      the friendly tab of this property
    • setFriendlyTab

      public void setFriendlyTab(String friendlyTab)
      Description copied from interface: SystemProperty
      Sets the friendly tab of this property
      Specified by:
      setFriendlyTab in interface SystemProperty
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object