Examples of QueryNoResultException


Examples of org.apache.empire.db.exceptions.QueryNoResultException

        String sqlCmd = cmd.getSelect();
        // Create Statement
        db = cmd.getDatabase();
        rset = db.executeQuery(sqlCmd, cmd.getParamValues(), scrollable, conn);
        if (rset==null)
            throw new QueryNoResultException(sqlCmd);
        // successfully opened
        colList = cmd.getSelectExprList();
        addOpenResultSet();
    }
View Full Code Here

Examples of org.apache.empire.db.exceptions.QueryNoResultException

    { // Open the record
        open(cmd, conn);
        // Get First Record
        if (!moveNext())
        { // Close
            throw new QueryNoResultException(cmd.getSelect());
        }
    }
View Full Code Here

Examples of org.apache.empire.db.exceptions.QueryNoResultException

     */
    public final Object querySingleValue(String sqlCmd, Object[] sqlParams, Connection conn)
    {
        Object value = querySingleValue(sqlCmd, sqlParams, DataType.UNKNOWN, conn);
        if (value==ObjectUtils.NO_VALUE)
          throw new QueryNoResultException(sqlCmd);
        return value;
    }
View Full Code Here

Examples of org.apache.empire.db.exceptions.QueryNoResultException

     */
    public final Object querySingleValue(DBCommand cmd, DataType dataType, Connection conn)
    {
        Object value = querySingleValue(cmd.getSelect(), cmd.getParamValues(), dataType, conn);
        if (value==ObjectUtils.NO_VALUE)
          throw new QueryNoResultException(cmd.getSelect());
        return value;
    }
View Full Code Here

Examples of org.apache.empire.db.exceptions.QueryNoResultException

     */
    public final int querySingleInt(DBCommand cmd, Connection conn)
    {
        Object value = querySingleValue(cmd.getSelect(), cmd.getParamValues(), DataType.INTEGER, conn);
    if (ObjectUtils.isEmpty(value))
      throw new QueryNoResultException(cmd.getSelect());
    return ObjectUtils.getInteger(value);
    }
View Full Code Here

Examples of org.apache.empire.db.exceptions.QueryNoResultException

     */
    public final long querySingleLong(DBCommand cmd, Connection conn)
    {
        Object value = querySingleValue(cmd.getSelect(), cmd.getParamValues(), DataType.INTEGER, conn);
    if (ObjectUtils.isEmpty(value))
      throw new QueryNoResultException(cmd.getSelect());
    return ObjectUtils.getLong(value);
    }
View Full Code Here

Examples of org.apache.empire.db.exceptions.QueryNoResultException

     */
    public final String querySingleString(DBCommand cmd, Connection conn)
    {
        Object value = querySingleValue(cmd.getSelect(), cmd.getParamValues(), DataType.TEXT, conn);
    if (value==ObjectUtils.NO_VALUE)
      throw new QueryNoResultException(cmd.getSelect());
    return StringUtils.toString(value, "");
    }
View Full Code Here

Examples of org.apache.empire.db.exceptions.QueryNoResultException

    public Object[] querySingleRow(String sqlCmd, Object[] sqlParams, Connection conn)
    {
        List<Object[]> result = new ArrayList<Object[]>();
        queryObjectList(sqlCmd, sqlParams, conn, result, 1);
        if (result.size()<1)
            throw new QueryNoResultException(sqlCmd);
        return result.get(0);
    }
View Full Code Here

Examples of org.apache.empire.db.exceptions.QueryNoResultException

     */
    public final Object querySingleValue(String sqlCmd, Object[] sqlParams, Connection conn)
    {
        Object value = querySingleValue(sqlCmd, sqlParams, DataType.UNKNOWN, conn);
        if (value==ObjectUtils.NO_VALUE)
          throw new QueryNoResultException(sqlCmd);
        return value;
    }
View Full Code Here

Examples of org.apache.empire.db.exceptions.QueryNoResultException

     */
    public final Object querySingleValue(DBCommand cmd, DataType dataType, Connection conn)
    {
        Object value = querySingleValue(cmd.getSelect(), cmd.getParamValues(), dataType, conn);
        if (value==ObjectUtils.NO_VALUE)
          throw new QueryNoResultException(cmd.getSelect());
        return value;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.