Table of Contents |
---|
...
Prerequisites
Before reading this section you should make yourself familiar with the Filter API because filters are used as arguments in almost all search calls.
...
For searching in Price Parameters, you should almost exclusively use specialized methods api.findLookupTable
and api.findLookupTableValues
. For more details see Search API.Searching in Price Parameters.
Using Attribute Names in Searches
When working wit attributes, you can use column names instead of attribute IDs in api.find filters. In this case, column names are also returned as keys.
- The api.find/stream methods accept field names from meta data (customized column names).
- The api.find/stream methods accept sort column names from meta data.
- When field names are used and a raw DB result is returned, the resulting object has keys from meta data.
- When you use the api.find/stream variant with a List of named fields, you get the result in a hashmap with these fields. When loading a list of entities (i.e. api.find), the function List api.namedEntities(List) has to be called to convert the result of api.find to a list of maps that have keys from meta data.
- When you use the api.find/stream without the List of fields, you get Objects representing the result which can be converted to a List of hashmaps with named fields using api.namedEntities() or iterator.nextNamedEntity(). (When using api.stream(), you can call the method iterator.nextNamedEntity() instead of iterator.next() which returns a map with keys from attribute meta data.)
Limitations of api.find()
...