@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 StructuredContentFieldXref
public Long getId()
getId
in interface StructuredContentFieldXref
public void setStructuredContent(StructuredContent sc)
setStructuredContent
in interface StructuredContentFieldXref
public StructuredContent getStructuredContent()
getStructuredContent
in interface StructuredContentFieldXref
public void setStrucuturedContentField(StructuredContentField scField)
setStrucuturedContentField
in interface StructuredContentFieldXref
public StructuredContentField getStructuredContentField()
getStructuredContentField
in interface StructuredContentFieldXref
public void setKey(String key)
setKey
in interface StructuredContentFieldXref
public String getKey()
getKey
in interface StructuredContentFieldXref
public <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 © 2022. All rights reserved.