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

    • Updating database using SQL prepared statement
    • scheduleAtFixedRate (Timer)
    • getSupportFragmentManager (FragmentActivity)
    • setContentView (Activity)
    • URL (java.net)
      A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
    • SortedMap (java.util)
      A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
    • HttpServlet (javax.servlet.http)
      Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
    • Response (javax.ws.rs.core)
      Defines the contract between a returned instance and the runtime when an application needs to provid
    • Base64 (org.apache.commons.codec.binary)
      Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
    • Table (org.hibernate.mapping)
      A relational table
    • Top 17 Free Sublime Text Plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

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