Class StructuredContentFieldTemplateImpl
java.lang.Object
org.broadleafcommerce.cms.structure.domain.StructuredContentFieldTemplateImpl
- All Implemented Interfaces:
Serializable
,StructuredContentFieldTemplate
,MultiTenantCloneable<StructuredContentFieldTemplate>
@Entity
public class StructuredContentFieldTemplateImpl
extends Object
implements StructuredContentFieldTemplate
Created by bpolster.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<StructuredContentFieldGroupXref>
protected Long
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends StructuredContentFieldTemplate>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.Returns the list of the field groups for this template.getId()
Gets the primary key.getName()
Gets the name.void
setFieldGroups
(List<FieldGroup> fieldGroups) Sets the list of field groups for this template.void
setFieldGroupXrefs
(List<StructuredContentFieldGroupXref> fieldGroupXrefs) void
Sets the primary key.void
Sets the name.
-
Field Details
-
id
-
name
-
fieldGroupXrefs
-
-
Constructor Details
-
StructuredContentFieldTemplateImpl
public StructuredContentFieldTemplateImpl()
-
-
Method Details
-
getId
Description copied from interface:StructuredContentFieldTemplate
Gets the primary key.- Specified by:
getId
in interfaceStructuredContentFieldTemplate
- Returns:
- the primary key
-
setId
Description copied from interface:StructuredContentFieldTemplate
Sets the primary key.- Specified by:
setId
in interfaceStructuredContentFieldTemplate
- Parameters:
id
- the new primary key
-
getName
Description copied from interface:StructuredContentFieldTemplate
Gets the name.- Specified by:
getName
in interfaceStructuredContentFieldTemplate
- Returns:
- the name
-
setName
Description copied from interface:StructuredContentFieldTemplate
Sets the name.- Specified by:
setName
in interfaceStructuredContentFieldTemplate
-
getFieldGroups
Description copied from interface:StructuredContentFieldTemplate
Returns the list of the field groups for this template.- Specified by:
getFieldGroups
in interfaceStructuredContentFieldTemplate
- Returns:
- a list of FieldGroups associated with this template
-
setFieldGroups
Description copied from interface:StructuredContentFieldTemplate
Sets the list of field groups for this template.- Specified by:
setFieldGroups
in interfaceStructuredContentFieldTemplate
-
getFieldGroupXrefs
- Specified by:
getFieldGroupXrefs
in interfaceStructuredContentFieldTemplate
-
setFieldGroupXrefs
- Specified by:
setFieldGroupXrefs
in interfaceStructuredContentFieldTemplate
-
createOrRetrieveCopyInstance
public <G extends StructuredContentFieldTemplate> 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<StructuredContentFieldTemplate>
- 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
-