@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()
SearchFacetRange
getId
in interface SearchFacetRange
public void setId(Long id)
SearchFacetRange
setId
in interface SearchFacetRange
public SearchFacet getSearchFacet()
SearchFacetRange
getSearchFacet
in interface SearchFacetRange
public void setSearchFacet(SearchFacet searchFacet)
SearchFacetRange
setSearchFacet
in interface SearchFacetRange
public BigDecimal getMinValue()
SearchFacetRange
getMinValue
in interface SearchFacetRange
public void setMinValue(BigDecimal minValue)
SearchFacetRange
setMinValue
in interface SearchFacetRange
public BigDecimal getMaxValue()
SearchFacetRange
getMaxValue
in interface SearchFacetRange
public void setMaxValue(BigDecimal maxValue)
SearchFacetRange
setMaxValue
in interface SearchFacetRange
public <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.