@Entity public class StructuredContentFieldGroupXrefImpl extends Object implements StructuredContentFieldGroupXref
| Modifier and Type | Field and Description |
|---|---|
protected FieldGroup |
fieldGroup |
protected Integer |
groupOrder |
protected Long |
id |
protected StructuredContentFieldTemplate |
template |
| Constructor and Description |
|---|
StructuredContentFieldGroupXrefImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends StructuredContentFieldGroupXref> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
FieldGroup |
getFieldGroup() |
Integer |
getGroupOrder()
The order that this field group should have within this template
|
StructuredContentFieldTemplate |
getTemplate() |
void |
setFieldGroup(FieldGroup fieldGroup) |
void |
setGroupOrder(Integer groupOrder) |
void |
setTemplate(StructuredContentFieldTemplate template) |
protected Long id
protected Integer groupOrder
protected StructuredContentFieldTemplate template
protected FieldGroup fieldGroup
public Integer getGroupOrder()
StructuredContentFieldGroupXrefgetGroupOrder in interface StructuredContentFieldGroupXrefpublic void setGroupOrder(Integer groupOrder)
setGroupOrder in interface StructuredContentFieldGroupXrefpublic StructuredContentFieldTemplate getTemplate()
getTemplate in interface StructuredContentFieldGroupXrefpublic void setTemplate(StructuredContentFieldTemplate template)
setTemplate in interface StructuredContentFieldGroupXrefpublic FieldGroup getFieldGroup()
getFieldGroup in interface StructuredContentFieldGroupXrefpublic void setFieldGroup(FieldGroup fieldGroup)
setFieldGroup in interface StructuredContentFieldGroupXrefpublic <G extends StructuredContentFieldGroupXref> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException
MultiTenantCloneable
public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {
CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context);
if (createResponse.isAlreadyPopulated()) {
return createResponse;
}
MyClass myClone = createResponse.getClone();
//copy extended field values on myClone here
return createResponse;
}
Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity:
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;
}
createOrRetrieveCopyInstance in interface MultiTenantCloneable<StructuredContentFieldGroupXref>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationCopyright © 2019. All rights reserved.