@Entity public class PageTemplateImpl extends Object implements PageTemplate, AdminMainEntity, ProfileEntity
Modifier and Type | Field and Description |
---|---|
protected List<PageTemplateFieldGroupXref> |
fieldGroups |
protected Long |
id |
protected List<FieldGroup> |
legacyFieldGroups |
protected Locale |
locale
Deprecated.
|
protected String |
templateDescription |
protected String |
templateName |
protected String |
templatePath |
MAIN_ENTITY_NAME_PROPERTY
Constructor and Description |
---|
PageTemplateImpl() |
Modifier and Type | Method and Description |
---|---|
<G extends PageTemplate> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
List<FieldGroup> |
getFieldGroups()
Deprecated.
|
List<PageTemplateFieldGroupXref> |
getFieldGroupXrefs() |
Long |
getId() |
Locale |
getLocale() |
String |
getMainEntityName() |
String |
getTemplateDescription() |
String |
getTemplateName() |
String |
getTemplatePath() |
void |
setFieldGroups(List<FieldGroup> fieldGroups)
Deprecated.
|
void |
setFieldGroupXrefs(List<PageTemplateFieldGroupXref> fieldGroups) |
void |
setId(Long id) |
void |
setLocale(Locale locale) |
void |
setTemplateDescription(String templateDescription) |
void |
setTemplateName(String templateName) |
void |
setTemplatePath(String templatePath) |
protected Long id
protected String templateName
protected String templateDescription
protected String templatePath
@Deprecated protected Locale locale
protected List<PageTemplateFieldGroupXref> fieldGroups
protected List<FieldGroup> legacyFieldGroups
public Long getId()
getId
in interface PageTemplate
public void setId(Long id)
setId
in interface PageTemplate
public String getTemplateName()
getTemplateName
in interface PageTemplate
public void setTemplateName(String templateName)
setTemplateName
in interface PageTemplate
public String getTemplateDescription()
getTemplateDescription
in interface PageTemplate
public void setTemplateDescription(String templateDescription)
setTemplateDescription
in interface PageTemplate
public String getTemplatePath()
getTemplatePath
in interface PageTemplate
public void setTemplatePath(String templatePath)
setTemplatePath
in interface PageTemplate
public Locale getLocale()
getLocale
in interface PageTemplate
public void setLocale(Locale locale)
setLocale
in interface PageTemplate
@Deprecated public List<FieldGroup> getFieldGroups()
getFieldGroups
in interface PageTemplate
@Deprecated public void setFieldGroups(List<FieldGroup> fieldGroups)
setFieldGroups
in interface PageTemplate
public List<PageTemplateFieldGroupXref> getFieldGroupXrefs()
getFieldGroupXrefs
in interface PageTemplate
public void setFieldGroupXrefs(List<PageTemplateFieldGroupXref> fieldGroups)
setFieldGroupXrefs
in interface PageTemplate
public String getMainEntityName()
getMainEntityName
in interface AdminMainEntity
public <G extends PageTemplate> 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<PageTemplate>
context
- a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException
- if there's a problem detected with the cloning configurationCopyright © 2022. All rights reserved.