Package javax.jdo

Examples of javax.jdo.JDODataStoreException


        }
        catch (JPOXDataStoreException dse)
        {
            if (dse.getFailedObject() != null)
            {
                throw new JDODataStoreException(dse.getMessage(), dse.getFailedObject());
            }
            else
            {
                throw new JDODataStoreException(dse.getMessage(), dse.getNestedExceptions());
            }
        }
    }
View Full Code Here


        }
        catch (JPOXDataStoreException dse)
        {
            if (dse.getFailedObject() != null)
            {
                throw new JDODataStoreException(dse.getMessage(), dse.getFailedObject());
            }
            else
            {
                throw new JDODataStoreException(dse.getMessage(), dse.getNestedExceptions());
            }
        }
    }
View Full Code Here

            driver.begin(readOnly);
            //  } catch (DriverException e) {
        } catch (Throwable e) {
            e.printStackTrace();
            status = Status.STATUS_NO_TRANSACTION;
            throw new JDODataStoreException("Cannot begin transaction", e);
        }
    }
View Full Code Here

                while (i.hasNext()) {
                    Column c = (Column) i.next();
                    row.setValue(c, newFields.getValue(c));
                }
            } else {
                throw new JDODataStoreException(I18N.msg("E_row_deleted"));
            }
        } catch (DriverException e) {
            throw new JDODataStoreException(I18N.msg("E_query_failed"), e);
        } finally {
            if (useNontrans) {
                currentTransaction().commit();
            }
        }
View Full Code Here

            addToCache(rows);

            // Put extraRows in the cache too
            addToCache(extraRows);
        } catch (DriverException e) {
            throw new JDODataStoreException(I18N.msg("E_query_failed"), e);
        } finally {
            if (useNontrans) {
                currentTransaction().commit();
            }
        }
View Full Code Here

                ((TransactionImpl) currentTransaction()).begin(true);
            }
            count = ((TransactionImpl) currentTransaction()).getDriver()
                .count(selector);
        } catch (DriverException e) {
            throw new JDODataStoreException(I18N.msg("E_query_failed"), e);
        } finally {
            if (useNontrans) {
                currentTransaction().commit();
            }
        }
View Full Code Here

        selector.require(dfg);
        Collection rows = selectRows(selector);
        if (!rows.isEmpty()) {
            row = (Row) rows.iterator().next();
        } else {
            throw new JDODataStoreException(I18N.msg("E_row_deleted"));
        }
        handler.resetRow(row);
    }
View Full Code Here

        }
        catch (SQLException e)
        {
            if (query.getObjectManager().getOMFContext().getApi().equalsIgnoreCase("JDO"))
            {
                throw new JDODataStoreException(LOCALISER.msg("052601",e));
            }
            else
            {
                throw new JPOXDataStoreException(LOCALISER.msg("052601",e));
            }
View Full Code Here

        }
        catch (SQLException sqe)
        {
            if (query.getObjectManager().getOMFContext().getApi().equalsIgnoreCase("JDO"))
            {
                throw new JDODataStoreException(LOCALISER.msg("052601", sqe));
            }
            else
            {
                throw new JPOXDataStoreException(LOCALISER.msg("052601", sqe));
            }
View Full Code Here

                        size = rs.getRow();
                    }
                }
                catch (SQLException sqle)
                {
                    throw new JDODataStoreException(LOCALISER.msg("052601", sqle));
                }
            }
            else
            {
                // TODO Support other ways of determining the size of the result set (e.g SELECT COUNT(*) ...)
View Full Code Here

TOP

Related Classes of javax.jdo.JDODataStoreException

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.