@Entity public class CategoryMediaXrefImpl extends Object implements CategoryMediaXref, Media, MultiTenantCloneable<CategoryMediaXrefImpl>
| Modifier and Type | Field and Description |
|---|---|
protected Category |
category |
protected Long |
id |
protected String |
key |
protected Media |
media |
| Constructor and Description |
|---|
CategoryMediaXrefImpl() |
CategoryMediaXrefImpl(Category category,
Media media,
String key) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createEntityInstance() |
<G extends CategoryMediaXrefImpl> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
String |
getAltText() |
Category |
getCategory() |
Long |
getId() |
String |
getKey() |
Media |
getMedia() |
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 |
setCategory(Category category) |
void |
setId(Long id) |
void |
setKey(String key) |
void |
setMedia(Media media) |
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 Category category
protected Media media
protected String key
public Long getId()
getId in interface MediagetId in interface CategoryMediaXrefpublic void setId(Long id)
setId in interface MediasetId in interface CategoryMediaXrefpublic Category getCategory()
getCategory in interface CategoryMediaXrefpublic void setCategory(Category category)
setCategory in interface CategoryMediaXrefpublic Media getMedia()
getMedia in interface CategoryMediaXrefpublic void setMedia(Media media)
setMedia in interface CategoryMediaXrefpublic String getKey()
getKey in interface CategoryMediaXrefpublic void setKey(String key)
setKey in interface CategoryMediaXrefpublic 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 CategoryMediaXrefImpl> 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<CategoryMediaXrefImpl>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.