Class NullSystemProperty
java.lang.Object
org.broadleafcommerce.common.config.domain.NullSystemProperty
- All Implemented Interfaces:
Serializable
,SystemProperty
,MultiTenantCloneable<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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends SystemProperty>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.boolean
getId()
Unique id of the DB recordgetName()
The name of the property as it exists in property files (for example googleAnalytics.webPropertyId)Declares whether or not the property name has been overridden, rather than using the default generated value.Returns the property field type.getValue()
Returns the property value.int
hashCode()
void
setFriendlyGroup
(String friendlyGroup) Sets the friendly group name of this propertyvoid
setFriendlyName
(String friendlyName) Sets the friendly name of this propertyvoid
setFriendlyTab
(String friendlyTab) Sets the friendly tab of this propertyvoid
Sets the id of the DB recordvoid
Sets the property name.void
setOverrideGeneratedPropertyName
(Boolean overrideGeneratedPropertyName) Sets the overrideGeneratedPropertyName.void
Sets the property field type.void
Sets the property value.
-
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();
Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity://copy extended field values on myClone here
return createResponse; }
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 interfaceMultiTenantCloneable<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
Description copied from interface:SystemProperty
Unique id of the DB record- Specified by:
getId
in interfaceSystemProperty
- Returns:
-
setId
Description copied from interface:SystemProperty
Sets the id of the DB record- Specified by:
setId
in interfaceSystemProperty
-
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 interfaceSystemProperty
- Returns:
-
setName
Description copied from interface:SystemProperty
Sets the property name.- Specified by:
setName
in interfaceSystemProperty
-
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 interfaceSystemProperty
- Returns:
-
setOverrideGeneratedPropertyName
Description copied from interface:SystemProperty
Sets the overrideGeneratedPropertyName.- Specified by:
setOverrideGeneratedPropertyName
in interfaceSystemProperty
-
getValue
Description copied from interface:SystemProperty
Returns the property value.- Specified by:
getValue
in interfaceSystemProperty
-
setValue
Description copied from interface:SystemProperty
Sets the property value.- Specified by:
setValue
in interfaceSystemProperty
-
getPropertyType
Description copied from interface:SystemProperty
Returns the property field type. If not set, returns STRING- Specified by:
getPropertyType
in interfaceSystemProperty
- Returns:
-
setPropertyType
Description copied from interface:SystemProperty
Sets the property field type.- Specified by:
setPropertyType
in interfaceSystemProperty
-
getFriendlyName
- Specified by:
getFriendlyName
in interfaceSystemProperty
- Returns:
- the friendly name of this property
-
setFriendlyName
Description copied from interface:SystemProperty
Sets the friendly name of this property- Specified by:
setFriendlyName
in interfaceSystemProperty
-
getFriendlyGroup
- Specified by:
getFriendlyGroup
in interfaceSystemProperty
- Returns:
- the griendly group name of this property
-
setFriendlyGroup
Description copied from interface:SystemProperty
Sets the friendly group name of this property- Specified by:
setFriendlyGroup
in interfaceSystemProperty
-
getFriendlyTab
- Specified by:
getFriendlyTab
in interfaceSystemProperty
- Returns:
- the friendly tab of this property
-
setFriendlyTab
Description copied from interface:SystemProperty
Sets the friendly tab of this property- Specified by:
setFriendlyTab
in interfaceSystemProperty
-
equals
-
hashCode
public int hashCode()
-