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

How to use
NoResultException
in
com.enioka.jqm.jdbc

Best Java code snippets using com.enioka.jqm.jdbc.NoResultException (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: enioka/jqm

public Queue getQueue(DbConn cnx)
{
  List<Queue> qq = Queue.select(cnx, "q_select_by_id", this.queue_id);
  if (qq.size() == 0)
  {
    throw new NoResultException("No queue found");
  }
  return qq.get(0);
}
origin: com.enioka.jqm/jqm-model

public Queue getQueue(DbConn cnx)
{
  List<Queue> qq = Queue.select(cnx, "q_select_by_id", this.queue_id);
  if (qq.size() == 0)
  {
    throw new NoResultException("No queue found");
  }
  return qq.get(0);
}
origin: enioka/jqm

private static JndiObjectResourceDto getUniqueJndiResource(DbConn cnx, String query_key, Object key)
{
  List<JndiObjectResourceDto> res = getJndiObjectResources(cnx, query_key, key);
  if (res.isEmpty())
  {
    throw new NoResultException("The query returned zero rows when one was expected.");
  }
  if (res.size() > 1)
  {
    throw new NonUniqueResultException("The query returned more than one row when one was expected");
  }
  return res.get(0);
}
origin: enioka/jqm

public static PKI select_key(DbConn cnx, String key)
{
  List<PKI> pp = select(cnx, "pki_select_by_key", key);
  if (pp.size() == 0)
  {
    throw new NoResultException("No PKI with key " + key);
  }
  if (pp.size() > 1)
  {
    throw new NonUniqueResultException("Configuration is not valid");
  }
  return pp.get(0);
}
origin: enioka/jqm

public static JobDef select_key(DbConn cnx, String name)
{
  List<JobDef> res = select(cnx, "jd_select_by_key", name);
  if (res.isEmpty())
  {
    throw new NoResultException("no result for query by key for key " + name);
  }
  if (res.size() > 1)
  {
    throw new DatabaseException("Inconsistent database! Multiple results for query by key for key " + name);
  }
  return res.get(0);
}
origin: com.enioka.jqm/jqm-model

public static Queue select_key(DbConn cnx, String name)
{
  List<Queue> res = select(cnx, "q_select_by_key", name);
  if (res.isEmpty())
  {
    throw new NoResultException("no result for query by key for key " + name);
  }
  if (res.size() > 1)
  {
    throw new DatabaseException("Inconsistent database! Multiple results for query by key for key " + name);
  }
  return res.get(0);
}
origin: enioka/jqm

public static Queue select_key(DbConn cnx, String name)
{
  List<Queue> res = select(cnx, "q_select_by_key", name);
  if (res.isEmpty())
  {
    throw new NoResultException("no result for query by key for key " + name);
  }
  if (res.size() > 1)
  {
    throw new DatabaseException("Inconsistent database! Multiple results for query by key for key " + name);
  }
  return res.get(0);
}
origin: com.enioka.jqm/jqm-model

public static JobDef select_key(DbConn cnx, String name)
{
  List<JobDef> res = select(cnx, "jd_select_by_key", name);
  if (res.isEmpty())
  {
    throw new NoResultException("no result for query by key for key " + name);
  }
  if (res.size() > 1)
  {
    throw new DatabaseException("Inconsistent database! Multiple results for query by key for key " + name);
  }
  return res.get(0);
}
origin: com.enioka.jqm/jqm-model

  public static RUser selectlogin(DbConn cnx, String id)
  {
    List<RUser> res = select(cnx, "user_select_by_key", id);
    if (res.isEmpty())
    {
      throw new NoResultException("no result for query by key for key " + id);
    }
    if (res.size() > 1)
    {
      throw new NonUniqueResultException("Inconsistent database! Multiple results for query by key for key " + id);
    }
    return res.get(0);
  }
}
origin: com.enioka.jqm/jqm-model

public static Cl select_key(DbConn cnx, String name)
{
  List<Cl> res = select(cnx, "cl_select_by_key", name);
  if (res.isEmpty())
  {
    throw new NoResultException("no result for query by key for key " + name);
  }
  if (res.size() > 1)
  {
    throw new DatabaseException("Inconsistent database! Multiple results for query by key for key " + name);
  }
  return res.get(0);
}
origin: com.enioka.jqm/jqm-model

