@Entity public class SearchFacetRangeImpl extends Object implements SearchFacetRange, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Long |
id |
protected BigDecimal |
maxValue |
protected BigDecimal |
minValue |
protected SearchFacet |
searchFacet |
| Constructor and Description |
|---|
SearchFacetRangeImpl() |
| Modifier and Type | Method and Description |
|---|---|
<G extends SearchFacetRange> |
createOrRetrieveCopyInstance(MultiTenantCopyContext context)
Clone this entity for the purpose of multiple tenancy.
|
boolean |
equals(Object obj) |
Long |
getId()
Returns the internal id
|
BigDecimal |
getMaxValue()
Gets the maximum value for this SearchFacetRange
Note: The default SearchFacetRangeImpl allows this value to be null
|
BigDecimal |
getMinValue()
Gets the minimum value for this SearchFacetRange
Note: The default SearchFacetRangeImpl does not allow this value to be null
|
SearchFacet |
getSearchFacet()
Gets the associated SearchFacet to this range
|
int |
hashCode() |
void |
setId(Long id)
Sets the internal id
|
void |
setMaxValue(BigDecimal maxValue)
Sets the maximum value for this SearchFacetRange
|
void |
setMinValue(BigDecimal minValue)
Sets the minium value for this SearchFacetRange
|
void |
setSearchFacet(SearchFacet searchFacet)
Sets the associated SearchFacet
|
protected Long id
protected SearchFacet searchFacet
protected BigDecimal minValue
protected BigDecimal maxValue
public Long getId()
SearchFacetRangegetId in interface SearchFacetRangepublic void setId(Long id)
SearchFacetRangesetId in interface SearchFacetRangepublic SearchFacet getSearchFacet()
SearchFacetRangegetSearchFacet in interface SearchFacetRangepublic void setSearchFacet(SearchFacet searchFacet)
SearchFacetRangesetSearchFacet in interface SearchFacetRangepublic BigDecimal getMinValue()
SearchFacetRangegetMinValue in interface SearchFacetRangepublic void setMinValue(BigDecimal minValue)
SearchFacetRangesetMinValue in interface SearchFacetRangepublic BigDecimal getMaxValue()
SearchFacetRangegetMaxValue in interface SearchFacetRangepublic void setMaxValue(BigDecimal maxValue)
SearchFacetRangesetMaxValue in interface SearchFacetRangepublic <G extends SearchFacetRange> 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<SearchFacetRange>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationCopyright © 2019. All rights reserved.