Package org.apache.jdo.model

Examples of org.apache.jdo.model.ModelException


    }

    /** Throws ModelException. */
    public JDOCollection createJDOCollection()
        throws ModelException {
        throw new ModelException(
            msg.msg("EXC_CannotModifyJDOProperty")); //NOI18N
    }
View Full Code Here


    }

    /** Throws ModelException. */
    public JDOArray createJDOArray()
        throws ModelException {
        throw new ModelException(
            msg.msg("EXC_CannotModifyJDOProperty")); //NOI18N
    }
View Full Code Here

    }
   
    /** Throws ModelException. */
    public JDOMap createJDOMap()
        throws ModelException {
        throw new ModelException(
            msg.msg("EXC_CannotModifyJDOProperty")); //NOI18N
    }
View Full Code Here

     * @param member the member to be removed
     * @exception ModelException if impossible
     */
    public void removeDeclaredMember(JDOMember member) throws ModelException {
        if (member == null) {
            throw new ModelException(
                msg.msg("EXC_InvalidMember", "null")); //NOI18N
        }
        String name = member.getName();
        if (member instanceof JDOField) {
            JDOField field = (JDOField) member;
            // nullify mappedByName which removes mappedBy info
            field.setMappedByName(null);
            // nullify relationship which updates its inverse
            field.setRelationship(null);
            if (associatedProperties.containsValue(member)) {
                associatedProperties.remove(name);
            }
            else {
                declaredFields.remove(name);
            }

            // There might be a property with the field to be removed as
            // associated JDOField => remove the property too.
            JDOProperty prop = getAssociatedProperty(field);
            if (prop != null) {
                removeDeclaredMember(prop);
            }
        }
        else if (member instanceof JDOClass) {
            // inner class
            declaredClasses.remove(name);
        }
        else {
            throw new ModelException(
                msg.msg("EXC_InvalidMember", name)); //NOI18N
        }
    }
View Full Code Here

        if (field == null) {
            field = newJDOFieldInstance(name);
            declaredFields.put(name, field);
        }
        else if (field instanceof JDOProperty) {
            throw new ModelException(
                msg.msg("EXC_ExistingJDOProperty", name)); //NOI18N
        }
        return field;
    }
View Full Code Here

        }
        else if (field instanceof JDOProperty) {
            property = (JDOProperty) field;
        }
        else {
            throw new ModelException(
                msg.msg("EXC_ExistingJDOField", name)); //NOI18N
        }
        return property;
    }
View Full Code Here

            property = newJDOPropertyInstance(name, associatedJDOField);
            associatedProperties.put(name, property);
        }
        else {
            if (property.getAssociatedJDOField() != associatedJDOField) {
                throw new ModelException(
                    msg.msg("EXC_ExistingJDOAssociatedProperty", //NOI18N
                            name, associatedJDOField));
            }
        }
        return property;
View Full Code Here

     */
    public JavaModel createJavaModel(Object key)
        throws ModelException
    {
        if ((key != null) && (!(key instanceof ClassLoader)))
            throw new ModelException(msg.msg("EXC_InvalidJavaModelKey", //NOI18N
                                             key.getClass().getName()));
       
        ClassLoader classLoader = (ClassLoader)key;
        JavaModel javaModel = newJavaModelInstance(classLoader);

View Full Code Here

     */
    public JavaModel createJavaModel(Object key)
        throws ModelException
    {
        if ((key != null) && (!(key instanceof ClassLoader)))
            throw new ModelException(msg.msg("EXC_InvalidJavaModelKey", //NOI18N
                                             key.getClass().getName()));
       
        ClassLoader classLoader = (ClassLoader)key;
        JavaModel javaModel = newJavaModelInstance(classLoader);

View Full Code Here

    }

    /** Throws ModelException. */
    public void setMappedByName(String mappedByName)
        throws ModelException {
        throw new ModelException (
            msg.msg("EXC_CannotModifyJDOProperty")); //NOI18N
    }
View Full Code Here

TOP

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

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.