@Entity public class SkuMediaXrefImpl extends Object implements SkuMediaXref, Media, MultiTenantCloneable<SkuMediaXrefImpl>
| Modifier and Type | Field and Description |
|---|---|
protected Long |
id |
protected String |
key |
protected Media |
media |
protected Sku |
sku |
| Constructor and Description |
|---|
SkuMediaXrefImpl() |
SkuMediaXrefImpl(Sku sku,
Media media,
String key) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createEntityInstance() |
<G extends SkuMediaXrefImpl> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
String |
getAltText() |
Long |
getId() |
String |
getKey() |
Media |
getMedia() |
Sku |
getSku() |
String |
getTags() |
String |
getTitle() |
String |
getUrl() |
boolean |
isUnwrappableAs(Class unwrapType)
Can this wrapped item be unwrapped as the indicated type?
|
void |
setAltText(String altText) |
void |
setId(Long id) |
void |
setKey(String key) |
void |
setMedia(Media media) |
void |
setSku(Sku sku) |
void |
setTags(String tags) |
void |
setTitle(String title) |
void |
setUrl(String url) |
<T> T |
unwrap(Class<T> unwrapType)
Get the wrapped delegate item
|
protected Long id
protected Sku sku
protected Media media
protected String key
public Long getId()
getId in interface MediagetId in interface SkuMediaXrefpublic void setId(Long id)
setId in interface MediasetId in interface SkuMediaXrefpublic Sku getSku()
getSku in interface SkuMediaXrefpublic void setSku(Sku sku)
setSku in interface SkuMediaXrefpublic Media getMedia()
getMedia in interface SkuMediaXrefpublic void setMedia(Media media)
setMedia in interface SkuMediaXrefpublic String getKey()
getKey in interface SkuMediaXrefpublic void setKey(String key)
setKey in interface SkuMediaXrefpublic String getAltText()
getAltText in interface Mediapublic void setAltText(String altText)
setAltText in interface Mediaprotected void createEntityInstance()
public boolean isUnwrappableAs(Class unwrapType)
WrappableisUnwrappableAs in interface WrappableunwrapType - The type to check.public <T> T unwrap(Class<T> unwrapType)
Wrappablepublic <G extends SkuMediaXrefImpl> 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<SkuMediaXrefImpl>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationCopyright © 2015. All rights reserved.