Package com.loop54.model.request
Class GetRelatedEntitiesRequest
java.lang.Object
com.loop54.model.request.Request
com.loop54.model.request.GetRelatedEntitiesRequest
This class is used to configure a GetEntities request to the Loop54 e-commerce search engine.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe entity who's related entities we want to get.Parameters for specifying which entities to retrieve.Fields inherited from class com.loop54.model.request.Request
customData -
Constructor Summary
ConstructorsConstructorDescriptionGetRelatedEntitiesRequest(Entity entity) GetRelatedEntitiesRequest(String entityType, String entityId) -
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 who's related 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
-
GetRelatedEntitiesRequest
- Parameters:
entityType- Type of the entity to queryentityId- Id of the entity to query
-
GetRelatedEntitiesRequest
- Parameters:
entity- The entity to use in the query.
-
-
Method Details
-
withResults
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.
-