Class MediaImpl
java.lang.Object
org.broadleafcommerce.common.media.domain.MediaImpl
- All Implemented Interfaces:
Serializable
,MultiTenantCloneable<MediaImpl>
,Media
,Wrappable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends MediaImpl>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.boolean
getId()
getTags()
getTitle()
getUrl()
int
hashCode()
boolean
isUnwrappableAs
(Class unwrapType) Can this wrapped item be unwrapped as the indicated type?void
setAltText
(String altText) void
void
void
void
<T> T
Get the wrapped delegate item
-
Field Details
-
id
-
url
-
title
-
altText
-
tags
-
-
Constructor Details
-
MediaImpl
public MediaImpl()
-
-
Method Details
-
getId
-
setId
-
getUrl
-
setUrl
-
getTitle
-
setTitle
-
getAltText
- Specified by:
getAltText
in interfaceMedia
-
setAltText
- Specified by:
setAltText
in interfaceMedia
-
getTags
-
setTags
-
isUnwrappableAs
Description copied from interface:Wrappable
Can this wrapped item be unwrapped as the indicated type?- Specified by:
isUnwrappableAs
in interfaceWrappable
- Parameters:
unwrapType
- The type to check.- Returns:
- True/false.
-
unwrap
Description copied from interface:Wrappable
Get the wrapped delegate item -
hashCode
public int hashCode() -
equals
-
createOrRetrieveCopyInstance
public <G extends MediaImpl> 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<MediaImpl>
- 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
-