Class StructuredContentFieldXrefImpl
java.lang.Object
org.broadleafcommerce.cms.structure.domain.StructuredContentFieldXrefImpl
- All Implemented Interfaces:
Serializable
,StructuredContentFieldXref
,MultiTenantCloneable<StructuredContentFieldXref>
,ProfileEntity
@Entity
public class StructuredContentFieldXrefImpl
extends Object
implements StructuredContentFieldXref, Serializable, ProfileEntity
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Long
protected String
protected StructuredContent
protected StructuredContentField
-
Constructor Summary
ConstructorsConstructorDescriptionStructuredContentFieldXrefImpl
(StructuredContent sc, StructuredContentField scField, String key) -
Method Summary
Modifier and TypeMethodDescription<G extends StructuredContentFieldXref>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.getId()
getKey()
void
void
void
void
-
Field Details
-
id
-
structuredContent
-
structuredContentField
-
key
-
-
Constructor Details
-
StructuredContentFieldXrefImpl
public StructuredContentFieldXrefImpl() -
StructuredContentFieldXrefImpl
public StructuredContentFieldXrefImpl(StructuredContent sc, StructuredContentField scField, String key)
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceStructuredContentFieldXref
-
setId
- Specified by:
setId
in interfaceStructuredContentFieldXref
-
getStructuredContent
- Specified by:
getStructuredContent
in interfaceStructuredContentFieldXref
-
setStructuredContent
- Specified by:
setStructuredContent
in interfaceStructuredContentFieldXref
-
setStrucuturedContentField
- Specified by:
setStrucuturedContentField
in interfaceStructuredContentFieldXref
-
getStructuredContentField
- Specified by:
getStructuredContentField
in interfaceStructuredContentFieldXref
-
getKey
- Specified by:
getKey
in interfaceStructuredContentFieldXref
-
setKey
- Specified by:
setKey
in interfaceStructuredContentFieldXref
-
createOrRetrieveCopyInstance
public <G extends StructuredContentFieldXref> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException Description copied from interface:MultiTenantCloneable
Clone this entity for the purpose of multiple tenancy. Note, extending classes should follow this pattern:public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context); if (createResponse.isAlreadyPopulated()) { return createResponse; } MyClass myClone = createResponse.getClone();
Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity://copy extended field values on myClone here
return createResponse; }
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; }
- Specified by:
createOrRetrieveCopyInstance
in interfaceMultiTenantCloneable<StructuredContentFieldXref>
- Parameters:
context
- a context object providing persistence and library functionality for copying entities- Returns:
- the resulting copy container, possibly already persisted
- Throws:
CloneNotSupportedException
- if there's a problem detected with the cloning configuration
-