Package com.loop54.model.request
Class GetEntitiesByAttributeRequest
java.lang.Object
com.loop54.model.request.Request
com.loop54.model.request.GetEntitiesByAttributeRequest
This class is used to configure a GetEntities request to the Loop54 e-commerce search engine.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe attribute name-value-pair to find entities connected to.Provides human-readable labels in the Portal.Parameters for specifying which entities to retrieve.Fields inherited from class com.loop54.model.request.Request
customData -
Constructor Summary
ConstructorsConstructorDescriptionGetEntitiesByAttributeRequest(String attributeName, String attributeValue) GetEntitiesByAttributeRequest(String attributeName, String[] attributeValues) GetEntitiesByAttributeRequest(String attributeName, String[] attributeValues, RequestAliasData requestAlias) GetEntitiesByAttributeRequest(String attributeName, String attributeValue, RequestAliasData requestAlias) -
Method Summary
Modifier and TypeMethodDescriptionwithCustomData(String key, Object value) Chainable variant ofRequest.addCustomData(String, Object).withRequestAlias(RequestAliasData requestAlias) Sets the human-readable labels shown in the Portal.withResults(Consumer<EntityCollectionParameters> configurator) ConfiguresresultsOptions, e.g.Methods inherited from class com.loop54.model.request.Request
addCustomData
-
Field Details
-
attribute
The attribute name-value-pair to find entities connected to. Note: this attribute needs to be indexed in the engine. See the endpoint GetIndexedAttribute. -
requestAlias
Provides human-readable labels in the Portal. -
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
-
GetEntitiesByAttributeRequest
public GetEntitiesByAttributeRequest(String attributeName, String attributeValue, RequestAliasData requestAlias) -
GetEntitiesByAttributeRequest
public GetEntitiesByAttributeRequest(String attributeName, String[] attributeValues, RequestAliasData requestAlias) -
GetEntitiesByAttributeRequest
-
GetEntitiesByAttributeRequest
-
-
Method Details
-
withRequestAlias
Sets the human-readable labels shown in the Portal.- Parameters:
requestAlias- The alias data to use.- Returns:
- This request, for chaining.
-
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.
-