Package org.datanucleus.exceptions

Examples of org.datanucleus.exceptions.NucleusException


                    "org.datanucleus.store.rdbms.sql_tablenamer", "name", namingSchema, "class",
                    null, null);
            }
            catch (Exception e)
            {
                throw new NucleusException("Attempt to find/instantiate SQL table namer " + namingSchema +
                    " threw an exception", e);
            }
            tableNamerByName.put(namingSchema, namer);
        }
View Full Code Here


     */
    public void setOrdering(SQLExpression[] exprs, boolean[] descending)
    {
        if (exprs.length != descending.length)
        {
            throw new NucleusException(LOCALISER.msg("052503", "" + exprs.length, "" + descending.length)).setFatal();
        }

        invalidateStatement();

        orderingExpressions = exprs;
View Full Code Here

        if (unions != null)
        {
            // Add on any UNIONed statements
            if (!dba.supportsOption(RDBMSAdapter.UNION_SYNTAX))
            {
                throw new NucleusException(LOCALISER.msg("052504", "UNION")).setFatal();
            }

            Iterator<SQLStatement> unionIter = unions.iterator();
            while (unionIter.hasNext())
            {
View Full Code Here

            }

            if (joinsToAdd.size() == origSize)
            {
                // Somehow the user has ended up with a circular pattern of joins
                throw new NucleusException("Unable to reorder joins for SQL statement since circular!" +
                    " Consider reordering the components in the WHERE clause :" +
                    " affected joins - " + StringUtils.collectionToString(joinsToAdd));
            }
        }
        requiresJoinReorder = false;
View Full Code Here

     */
    public SQLExpression getExpression(SQLExpression expr, List args)
    {
        if (!(expr instanceof TemporalExpression))
        {
            throw new NucleusException(LOCALISER.msg("060001", "getMonth()", expr));
        }

        SQLExpression one = ExpressionUtils.getLiteralForOne(stmt);
        RDBMSStoreManager storeMgr = stmt.getRDBMSManager();
        JavaTypeMapping mapping2 = storeMgr.getMappingManager().getMapping(String.class);
View Full Code Here

            SQLExpression sqlExpr = (SQLExpression)storeMgr.getNucleusContext().getPluginManager().createExecutableExtension(
                "org.datanucleus.store.rdbms.sql_expression", "mapping-class", mapping.getClass().getName(),
                "expression-class", EXPR_CREATION_ARG_TYPES, args);
            if (sqlExpr == null)
            {
                throw new NucleusException(LOCALISER.msg("060004", mapping.getClass().getName()));
            }

            expressionClassByMappingName.put(mapping.getClass().getName(), sqlExpr.getClass());
            return sqlExpr;
        }
        catch (Exception e)
        {
            String msg = LOCALISER.msg("060005", mapping.getClass().getName());
            NucleusLogger.QUERY.error(msg, e);
            throw new NucleusException(msg, e);
        }
    }
View Full Code Here

                SQLExpression sqlExpr = (SQLExpression) storeMgr.getNucleusContext().getPluginManager().createExecutableExtension(
                    "org.datanucleus.store.rdbms.sql_expression", "mapping-class", mapping.getClass().getName(),
                    "literal-class", LIT_CREATION_ARG_TYPES, args);
                if (sqlExpr == null)
                {
                    throw new NucleusException(LOCALISER.msg("060006", mapping.getClass().getName()));
                }

                literalClassByMappingName.put(mapping.getClass().getName(), sqlExpr.getClass());
                return sqlExpr;
            }
        }
        catch (Exception e)
        {
            NucleusLogger.QUERY.error("Exception creating SQLLiteral for mapping " + mapping.getClass().getName(), e);
            throw new NucleusException(LOCALISER.msg("060007", mapping.getClass().getName()));
        }
    }
View Full Code Here

                SQLExpression sqlExpr = (SQLExpression) storeMgr.getNucleusContext().getPluginManager().createExecutableExtension(
                    "org.datanucleus.store.rdbms.sql_expression", "mapping-class", mapping.getClass().getName(),
                    "literal-class", argTypes, args);
                if (sqlExpr == null)
                {
                    throw new NucleusException(LOCALISER.msg("060006", mapping.getClass().getName()));
                }
                return sqlExpr;
            }
        }
        catch (Exception e)
        {
            NucleusLogger.QUERY.error("Exception creating SQLLiteral for mapping " + mapping.getClass().getName(), e);
            throw new NucleusException(LOCALISER.msg("060007", mapping.getClass().getName()));
        }
    }
View Full Code Here

            return operation.getExpression(expr, expr2);
        }
        catch (ClassNotResolvedException cnre)
        {
            throw new NucleusException(LOCALISER.msg("060013", sqlOperationClassName));
        }
        catch (InstantiationException e)
        {
            throw new NucleusException(LOCALISER.msg("060014", sqlOperationClassName), e);
        }
        catch (IllegalAccessException e)
        {
            throw new NucleusException(LOCALISER.msg("060014", sqlOperationClassName), e);
        }
    }
View Full Code Here

        externalFKDiscrimStmtMappings = consumer.getExternalFKDiscrimStatementMapping();
        externalOrderStmtMappings = consumer.getExternalOrderStatementMapping();
        pkFieldNumbers = consumer.getPrimaryKeyFieldNumbers();
        if (table.getIdentityType() == IdentityType.APPLICATION && pkFieldNumbers.length < 1 && !hasIdentityColumn)
        {
          throw new NucleusException(LOCALISER.msg("052200", cmd.getFullClassName())).setFatal();
        }
        insertFieldNumbers = consumer.getInsertFieldNumbers();
        retrievedStmtMappings = consumer.getReachableStatementMappings();
        reachableFieldNumbers = consumer.getReachableFieldNumbers();
        relationFieldNumbers = consumer.getRelationFieldNumbers();
View Full Code Here

TOP

Related Classes of org.datanucleus.exceptions.NucleusException

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.