Package org.datanucleus.exceptions

Examples of org.datanucleus.exceptions.NucleusUserException


        }
        catch (StreamCorruptedException e)
        {
            String msg = "StreamCorruptedException: object is corrupted";
            NucleusLogger.DATASTORE.error(msg);
            throw new NucleusUserException(msg, e).setFatal();
        }
        catch (IOException e)
        {
            String msg = "IOException: error when reading object";
            NucleusLogger.DATASTORE.error(msg);
            throw new NucleusUserException(msg, e).setFatal();
        }
        catch (ClassNotFoundException e)
        {
            String msg = "ClassNotFoundException: error when creating object";
            NucleusLogger.DATASTORE.error(msg);
            throw new NucleusUserException(msg, e).setFatal();
        }
    }
View Full Code Here


     */
    public void setWrapperFunction(String wrapperFunction, int wrapperMode)
    {
        if (wrapperFunction != null && wrapperMode == WRAPPER_FUNCTION_SELECT && wrapperFunction.indexOf("?") < 0)
        {
            throw new NucleusUserException("Wrapping function must have one ? (question mark). e.g. SQRT(?)");
        }
        this.wrapperFunction[wrapperMode] = wrapperFunction;
    }
View Full Code Here

                    {
                        uniKey.addDatastoreField(col);
                    }
                    else
                    {
                        throw new NucleusUserException("Unique key on join-table " + this + " has column " +
                            colmds[i].getName() + " that is not found");
                    }
                }
                candidateKeys.add(uniKey);
            }
View Full Code Here

        assertIsUninitialized();

        MapMetaData mapmd = mmd.getMap();
        if (mapmd == null)
        {
            throw new NucleusUserException(LOCALISER.msg("057017",mmd));
        }

        PrimaryKeyMetaData pkmd = (mmd.getJoinMetaData() != null ? mmd.getJoinMetaData().getPrimaryKeyMetaData() : null);
        boolean pkColsSpecified = (pkmd != null && pkmd.getColumnMetaData() != null);
        boolean pkRequired = requiresPrimaryKey();
View Full Code Here

                }
            }
           
            if (!found)
            {
                throw new NucleusUserException(LOCALISER.msg("057040", toString(), colName));
            }
        }
    }
View Full Code Here

                    {
                        cols = new Column[columns.size()];
                    }
                    if (cols[index] != null)
                    {
                        throw new NucleusUserException("Column index " + index +
                            " has been specified multiple times : " + cols[index] + " and " + col);
                    }
                    cols[index] = col;
                }
            }
View Full Code Here

    public String getSequenceCreateStmt(String sequence_name,
            Integer min, Integer max, Integer start, Integer increment, Integer cache_size)
    {
        if (sequence_name == null)
        {
            throw new NucleusUserException(LOCALISER.msg("051028"));
        }

        StringBuffer stmt = new StringBuffer("CREATE SEQUENCE ");
        stmt.append(sequence_name);
        if (min != null)
View Full Code Here

     **/
    public String getSequenceNextStmt(String sequence_name)
    {
        if (sequence_name == null)
        {
            throw new NucleusUserException(LOCALISER.msg("051028"));
        }

        StringBuffer stmt=new StringBuffer("SELECT nextval('");
        stmt.append(sequence_name);
        stmt.append("')");
View Full Code Here

        // Check if this is a valid class to map to its own table
        if (cmd.getInheritanceMetaData().getStrategy() != InheritanceStrategy.NEW_TABLE &&
            cmd.getInheritanceMetaData().getStrategy() != InheritanceStrategy.COMPLETE_TABLE)
        {
            throw new NucleusUserException(LOCALISER.msg("057003", cmd.getFullClassName(),
                cmd.getInheritanceMetaData().getStrategy().toString())).setFatal();
        }

        highestMemberNumber = cmd.getNoOfManagedMembers() + cmd.getNoOfInheritedManagedMembers();
       
View Full Code Here

                        storeMgr.resolveIdentifierMacro(im, clr);
                    }
   
                    public void onParameterMacro(MacroString.ParameterMacro pm)
                    {
                        throw new NucleusUserException(LOCALISER.msg("057033", cmd.getFullClassName(), pm));
                    }
                }, clr
            );
        }
    }
View Full Code Here

TOP

Related Classes of org.datanucleus.exceptions.NucleusUserException

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.