Package org.apache.jdo.model

Examples of org.apache.jdo.model.ModelFatalException


        this.loadXMLMetadataDefault = loadXMLMetadataDefault;
        try {
            javaModel.setJDOModel(this);
        }
        catch (ModelException ex) {
            throw new ModelFatalException(msg.msg("ERR_CannotSetJDOModel"), ex); //NOI18N
        }
    }
View Full Code Here


    private JDOClass lookupXMLMetadata(JDOClass jdoClass)
        throws ModelFatalException, NullPointerException {
        String className = jdoClass.getName();
        JDOClass activated = lookupXMLMetadata(className);
        if (activated == null) {
            throw new ModelFatalException(msg.msg(
                "EXC_MissingJDOMetadata", className)); //NOI18N
        }
        else if (activated != jdoClass) {
            throw new ModelFatalException(msg.msg(
                "ERR_MultipleJDOClassInstances", className)); //NOI18N
        }
        return jdoClass;
    }
View Full Code Here

                    xmlLogger.debug("  XML " + resource +  //NOI18N
                                    " found, start parsing ..."); //NOI18N
                parser.parse(new InputSource(new InputStreamReader(stream)));
            }
            catch (SAXException ex) {
                throw new ModelFatalException(
                    msg.msg("EXC_XMLError", resource), ex); //NOI18N
            }
            catch (ParserConfigurationException ex) {
                throw new ModelFatalException(
                    msg.msg("EXC_XMLError", resource), ex); //NOI18N
            }
            catch (IOException ex) {
                throw new ModelFatalException(
                    msg.msg("EXC_XMLError", resource), ex); //NOI18N
            }
            finally {
                try { stream.close(); }
                catch (IOException ex) {
View Full Code Here

            if (index == -1) {
                // not qualified => try to resolve it
                JavaType type = TypeSupport.resolveType(getDeclaringModel(),
                    declaredObjectIdClassName, getPackagePrefix());
                if (type == null) {
                    throw new ModelFatalException(
                        msg.msg("EXC_CannotResolveObjectIdClass", //NOI18N
                                declaredObjectIdClassName, getName()));
                }
                this.declaredObjectIdClassName = type.getName();
            }
View Full Code Here

            if (index == -1) {
                // not qualified => try to resolve it
                JavaType type = TypeSupport.resolveType(getDeclaringModel(),
                    pcSuperclassName, getPackagePrefix());
                if (type == null) {
                    throw new ModelFatalException(
                        msg.msg("EXC_CannotResolvePCSuperClass", //NOI18N
                                pcSuperclassName, getName()));
                }
                this.pcSuperclassName = type.getName();
            }
View Full Code Here

        String name = getPersistenceCapableSuperclassName();
        if (pcSuperclassName != null) {
            JavaType type = TypeSupport.resolveType(
                getDeclaringModel(), pcSuperclassName, getPackagePrefix());
            if (type == null) {
                throw new ModelFatalException(
                    msg.msg("EXC_CannotResolvePCSuperClass", //NOI18N
                            pcSuperclassName, getName()));
            }
            JDOClass jdoClass = type.getJDOClass();
            // pcSuperclassName might be unqualified
View Full Code Here

        super(name, declaringClass);
        this.getter = getter;
        this.setter = setter;
        this.type = type;
        if ((getter == null) && (setter == null))
            throw new ModelFatalException(
                msg.msg("EXC_MissingGetterAndSetter", //NOI18N
                         name, declaringClass.getName()));
    }
View Full Code Here

            BeanInfo beanInfo = Introspector.getBeanInfo(
                clazz, clazz.getSuperclass());
            return beanInfo.getPropertyDescriptors();
        }
        catch (IntrospectionException ex) {
            throw new ModelFatalException(msg.msg(
                "ERR_CannotIntrospectClass", clazz.getName()), ex); //NOI18N
        }
    }
View Full Code Here

                try {
                    javaModel = createJavaModel(key);
                    modelCache.put(key, javaModel);
                }
                catch (ModelException ex) {
                    throw new ModelFatalException(
                        msg.msg("EXC_CannotCreateJavaModel"), ex); //NOI18N
                }
            }
            return javaModel;
         }
View Full Code Here

     * @exception ModelFatalException this factory does not support this
     * short cut or does not support the specified type description.
     */
    public JavaType getJavaType(Object typeDesc)
    {
        throw new ModelFatalException(msg.msg(
            "EXC_MethodNotSupported", this.getClass().getName(), //NOI18N
            "getJavaType")); //NOI18N
    }
View Full Code Here

TOP

Related Classes of org.apache.jdo.model.ModelFatalException

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.