Class HitBuilder
java.lang.Object
com.commercetools.api.models.order.HitBuilder
HitBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
Hit hit = Hit.builder()
.id("{id}")
.version(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds Hit with checking for non-null required valuesbuilds Hit without checking for non-null required valuesgetId()
Unique identifier of the Order.The higher the value is, the more relevant the hit is for the search request.Current version of the Order.Unique identifier of the Order.static HitBuilder
of()
factory method for an instance of HitBuilderstatic HitBuilder
create builder for Hit instanceThe higher the value is, the more relevant the hit is for the search request.Current version of the Order.
-
Constructor Details
-
HitBuilder
public HitBuilder()
-
-
Method Details
-
id
Unique identifier of the Order.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the Order.
- Parameters:
version
- value to be set- Returns:
- Builder
-
relevance
The higher the value is, the more relevant the hit is for the search request.
- Parameters:
relevance
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Order.
- Returns:
- id
-
getVersion
Current version of the Order.
- Returns:
- version
-
getRelevance
The higher the value is, the more relevant the hit is for the search request.
- Returns:
- relevance
-
build
builds Hit with checking for non-null required values -
buildUnchecked
builds Hit without checking for non-null required values- Returns:
- Hit
-
of
factory method for an instance of HitBuilder- Returns:
- builder
-
of
create builder for Hit instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-