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 Longprotected 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.voidsetFieldGroups(List<FieldGroup> fieldGroups) Sets the list of field groups for this template.voidsetFieldGroupXrefs(List<StructuredContentFieldGroupXref> fieldGroupXrefs) voidSets the primary key.voidSets the name.
-
Field Details
-
id
-
name
-
fieldGroupXrefs
-
-
Constructor Details
-
StructuredContentFieldTemplateImpl
public StructuredContentFieldTemplateImpl()
-
-
Method Details
-
getId
Description copied from interface:StructuredContentFieldTemplateGets the primary key.- Specified by:
getIdin interfaceStructuredContentFieldTemplate- Returns:
- the primary key
-
setId
Description copied from interface:StructuredContentFieldTemplateSets the primary key.- Specified by:
setIdin interfaceStructuredContentFieldTemplate- Parameters:
id- the new primary key
-
getName
Description copied from interface:StructuredContentFieldTemplateGets the name.- Specified by:
getNamein interfaceStructuredContentFieldTemplate- Returns:
- the name
-
setName
Description copied from interface:StructuredContentFieldTemplateSets the name.- Specified by:
setNamein interfaceStructuredContentFieldTemplate
-
getFieldGroups
Description copied from interface:StructuredContentFieldTemplateReturns the list of the field groups for this template.- Specified by:
getFieldGroupsin interfaceStructuredContentFieldTemplate- Returns:
- a list of FieldGroups associated with this template
-
setFieldGroups
Description copied from interface:StructuredContentFieldTemplateSets the list of field groups for this template.- Specified by:
setFieldGroupsin interfaceStructuredContentFieldTemplate
-
getFieldGroupXrefs
- Specified by:
getFieldGroupXrefsin interfaceStructuredContentFieldTemplate
-
setFieldGroupXrefs
- Specified by:
setFieldGroupXrefsin interfaceStructuredContentFieldTemplate
-
createOrRetrieveCopyInstance
public <G extends StructuredContentFieldTemplate> 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<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
-