Interface AMImageQueryBuilder.FuzzySortStep
- All Superinterfaces:
AMImageQueryBuilder.FinalStep
- All Known Subinterfaces:
AMImageQueryBuilder.InitialStep
- Enclosing interface:
- AMImageQueryBuilder
-
Method Summary
Modifier and TypeMethodDescriptionwith(com.liferay.adaptive.media.AMAttribute<com.liferay.adaptive.media.processor.AMProcessor<com.liferay.portal.kernel.repository.model.FileVersion>, V> amAttribute, V value) An intermediate method that sorts the adaptive media based on specific attribute values.Methods inherited from interface com.liferay.adaptive.media.image.finder.AMImageQueryBuilder.FinalStep
done
-
Method Details
-
with
<V> AMImageQueryBuilder.FuzzySortStep with(com.liferay.adaptive.media.AMAttribute<com.liferay.adaptive.media.processor.AMProcessor<com.liferay.portal.kernel.repository.model.FileVersion>, V> amAttribute, V value) An intermediate method that sorts the adaptive media based on specific attribute values. Sorting is done using a distance comparator that returns the adaptive media images that are a closer match first.The distance comparator is implemented based on the value returned by the method
AMAttribute.distance(Object, Object).If the method
AMImageQueryBuilder.StrictSortStep.orderBy(com.liferay.adaptive.media.AMAttribute<com.liferay.adaptive.media.processor.AMProcessor<com.liferay.portal.kernel.repository.model.FileVersion>, V>, com.liferay.adaptive.media.image.finder.AMImageQueryBuilder.SortOrder)is invoked in the same query builder, it takes precedence and this method has no effect.If this method is invoked with multiple attributes, they will be used in the following order:
- The first attribute sorts all the adaptive media images.
- If two or more adaptive media images are located at the same distance, the second attribute is used to sort those elements.
- If the second attribute doesn't resolve all the cases, the third attribute is used, and so on.
- Parameters:
amAttribute- the attribute used to sort the adaptive media imagesvalue- the attribute's value
-