public static PKI select_key(DbConn cnx, String key)
{
  List<PKI> pp = select(cnx, "pki_select_by_key", key);
  if (pp.size() == 0)
  {
    throw new NoResultException("No PKI with key " + key);
  }
  if (pp.size() > 1)
  {
    throw new NonUniqueResultException("Configuration is not valid");
  }
  return pp.get(0);
}
origin: com.enioka.jqm/jqm-admin

private static JndiObjectResourceDto getUniqueJndiResource(DbConn cnx, String query_key, Object key)
{
  List<JndiObjectResourceDto> res = getJndiObjectResources(cnx, query_key, key);
  if (res.isEmpty())
  {
    throw new NoResultException("The query returned zero rows when one was expected.");
  }
  if (res.size() > 1)
  {
    throw new NonUniqueResultException("The query returned more than one row when one was expected");
  }
  return res.get(0);
}
origin: enioka/jqm

  public static JndiObjectResource select_alias(DbConn cnx, String alias)
  {
    List<JndiObjectResource> res = select(cnx, "jndi_select_by_key", alias);
    if (res.isEmpty())
    {
      throw new NoResultException("no result for query by key for key " + alias);
    }
    if (res.size() > 1)
    {
      throw new NonUniqueResultException("Inconsistent database! Multiple results for query by key for key " + alias);
    }
    return res.get(0);
  }
}
origin: com.enioka.jqm/jqm-model

  public static Node select_single(DbConn cnx, String query_key, Object... args)
  {
    List<Node> nn = select(cnx, query_key, args);
    if (nn.size() == 0)
    {
      throw new NoResultException("No node with this ID");
    }
    if (nn.size() > 1)
    {
      throw new NonUniqueResultException("COnfiguration is broken: multiple nodes with the same ID");
    }
    return nn.get(0);
  }
}
origin: com.enioka.jqm/jqm-model

  public static JndiObjectResource select_alias(DbConn cnx, String alias)
  {
    List<JndiObjectResource> res = select(cnx, "jndi_select_by_key", alias);
    if (res.isEmpty())
    {
      throw new NoResultException("no result for query by key for key " + alias);
    }
    if (res.size() > 1)
    {
      throw new NonUniqueResultException("Inconsistent database! Multiple results for query by key for key " + alias);
    }
    return res.get(0);
  }
}
origin: enioka/jqm

public static Cl select_key(DbConn cnx, String name)
{
  List<Cl> res = select(cnx, "cl_select_by_key", name);
  if (res.isEmpty())
  {
    throw new NoResultException("no result for query by key for key " + name);
  }
  if (res.size() > 1)
  {
    throw new DatabaseException("Inconsistent database! Multiple results for query by key for key " + name);
  }
  return res.get(0);
}
origin: enioka/jqm

  public static RUser selectlogin(DbConn cnx, String id)
  {
    List<RUser> res = select(cnx, "user_select_by_key", id);
    if (res.isEmpty())
    {
      throw new NoResultException("no result for query by key for key " + id);
    }
    if (res.size() > 1)
    {
      throw new NonUniqueResultException("Inconsistent database! Multiple results for query by key for key " + id);
    }
    return res.get(0);
  }
}
origin: enioka/jqm

  public static Node select_single(DbConn cnx, String query_key, Object... args)
  {
    List<Node> nn = select(cnx, query_key, args);
    if (nn.size() == 0)
    {
      throw new NoResultException("No node with this ID");
    }
    if (nn.size() > 1)
    {
      throw new NonUniqueResultException("COnfiguration is broken: multiple nodes with the same ID");
    }
    return nn.get(0);
  }
}
origin: com.enioka.jqm/jqm-admin

private static GlobalParameterDto getGlobalParameter(DbConn cnx, String query_key, Object key)
{
  ResultSet rs = cnx.runSelect(query_key, key);
  try
  {
    if (!rs.next())
    {
      throw new NoResultException("The query returned zero rows when one was expected.");
    }
    GlobalParameterDto res = mapGlobalParameter(rs);
    if (rs.next())
    {
      throw new NonUniqueResultException("The query returned more than one row when one was expected");
    }
    rs.close();
    return res;
  }
  catch (SQLException e)
  {
    throw new JqmAdminApiInternalException("An error occurred while querying the database", e);
  }
}
origin: enioka/jqm

throw new NoResultException("The query returned zero rows when one was expected.");
com.enioka.jqm.jdbcNoResultException

Most used methods

  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • startActivity (Activity)
  • putExtra (Intent)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JPanel (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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