Package com.sun.jdo.api.persistence.support

Examples of com.sun.jdo.api.persistence.support.JDOFatalInternalException


                              int operation,
                              Object value) {
        int info = getOperationInfo(operation);

        if ((info & OPINFO_ILLEGAL) > 0) {
            throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                    "core.constraint.illegalop", "" + operation)); // NOI18N
        } else if ((info & OPINFO_FIELD_REQUIRED) > 0 && name == null) {
            throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                    "core.constraint.fieldrequired", "" + operation)); // NOI18N
        } else if ((info & OPINFO_FIELD_DISALLOWED) > 0 && name != null) {
            throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                    "core.constraint.fielddisallowed", "" + operation)); // NOI18N
        } else if ((info & OPINFO_VAL_REQUIRED) > 0 && value == null) {
            throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                    "core.constraint.valrequired", "" + operation)); // NOI18N
        } else if ((info & OPINFO_VAL_DISALLOWED) > 0 && value != null) {
            throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                    "core.constraint.valdisallowed", "" + operation)); // NOI18N
        }
        if ((info & OPINFO_VAL_IS_PCOUNT) > 0) {
            if (name != null) {
                constraint.addField(name, null);
View Full Code Here


        if (value instanceof ParameterInfo) {
            ParameterInfo parameterInfo = (ParameterInfo)value;
            constraint.addParamIndex(parameterInfo.getIndex(), parameterInfo.getType(),
                    getLocalFieldDesc(parameterInfo.getAssociatedField()));
        } else {
            throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                    "core.constraint.illegalParameterInfo")); // NOI18N
        }
    }
View Full Code Here

            // Generate the text for the select statements.
            ArrayList statements = plan.getStatements();

            // Sanity check.
            if (statements.size() > 1) {
                throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                        "sqlstore.retrievedesc.stmntsnotjoined")); // NOI18N
            }
        }
        return plan;
    }
View Full Code Here

                        retVal = resultData.getObject(index);
                      break;
               default :
                        //If we reach here, a new type has been added to FieldTypeEnumeration.
                        //Please update this method to handle new type.
                        throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                            "sqlstore.resultdesc.unknownfieldtype",resultType) );
            }   //switch
        } catch (SQLException e) {
            if(logger.isLoggable(Logger.WARNING) ) {
                Object items[] =
View Full Code Here

            }
            return pm.findOrCreateStateManager(oid, config.getPersistenceCapableClass());

        } catch (Exception e) {
            // RESOLVE...
            throw new JDOFatalInternalException(e.getMessage());
        }
    }
View Full Code Here

    public void markUsed(JQLAST variable, String dependendVar)
    {
        String name = variable.getText();
        VarInfo entry = (VarInfo)varInfos.get(name);
        if (entry == null)
            throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                "jqlc.variabletable.markused.varnotfound", //NOI18N
                name));
        entry.used.add(variable);
        if (dependendVar != null)
        {
            VarInfo dependendVarInfo = (VarInfo)varInfos.get(dependendVar);
            if (dependendVarInfo.dependsOn != null)
                throw new JDOFatalInternalException(I18NHelper.getMessage(
                    messages,
                    "jqlc.variabletable.markused.multidep", //NOI18N
                    dependendVar, dependendVarInfo.dependsOn, name));
            dependendVarInfo.dependsOn = name;
        }
View Full Code Here

    public void markConstraint(JQLAST variable, JQLAST expr)
    {
        String name = variable.getText();
        VarInfo entry = (VarInfo)varInfos.get(name);
        if (entry == null)
            throw new JDOFatalInternalException(I18NHelper.getMessage(
                messages,
                "jqlc.variabletable.markconstraint.varnotfound", //NOI18N
                name));
        String old = (entry.constraint==null ? null : entry.constraint.getText());
        if ((old != null) && !old.equals(expr.getText()))
View Full Code Here

                throw new NoSuchElementException();

            // Check whether the current node has the token type
            // PARAMETER_DEF => throw exception if not.
            if (current.getType() != JQLParser.PARAMETER_DEF)
                throw new JDOFatalInternalException(I18NHelper.getMessage(
                    messages,
                    "jqlc.jdoqlparameterdeclarationparser.next.wrongtoken", //NOI18N
                    current.getType()));

            // get string repr of parameter type node
View Full Code Here

            throw new JDOUnsupportedOptionException(
                I18NHelper.getMessage(messages, "jqlc.jqlc.checkcandidates.memorycollection")); //NOI18N
       
        Class candidatePCClass = ((ExtentCollection)candidateCollection).getPersistenceCapableClass();
        if (candidatePCClass == null)
            throw new JDOFatalInternalException(
                I18NHelper.getMessage(messages, "jqlc.jqlc.checkcandidates.nullpc")); //NOI18N
       
        if (!candidateClass.getName().equals(candidatePCClass.getName()))
            throw new JDOQueryException(
                I18NHelper.getMessage(messages, "jqlc.jqlc.checkcandidates.mismatch", candidateClass.getName())); //NOI18N
View Full Code Here

        TableDesc tableDesc = _config.findTableDesc(tableElement);

        if (tableDesc == null) {

            if (tableElement != null) {
               throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                        "core.configuration.classnotmappedtotable", // NOI18N
                        _config.getPersistenceCapableClass().getName(),
                        tableElement.getName().getName()));
            } else {
                throw new JDOFatalInternalException(I18NHelper.getMessage(messages,
                         "core.configuration.classnotmapped", // NOI18N
                         _config.getPersistenceCapableClass().getName()));

            }
        }
View Full Code Here

TOP

Related Classes of com.sun.jdo.api.persistence.support.JDOFatalInternalException

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.