Package com.loop54.model.request
Class GetComplementaryEntitiesRequest
java.lang.Object
com.loop54.model.request.Request
com.loop54.model.request.GetComplementaryEntitiesRequest
This class is used to configure a GetComplementaryEntities request to the Loop54 e-commerce search engine.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe entity whose complementary entities we want to get.Parameters for specifying which entities to retrieve.Fields inherited from class com.loop54.model.request.Request
customData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithCustomData(String key, Object value) Chainable variant ofRequest.addCustomData(String, Object).withResults(Consumer<EntityCollectionParameters> configurator) ConfiguresresultsOptions, e.g.Methods inherited from class com.loop54.model.request.Request
addCustomData
-
Field Details
-
entity
The entity whose complementary entities we want to get. Only needs the type and id set. -
resultsOptions
Parameters for specifying which entities to retrieve. Such as filtering, faceting, sorting and paging. Note that filtering is advised when doing this request.
-
-
Constructor Details
-
GetComplementaryEntitiesRequest
- Parameters:
entityType- Type of the entity to queryentityId- Id of the entity to query
-
GetComplementaryEntitiesRequest
- Parameters:
entity- The entity to use in the query.
-
-
Method Details
-
withResults
public GetComplementaryEntitiesRequest withResults(Consumer<EntityCollectionParameters> configurator) ConfiguresresultsOptions, e.g.request.withResults(r -> r.page(0, 20).distinctFacet("Category")).- Parameters:
configurator- Applied toresultsOptions.- Returns:
- This request, for chaining.
-
withCustomData
Description copied from class:RequestChainable variant ofRequest.addCustomData(String, Object). Subclasses override this to return their own type.- Overrides:
withCustomDatain classRequest- Parameters:
key- Key to set the data on. The keys will be treated as case-sensitive.value- Value to add to the custom data.- Returns:
- This request, for chaining.
-