Interface Indexable<ID>
- All Known Implementing Classes:
NotFoundIndexable
public interface Indexable<ID>
Interface for anything that can be indexed for search.
- Author:
- Kelly Tisdell (ktisdell)
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
Returns the identifier for this object.The raw JSON map representing the Indexable object.Any translations present for this Indexable object.getType()
Provides a type or "namespace" for documents that are co-mingled in an index.default boolean
Returns true if the item was not found when querying the service, otherwise false.
-
Method Details
-
getId
Returns the identifier for this object. Typically a ULID, UUID, Long, or BigDecimal.- Returns:
- The ID of the indexable
-
getType
IndexableType getType()Provides a type or "namespace" for documents that are co-mingled in an index. Allows for filtering by type. e.g. "PRODUCT", "CATEGORY", "ORDER", "STORE", etc.- Returns:
- the indexable type of the indexable
-
getJsonMap
The raw JSON map representing the Indexable object.- Returns:
- raw JSON map representing the Indexable object
-
getTranslations
List<Translation> getTranslations()Any translations present for this Indexable object. If the indexable type is not translatable, this will be empty.- Returns:
- any translations present for this Indexable object
-
isNotFound
default boolean isNotFound()Returns true if the item was not found when querying the service, otherwise false. This indicates that the indexable was deleted. In the case that this is true, onlygetType()
andgetId()
will return values.- Returns:
-