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 Stringprotected Stringprotected Stringprotected Longprotected Stringprotected Booleanprotected Stringprotected StringFields 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.booleangetId()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.inthashCode()voidsetFriendlyGroup(String friendlyGroup) Sets the friendly group name of this propertyvoidsetFriendlyName(String friendlyName) Sets the friendly name of this propertyvoidsetFriendlyTab(String friendlyTab) Sets the friendly tab of this propertyvoidSets the id of the DB recordvoidSets the property name.voidsetOverrideGeneratedPropertyName(Boolean overrideGeneratedPropertyName) Sets the overrideGeneratedPropertyName.voidsetPropertyType(SystemPropertyFieldType propertyType) Sets the property field type.voidSets 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:SystemPropertyUnique id of the DB record- Specified by:
getIdin interfaceSystemProperty- Returns:
-
setId
Description copied from interface:SystemPropertySets the id of the DB record- Specified by:
setIdin interfaceSystemProperty
-
getName
Description copied from interface:SystemPropertyThe name of the property as it exists in property files (for example googleAnalytics.webPropertyId)- Specified by:
getNamein interfaceSystemProperty- Returns:
-
setName
Description copied from interface:SystemPropertySets the property name.- Specified by:
setNamein interfaceSystemProperty
-
getOverrideGeneratedPropertyName
Description copied from interface:SystemPropertyDeclares whether or not the property name has been overridden, rather than using the default generated value.- Specified by:
getOverrideGeneratedPropertyNamein interfaceSystemProperty- Returns:
-
setOverrideGeneratedPropertyName
Description copied from interface:SystemPropertySets the overrideGeneratedPropertyName.- Specified by:
setOverrideGeneratedPropertyNamein interfaceSystemProperty
-
getValue
Description copied from interface:SystemPropertyReturns the property value.- Specified by:
getValuein interfaceSystemProperty
-
setValue
Description copied from interface:SystemPropertySets the property value.- Specified by:
setValuein interfaceSystemProperty
-
getFriendlyName
- Specified by:
getFriendlyNamein interfaceSystemProperty- Returns:
- the friendly name of this property
-
setFriendlyName
Description copied from interface:SystemPropertySets the friendly name of this property- Specified by:
setFriendlyNamein interfaceSystemProperty
-
getFriendlyGroup
- Specified by:
getFriendlyGroupin interfaceSystemProperty- Returns:
- the griendly group name of this property
-
setFriendlyGroup
Description copied from interface:SystemPropertySets the friendly group name of this property- Specified by:
setFriendlyGroupin interfaceSystemProperty
-
getFriendlyTab
- Specified by:
getFriendlyTabin interfaceSystemProperty- Returns:
- the friendly tab of this property
-
setFriendlyTab
Description copied from interface:SystemPropertySets the friendly tab of this property- Specified by:
setFriendlyTabin interfaceSystemProperty
-
getPropertyType
Description copied from interface:SystemPropertyReturns the property field type. If not set, returns STRING- Specified by:
getPropertyTypein interfaceSystemProperty- Returns:
-
setPropertyType
Description copied from interface:SystemPropertySets the property field type.- Specified by:
setPropertyTypein interfaceSystemProperty
-
getMainEntityName
- Specified by:
getMainEntityNamein 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:MultiTenantCloneableClone 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 { CreateResponsecreateResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone(); //copy extended field values on myClone here
return createResponse; }
- Specified by:
createOrRetrieveCopyInstancein 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()
-