@Entity public class StructuredContentFieldXrefImpl extends Object implements StructuredContentFieldXref, Serializable, ProfileEntity
| Modifier and Type | Field and Description |
|---|---|
protected Long |
id |
protected String |
key |
protected StructuredContent |
structuredContent |
protected StructuredContentField |
structuredContentField |
| Constructor and Description |
|---|
StructuredContentFieldXrefImpl() |
StructuredContentFieldXrefImpl(StructuredContent sc,
StructuredContentField scField,
String key) |
| Modifier and Type | Method and Description |
|---|---|
<G extends StructuredContentFieldXref> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
Long |
getId() |
String |
getKey() |
StructuredContent |
getStructuredContent() |
StructuredContentField |
getStructuredContentField() |
void |
setId(Long id) |
void |
setKey(String key) |
void |
setStructuredContent(StructuredContent sc) |
void |
setStrucuturedContentField(StructuredContentField scField) |
protected Long id
protected StructuredContent structuredContent
protected StructuredContentField structuredContentField
protected String key
public StructuredContentFieldXrefImpl()
public StructuredContentFieldXrefImpl(StructuredContent sc, StructuredContentField scField, String key)
public void setId(Long id)
setId in interface StructuredContentFieldXrefpublic Long getId()
getId in interface StructuredContentFieldXrefpublic void setStructuredContent(StructuredContent sc)
setStructuredContent in interface StructuredContentFieldXrefpublic StructuredContent getStructuredContent()
getStructuredContent in interface StructuredContentFieldXrefpublic void setStrucuturedContentField(StructuredContentField scField)
setStrucuturedContentField in interface StructuredContentFieldXrefpublic StructuredContentField getStructuredContentField()
getStructuredContentField in interface StructuredContentFieldXrefpublic void setKey(String key)
setKey in interface StructuredContentFieldXrefpublic String getKey()
getKey in interface StructuredContentFieldXrefpublic <G extends StructuredContentFieldXref> 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<StructuredContentFieldXref>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationCopyright © 2017. All rights reserved.