Tabnine Logo
NonUniqueResultException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jboss.windup.graph.dao.exception.NonUniqueResultException
constructor

Best Java code snippets using org.jboss.windup.graph.dao.exception.NonUniqueResultException.<init> (Showing top 2 results out of 315)

origin: org.jboss.windup.legacy.application/grapher

  @Override
  public T getByUniqueProperty(String property, Object value) throws NonUniqueResultException {
    Iterable<T> results = getByProperty(property, value);
    
    if(!results.iterator().hasNext()) {
      return null;
    }
    
    Iterator<T> iter = results.iterator();
    T result = iter.next();
    
    if(iter.hasNext()) {
      throw new NonUniqueResultException("Expected unique value, but returned non-unique.");
    }
    
    return result;
  }
}
origin: org.jboss.windup/windup-grapher

  @Override
  public T getByUniqueProperty(String property, Object value) throws NonUniqueResultException {
    Iterable<T> results = getByProperty(property, value);
    
    if(!results.iterator().hasNext()) {
      return null;
    }
    
    Iterator<T> iter = results.iterator();
    T result = iter.next();
    
    if(iter.hasNext()) {
      throw new NonUniqueResultException("Expected unique value, but returned non-unique.");
    }
    
    return result;
  }
}
org.jboss.windup.graph.dao.exceptionNonUniqueResultException<init>

Popular methods of NonUniqueResultException

    Popular in Java

    • Running tasks concurrently on multiple threads
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • getExternalFilesDir (Context)
    • onCreateOptionsMenu (Activity)
    • Graphics2D (java.awt)
      This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
    • InetAddress (java.net)
      An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
    • Charset (java.nio.charset)
      A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
    • Stream (java.util.stream)
      A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
    • BoxLayout (javax.swing)
    • JPanel (javax.swing)
    • Top plugins for Android Studio
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now