Package org.apache.torque

Examples of org.apache.torque.TorqueException


            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

                {
                    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

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

    protected Persistent putInstanceImpl(Serializable key, Persistent om)
        throws TorqueException
    {
        if (getOMClass() != null && !getOMClass().isInstance(om))
        {
            throw new TorqueException(om + "; class=" + om.getClass().getName()
                + "; id=" + om.getPrimaryKey() + " cannot be cached with "
                + getOMClass().getName() + " objects");
        }

        Persistent oldOm = null;
        if (cache != null)
        {
            try
            {
                synchronized (this)
                {
                    oldOm = (Persistent) cache.get(key);
                    cache.put(key, om);
                }
            }
            catch (CacheException ce)
            {
                throw new TorqueException
                    ("Could not cache due to internal JCS error", ce);
            }
        }
        return oldOm;
    }
View Full Code Here

                mrCache = new NoOpMethodResultCache(cache);
            }
        }
        catch (Exception e)
        {
            throw new TorqueException("Cache could not be initialized", e);
        }
        if (cache == null)
        {
            log.info("Cache could not be initialized for region: " + v);
        }
View Full Code Here

                jcsCache.remove();
                groups.clear();
            }
            catch (CacheException ce)
            {
                log.error(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.