congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
NonUniqueResultException
Code IndexAdd Tabnine 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)

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

  • Making http post requests using okhttp
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (Timer)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Permission (java.security)
    Legacy security code; do not use.
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Top 12 Jupyter Notebook extensions
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