Package org.datanucleus.exceptions

Examples of org.datanucleus.exceptions.NucleusDataStoreException


                mconn.release();
            }
        }
        catch (SQLException e)
        {
            throw new NucleusDataStoreException(LOCALISER.msg("056006", stmt),e);
        }
        catch (MappedDatastoreException e)
        {
            throw new NucleusDataStoreException(LOCALISER.msg("056006", stmt),e);
        }
    }
View Full Code Here


            }
        }
        catch (SQLException e)
        {
            NucleusLogger.DATASTORE.error(e);
            throw new NucleusDataStoreException(localiser.msg("056012", removeAllStmt), e);
        }

        try
        {
            // Shift the remaining indices to remove the holes in ordering
            boolean batched = storeMgr.allowsBatching();

            ExecutionContext ec = sm.getExecutionContext();
            ManagedConnection mconn = storeMgr.getConnection(ec);
            try
            {
                for (int i = 0; i < currentListSize; i++)
                {
                    // Find the number of deleted indexes above this index
                    int shift = 0;
                    boolean removed = false;
                    for (int j = 0; j < indices.length; j++)
                    {
                        if (indices[j] == i)
                        {
                            removed = true;
                            break;
                        }
                        if (indices[j] < i)
                        {
                            shift++;
                        }
                    }
                    if (!removed && shift > 0)
                    {
                        internalShift(sm, mconn, batched, i, -1 * shift, (i == currentListSize - 1), ecs);
                    }
                }
            }
            finally
            {
                mconn.release();
            }
        }
        catch (MappedDatastoreException e)
        {
            NucleusLogger.DATASTORE.error(e);
            throw new NucleusDataStoreException(localiser.msg("056012", removeAllStmt), e);
        }

        boolean dependent = ecs.getOwnerMemberMetaData().getCollection().isDependentElement();
        if (ecs.getOwnerMemberMetaData().isCascadeRemoveOrphans())
        {
View Full Code Here

                mconn.release();
            }
        }
        catch (SQLException e)
        {
            throw new NucleusDataStoreException(localiser.msg("056015", setStmt), e);
        }
    }
View Full Code Here

                mconn.release();
            }
        }
        catch (MappedDatastoreException e)
        {
            throw new NucleusDataStoreException(localiser.msg("056009", addStmt), e);
        }
        catch (SQLException e)
        {
            throw new NucleusDataStoreException(localiser.msg("056009", addStmt), e);
        }
        return true;
    }
View Full Code Here

                mconn.release();
            }
        }
        catch (SQLException e)
        {
            throw new NucleusDataStoreException(LOCALISER.msg("056006", stmt),e);
        }
        catch (MappedDatastoreException e)
        {
            throw new NucleusDataStoreException(LOCALISER.msg("056006", stmt),e);
        }
    }
View Full Code Here

        ResultSet rs = dmd.getTables(catalog_name,schema_name,table_name,null);
        try
        {
            if (!rs.next())
            {
                throw new NucleusDataStoreException(LOCALISER.msg("057027",identifier));
            }

            schemaDetails[0] = rs.getString(1);
            schemaDetails[1] = rs.getString(2);
        }
View Full Code Here

            st.close();
        }
        catch (SQLException e)
        {
            e.printStackTrace();
            throw new NucleusDataStoreException(e.getMessage(), e);
        }
    }
View Full Code Here

            st.close();
        }
        catch (SQLException e)
        {
            e.printStackTrace();
            throw new NucleusDataStoreException(e.getMessage(), e);
        }
    }
View Full Code Here

        super(metadata);

        if (datastoreMajorVersion < 7)
        {
            // TODO Localise this message
            throw new NucleusDataStoreException("PostgreSQL version is " + datastoreMajorVersion + '.' + datastoreMinorVersion + ", 7.0 or later required");
        }
        else if (datastoreMajorVersion == 7)
        {
            if (datastoreMinorVersion <= 2)
            {
View Full Code Here

                    columnNames[i] = (StringUtils.isWhitespace(colLabel) ? colName : colLabel);
                }
            }
            catch(SQLException ex)
            {
                throw new NucleusDataStoreException("Error obtaining objects",ex);
            }
        }

        // A). Process persistent types
        PersistentTypeMapping[] persistentTypes = queryResultMetaData.getPersistentTypeMappings();
View Full Code Here

TOP

Related Classes of org.datanucleus.exceptions.NucleusDataStoreException

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.