Class ValueFilterValues<T>

  • public class ValueFilterValues<T>
    extends Object
    Object wraps zero, one or multiple values and makes their processing easier. Instead of just wrapping the values it uses the whole filter object to utilize its convenience methods.

    Returned values are typed to Object, because they can be converted from original type. Conversion is moved into this class, so the client code doesn't have to handle translation from PrismPropertyValue to "real value" and then to convert it. Both singleValue() and allValues() are handled the same way.

    If conversionFunction is used any IllegalArgumentException will be rewrapped as QueryException, other runtime exceptions are not intercepted.

    • Method Detail

      • singleValue

        public @Nullable Object singleValue()
                                     throws QueryException
        Returns single value or null or fails if there are multiple values, all converted.
      • allValues

        public @NotNull List<?> allValues()
        Returns multiple values, all converted, or empty list - never null.
      • allValuesRaw

        public @NotNull List<T> allValuesRaw()
        Returns multiple real values without conversion or empty list - never null.
      • isEmpty

        public boolean isEmpty()
      • isMultiValue

        public boolean isMultiValue()