Class SystemPropertyImpl
java.lang.Object
org.broadleafcommerce.common.config.domain.SystemPropertyImpl
- All Implemented Interfaces:
Serializable
,AdminMainEntity
,SystemProperty
,SystemPropertyAdminPresentation
,MultiTenantCloneable<SystemProperty>
@Entity
public class SystemPropertyImpl
extends Object
implements SystemProperty, AdminMainEntity, SystemPropertyAdminPresentation
Allows the storage and retrieval of System Properties in the database
User: Kelly Tisdell Date: 6/20/12
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.broadleafcommerce.common.config.domain.SystemPropertyAdminPresentation
SystemPropertyAdminPresentation.FieldOrder, SystemPropertyAdminPresentation.GroupName, SystemPropertyAdminPresentation.GroupOrder, SystemPropertyAdminPresentation.TabName, SystemPropertyAdminPresentation.TabOrder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected String
protected Long
protected String
protected Boolean
protected String
protected String
Fields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY
-
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
setPropertyType
(SystemPropertyFieldType propertyType) Sets the property field type.void
Sets the property value.
-
Field Details
-
id
-
name
-
overrideGeneratedPropertyName
-
value
-
propertyType
-
friendlyName
-
friendlyGroup
-
friendlyTab
-
-
Constructor Details
-
SystemPropertyImpl
public SystemPropertyImpl()
-
-
Method Details
-
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
-
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
-
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
-
getMainEntityName
- Specified by:
getMainEntityName
in interfaceAdminMainEntity
- Returns:
- the display name of this entity for the admin screen
-
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
-
equals
-
hashCode
public int hashCode()
-