@Entity public class CategoryExcludedSearchFacetImpl extends Object implements CategoryExcludedSearchFacet, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Category |
category |
protected Long |
id |
protected SearchFacet |
searchFacet |
protected BigDecimal |
sequence |
| Constructor and Description |
|---|
CategoryExcludedSearchFacetImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends CategoryExcludedSearchFacet> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
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
|
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()
CategoryExcludedSearchFacetgetId in interface CategoryExcludedSearchFacetpublic void setId(Long id)
CategoryExcludedSearchFacetsetId in interface CategoryExcludedSearchFacetpublic Category getCategory()
CategoryExcludedSearchFacetgetCategory in interface CategoryExcludedSearchFacetpublic void setCategory(Category category)
CategoryExcludedSearchFacetsetCategory in interface CategoryExcludedSearchFacetpublic SearchFacet getSearchFacet()
CategoryExcludedSearchFacetgetSearchFacet in interface CategoryExcludedSearchFacetpublic void setSearchFacet(SearchFacet searchFacet)
CategoryExcludedSearchFacetsetSearchFacet in interface CategoryExcludedSearchFacetpublic BigDecimal getSequence()
CategoryExcludedSearchFacetgetSequence in interface CategoryExcludedSearchFacetpublic void setSequence(BigDecimal sequence)
CategoryExcludedSearchFacetsetSequence in interface CategoryExcludedSearchFacet#getPosition()public <G extends CategoryExcludedSearchFacet> 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<CategoryExcludedSearchFacet>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.