Package org.datanucleus.exceptions

Examples of org.datanucleus.exceptions.NucleusException


     */
    public SQLExpression getExpression(SQLExpression expr, List args)
    {
        if (args == null || args.size() != 1)
        {
            throw new NucleusException(LOCALISER.msg("060003", "endsWith", "StringExpression", 0,
                "StringExpression/CharacterExpression/ParameterLiteral"));
        }

        StringExpression strExpr1 = (StringExpression)expr;
        StringExpression strExpr2 = (StringExpression)args.get(0);
View Full Code Here


                this.mapKeyLiteral = new MapKeyLiteral(stmt, mapping, value);
            }
        }
        else
        {
            throw new NucleusException("Cannot create " + this.getClass().getName() +
                " for value of type " + (value != null ? value.getClass().getName() : null));
        }
    }
View Full Code Here

            {
                // Class must be using "subclass-table" (no table of its own) so find where it is
                AbstractClassMetaData[] subcmds = storeMgr.getClassesManagingTableForClass(acmd, clr);
                if (subcmds == null || subcmds.length > 1)
                {
                    throw new NucleusException("Attempt to generate SQL statement for instances of " +
                        candidateType.getName() +
                        " but has no table of its own and not single subclass with table so unsupported");
                }
                else
                {
View Full Code Here

                this.value = mapValue;
                setStatement();
            }
            else
            {
                throw new NucleusException("Cannot create " + this.getClass().getName() +
                    " for value of type " + (value != null ? value.getClass().getName() : null));
            }
        }
View Full Code Here

                // Use converter
                this.value = converter.toString(value);
            }
            else
            {
                throw new NucleusException("Cannot create " + this.getClass().getName() +
                    " for value of type " + (value != null ? value.getClass().getName() : null));
            }
        }

        if (parameterName != null)
View Full Code Here

     */
    public int[] select(SQLExpression expr, String alias)
    {
        if (expr == null)
        {
            throw new NucleusException("Expression to select is null");
        }

        invalidateStatement();

        if (expr instanceof AggregateNumericExpression || expr instanceof AggregateTemporalExpression)
View Full Code Here

     */
    public int[] select(SQLTable table, JavaTypeMapping mapping, String alias, boolean applyToUnions)
    {
        if (mapping == null)
        {
            throw new NucleusException("Mapping to select is null");
        }
        else if (table == null)
        {
            // Default to the primary table if not specified
            table = primaryTable;
        }
        if (mapping.getDatastoreContainer() != table.getTable())
        {
            throw new NucleusException("Table being selected from (\"" + table.getTable() +
                "\") is inconsistent with the column selected (\"" + mapping.getDatastoreContainer() + "\")");
        }

        invalidateStatement();

View Full Code Here

     */
    public int select(SQLTable table, DatastoreField column, String alias)
    {
        if (column == null)
        {
            throw new NucleusException("Column to select is null");
        }
        else if (table == null)
        {
            // Default to the primary table if not specified
            table = primaryTable;
        }
        if (column.getDatastoreContainerObject() != table.getTable())
        {
            throw new NucleusException("Table being selected from (\"" + table.getTable() +
                "\") is inconsistent with the column selected (\"" + column.getDatastoreContainerObject() + "\")");
        }

        invalidateStatement();

View Full Code Here

            SQLTable targetTable, JavaTypeMapping targetMapping, JavaTypeMapping targetParentMapping,
            Object[] discrimValues)
    {
        if (tables == null)
        {
            throw new NucleusException("tables not set in statement!");
        }
        if (tables.containsValue(targetTable))
        {
            // Already have a join to this table
            // What if we have a cross join, and want to change to inner join?
View Full Code Here

        if (sourceMapping != null && targetMapping != null)
        {
            // Join condition(s) - INNER, LEFT OUTER, RIGHT OUTER joins
            if (sourceMapping.getNumberOfDatastoreMappings() != targetMapping.getNumberOfDatastoreMappings())
            {
                throw new NucleusException("Cannot join from " + sourceMapping + " to " + targetMapping +
                    " since they have different numbers of datastore columns!");
            }

            SQLExpressionFactory factory = rdbmsMgr.getSQLExpressionFactory();
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.