Package com.loop54.model
Class EntityAttribute
java.lang.Object
com.loop54.model.EntityAttribute
Represents an attribute on an entity in the loop54 search engine.
This could for instance be "Price", "Name" or "Category" values that belong to an entity.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EntityAttribute
-
-
Method Details
-
getName
- Returns:
- Name of the attribute. For instance "Price", "Name" or "Category".
-
getType
-
getValue
Casts the first value to the specified generic type and returns it, or null if there are no values.- Type Parameters:
T- The expected type of the value in the attribute.- Parameters:
clazz- Type of the attribute. This needs to match what the library has deserialized or an exception will be thrown.- Returns:
- The first (or only) value or null if empty.
-
getValues
Casts the values to the specified generic type and return them all as a list.- Type Parameters:
T- The expected type of the values in the attribute.- Parameters:
clazz- Type of the attribute. This needs to match what the library has deserialized or an exception will be thrown.- Returns:
- All values with the desired type as a list.
-