Package org.apache.torque

Examples of org.apache.torque.TorqueException


                throwTorqueException(e);
            }
        }
        else
        {
            throw new TorqueException("No changes to save");
        }
    }
View Full Code Here


        if (!table.equals(""))
        {
            DatabaseMap dbMap = Torque.getDatabaseMap(criteria.getDbName());
            if (dbMap == null)
            {
                throw new TorqueException("dbMap is null");
            }
            if (dbMap.getTable(table) == null)
            {
                throw new TorqueException("dbMap.getTable() is null");
            }

            ColumnMap[] columns = dbMap.getTable(table).getColumns();

            for (int i = 0; i < columns.length; i++)
View Full Code Here

            selectCriteria.put(pk.getFullyQualifiedName(),
                updateValues.remove(pk.getFullyQualifiedName()));
        }
        else
        {
            throw new TorqueException("No PK specified for database update");
        }

        doUpdate(selectCriteria, updateValues, con);
    }
View Full Code Here

            statement = con.createStatement();
            rowCount = statement.executeUpdate(statementString);
        }
        catch (SQLException e)
        {
            throw new TorqueException(e);
        }
        finally
        {
            if (statement != null)
            {
                try
                {
                    statement.close();
                }
                catch (SQLException e)
                {
                    throw new TorqueException(e);
                }
            }
        }
        return rowCount;
    }
View Full Code Here

     * @exception TorqueException Couldn't handle multiple records.
     */
    protected static void handleMultipleRecords(DataSet ds)
        throws TorqueException
    {
        throw new TorqueException("Criteria expected single Record and "
                + "Multiple Records were selected");
    }
View Full Code Here

            }
            catch (Exception e)
            {
                log.error("BasePeer.MapBuilder failed trying to instantiate: "
                        + name, e);
                throw new TorqueException(e);
            }
        }
    }
View Full Code Here

                {
                    statement.close();
                }
                catch (SQLException e)
                {
                    throw new TorqueException(e);
                }
            }
        }
        return v;
    }
View Full Code Here

            throws Exception
        {
            MethodCacheKey key = (MethodCacheKey) obj;
            if (key.instanceOrClass == null && key.method == null)
            {
                throw new TorqueException(
                    "Attempted to return key to pool twice.");
            }
            key.instanceOrClass = null;
            key.method = null;
            key.arg1 = null;
View Full Code Here

        {
            setOMClass(Class.forName(getClassName()));
        }
        catch (ClassNotFoundException cnfe)
        {
            throw new TorqueException("Could not load " + getClassName());
        }
    }
View Full Code Here

            {
                cache.remove();
            }
            catch (CacheException ce)
            {
                throw new TorqueException(
                        "Could not clear cache due to internal JCS error.", ce);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.torque.TorqueException

Copyright © 2018 www.massapicom. 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.