@Entity public class OrderAttributeImpl extends Object implements OrderAttribute
OrderAttribute,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected Long |
id |
protected String |
name |
protected Order |
order |
protected String |
value
The value.
|
| Constructor and Description |
|---|
OrderAttributeImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends OrderAttribute> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
boolean |
equals(Object obj) |
Long |
getId()
Gets the id.
|
String |
getName()
Gets the name.
|
Order |
getOrder()
Gets the associated order.
|
String |
getValue()
Gets the value.
|
int |
hashCode() |
void |
setId(Long id)
Sets the id.
|
void |
setName(String name)
Sets the name.
|
void |
setOrder(Order order)
Sets the order.
|
void |
setValue(String value)
Sets the value.
|
String |
toString() |
protected Long id
protected String name
protected String value
protected Order order
public Long getId()
OrderAttributegetId in interface OrderAttributepublic void setId(Long id)
OrderAttributesetId in interface OrderAttributeid - the new idpublic String getValue()
OrderAttributegetValue in interface OrderAttributepublic void setValue(String value)
OrderAttributesetValue in interface OrderAttributevalue - the new valuepublic String getName()
OrderAttributegetName in interface OrderAttributepublic void setName(String name)
OrderAttributesetName in interface OrderAttributename - the new namepublic Order getOrder()
OrderAttributegetOrder in interface OrderAttributepublic void setOrder(Order order)
OrderAttributesetOrder in interface OrderAttributeorder - the associated orderpublic <G extends OrderAttribute> 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<OrderAttribute>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.