@Entity public class CategorySearchFacetImpl extends Object implements CategorySearchFacet
| Modifier and Type | Field and Description |
|---|---|
protected Category |
category |
protected Long |
id |
protected SearchFacet |
searchFacet |
protected BigDecimal |
sequence |
| Constructor and Description |
|---|
CategorySearchFacetImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends CategorySearchFacet> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
boolean |
equals(Object obj) |
Category |
getCategory()
Gets the associated category
|
Long |
getId()
Gets the internal id
|
SearchFacet |
getSearchFacet()
Gets the associated search facet
|
BigDecimal |
getSequence()
Gets the priority of this search facet in relationship to other search facets in this category
|
int |
hashCode() |
void |
setCategory(Category category)
Sets the associated category
|
void |
setId(Long id)
Sets the internal id
|
void |
setSearchFacet(SearchFacet searchFacet)
Sets the associated search facet
|
void |
setSequence(BigDecimal sequence)
Sets the sequence of this search facet
|
protected Long id
protected Category category
protected SearchFacet searchFacet
protected BigDecimal sequence
public Long getId()
CategorySearchFacetgetId in interface CategorySearchFacetpublic void setId(Long id)
CategorySearchFacetsetId in interface CategorySearchFacetpublic Category getCategory()
CategorySearchFacetgetCategory in interface CategorySearchFacetpublic void setCategory(Category category)
CategorySearchFacetsetCategory in interface CategorySearchFacetpublic SearchFacet getSearchFacet()
CategorySearchFacetgetSearchFacet in interface CategorySearchFacetpublic void setSearchFacet(SearchFacet searchFacet)
CategorySearchFacetsetSearchFacet in interface CategorySearchFacetpublic BigDecimal getSequence()
CategorySearchFacetgetSequence in interface CategorySearchFacetpublic void setSequence(BigDecimal sequence)
CategorySearchFacetsetSequence in interface CategorySearchFacet#getPosition()public <G extends CategorySearchFacet> 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<CategorySearchFacet>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.