@Entity public class StaticAssetDescriptionImpl extends Object implements StaticAssetDescription
| Modifier and Type | Field and Description |
|---|---|
protected AdminAuditable |
auditable |
protected String |
description |
protected Long |
id |
protected String |
longDescription |
| Constructor and Description |
|---|
StaticAssetDescriptionImpl() |
| Modifier and Type | Method and Description |
|---|---|
StaticAssetDescription |
cloneEntity() |
<G extends StaticAssetDescription> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
AdminAuditable |
getAuditable() |
String |
getDescription() |
Long |
getId() |
String |
getLongDescription() |
void |
setAuditable(AdminAuditable auditable) |
void |
setDescription(String description) |
void |
setId(Long id) |
void |
setLongDescription(String longDescription) |
protected Long id
protected AdminAuditable auditable
protected String description
protected String longDescription
public Long getId()
getId in interface StaticAssetDescriptionpublic void setId(Long id)
setId in interface StaticAssetDescriptionpublic String getDescription()
getDescription in interface StaticAssetDescriptionpublic void setDescription(String description)
setDescription in interface StaticAssetDescriptionpublic String getLongDescription()
getLongDescription in interface StaticAssetDescriptionpublic void setLongDescription(String longDescription)
setLongDescription in interface StaticAssetDescriptionpublic StaticAssetDescription cloneEntity()
cloneEntity in interface StaticAssetDescriptionpublic AdminAuditable getAuditable()
getAuditable in interface StaticAssetDescriptionpublic void setAuditable(AdminAuditable auditable)
setAuditable in interface StaticAssetDescriptionpublic <G extends StaticAssetDescription> 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<StaticAssetDescription>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.