@Entity public class OrderItemAttributeImpl extends Object implements OrderItemAttribute
OrderItemAttribute,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected Long |
id |
static org.apache.commons.logging.Log |
LOG |
protected String |
name |
protected OrderItem |
orderItem |
protected String |
value |
| Constructor and Description |
|---|
OrderItemAttributeImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkCloneable(OrderItemAttribute itemAttribute) |
OrderItemAttribute |
clone()
Provide support for a deep copy of an order item.
|
<G extends OrderItemAttribute> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
boolean |
equals(Object obj) |
Long |
getId()
Gets the id.
|
String |
getName()
The name
|
OrderItem |
getOrderItem()
Gets the parent orderItem
|
String |
getValue()
The value
|
int |
hashCode() |
void |
setId(Long id)
Sets the id.
|
void |
setName(String name)
The name
|
void |
setOrderItem(OrderItem orderItem)
Sets the orderItem.
|
void |
setValue(String value)
The value
|
String |
toString() |
public static final org.apache.commons.logging.Log LOG
protected Long id
protected String name
protected String value
protected OrderItem orderItem
public Long getId()
OrderItemAttributegetId in interface OrderItemAttributepublic void setId(Long id)
OrderItemAttributesetId in interface OrderItemAttributeid - the new idpublic String getValue()
ValueAssignablegetValue in interface ValueAssignable<String>public void setValue(String value)
ValueAssignablesetValue in interface ValueAssignable<String>value - The valuepublic String getName()
ValueAssignablegetName in interface ValueAssignable<String>public void setName(String name)
ValueAssignablesetName in interface ValueAssignable<String>name - The namepublic OrderItem getOrderItem()
OrderItemAttributegetOrderItem in interface OrderItemAttributepublic void setOrderItem(OrderItem orderItem)
OrderItemAttributesetOrderItem in interface OrderItemAttributeorderItem - the associated orderItempublic void checkCloneable(OrderItemAttribute itemAttribute) throws CloneNotSupportedException, SecurityException, NoSuchMethodException
public OrderItemAttribute clone()
OrderItemAttributeclone in interface OrderItemAttributeclone in class Objectpublic <G extends OrderItemAttribute> 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<OrderItemAttribute>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.