Codota Logo
NonUniqueResultException
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

Most used methods

  • <init>

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • getSystemService (Context)
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Reference (javax.naming)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JCheckBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now