@Entity public class FieldGroupImpl extends Object implements FieldGroup, ProfileEntity
| Modifier and Type | Field and Description |
|---|---|
protected List<FieldDefinition> |
fieldDefinitions |
protected List<StructuredContentFieldGroupXref> |
fieldGroupXrefs |
protected Long |
id |
protected Boolean |
initCollapsedFlag |
protected Boolean |
isMasterFieldGroup |
protected String |
name |
| Constructor and Description |
|---|
FieldGroupImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends FieldGroup> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
List<FieldDefinition> |
getFieldDefinitions() |
List<StructuredContentFieldGroupXref> |
getFieldGroupXrefs() |
Long |
getId() |
Boolean |
getInitCollapsedFlag() |
String |
getName() |
Boolean |
isMasterFieldGroup() |
void |
setFieldDefinitions(List<FieldDefinition> fieldDefinitions) |
void |
setFieldGroupXrefs(List<StructuredContentFieldGroupXref> fieldGroupXrefs) |
void |
setId(Long id) |
void |
setInitCollapsedFlag(Boolean initCollapsedFlag) |
void |
setIsMasterFieldGroup(Boolean isMasterFieldGroup) |
void |
setName(String name) |
protected Long id
protected String name
protected Boolean initCollapsedFlag
protected List<FieldDefinition> fieldDefinitions
protected Boolean isMasterFieldGroup
protected List<StructuredContentFieldGroupXref> fieldGroupXrefs
public List<StructuredContentFieldGroupXref> getFieldGroupXrefs()
getFieldGroupXrefs in interface FieldGrouppublic void setFieldGroupXrefs(List<StructuredContentFieldGroupXref> fieldGroupXrefs)
setFieldGroupXrefs in interface FieldGrouppublic Long getId()
getId in interface FieldGrouppublic void setId(Long id)
setId in interface FieldGrouppublic String getName()
getName in interface FieldGrouppublic void setName(String name)
setName in interface FieldGrouppublic Boolean getInitCollapsedFlag()
getInitCollapsedFlag in interface FieldGrouppublic void setInitCollapsedFlag(Boolean initCollapsedFlag)
setInitCollapsedFlag in interface FieldGrouppublic List<FieldDefinition> getFieldDefinitions()
getFieldDefinitions in interface FieldGrouppublic void setFieldDefinitions(List<FieldDefinition> fieldDefinitions)
setFieldDefinitions in interface FieldGrouppublic <G extends FieldGroup> 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<FieldGroup>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationpublic Boolean isMasterFieldGroup()
isMasterFieldGroup in interface FieldGrouppublic void setIsMasterFieldGroup(Boolean isMasterFieldGroup)
setIsMasterFieldGroup in interface FieldGroupCopyright © 2022. All rights reserved.