Class AmbiguousItemException

  • All Implemented Interfaces:
    java.io.Serializable

    public class AmbiguousItemException
    extends ImpExException
    Exception thrown if several items found instead of one or zero. Used by ExistingItemResolver to signalize this case.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      AmbiguousItemException​(ComposedType targetType, java.util.Collection<Item> items, java.lang.String query, java.util.Map<java.lang.String,​java.lang.Object> searchValues)
      Constructs a new Exception with information about searched type and used query, as well as resulting items.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<Item> getItems()
      Gets type of searched item.
      java.lang.String getQuery()
      Gets query used for searching.
      java.util.Map<java.lang.String,​java.lang.Object> getSearchValues()
      Gets all values replaced within query.
      ComposedType getTargetType()
      Gets type of searched item.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AmbiguousItemException

        public AmbiguousItemException​(ComposedType targetType,
                                      java.util.Collection<Item> items,
                                      java.lang.String query,
                                      java.util.Map<java.lang.String,​java.lang.Object> searchValues)
        Constructs a new Exception with information about searched type and used query, as well as resulting items.
        Parameters:
        targetType - type of searched item
        items - resulting items (Size is greater than one.)
        query - query used for searching
        searchValues - values replaced within query
    • Method Detail

      • getItems

        public java.util.Collection<Item> getItems()
        Gets type of searched item.
        Returns:
        type of searched item
      • getQuery

        public java.lang.String getQuery()
        Gets query used for searching.
        Returns:
        query used for searching
      • getSearchValues

        public java.util.Map<java.lang.String,​java.lang.Object> getSearchValues()
        Gets all values replaced within query.
        Returns:
        values replaced within query
      • getTargetType

        public ComposedType getTargetType()
        Gets type of searched item.
        Returns:
        type of searched item