congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.jboss.windup.graph.dao.exception
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.jboss.windup.graph.dao.exception (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.exception

Most used classes

  • NonUniqueResultException
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