Package org.apache.jdo.model

Examples of org.apache.jdo.model.ModelException


     * @return a new JDOReference instance bound to this JDOField
     * @exception ModelException if impossible
     */
    public JDOReference createJDOReference() throws ModelException {
        if (relationship != null)
            throw new ModelException(
                msg.msg("EXC_RelationshipAlreadyDefined", //NOI18N
                        getName(), relationship));
        return super.createJDOReference();
    }
View Full Code Here


     * @return a new JDOCollection instance bound to this JDOField
     * @exception ModelException if impossible
     */
    public JDOCollection createJDOCollection() throws ModelException {
        if (relationship != null)
            throw new ModelException(
                msg.msg("EXC_RelationshipAlreadyDefined", //NOI18N
                        getName(), relationship));
        return super.createJDOCollection();
    }
View Full Code Here

     * @return a new JDOArray instance bound to this JDOField
     * @exception ModelException if impossible
     */
    public JDOArray createJDOArray() throws ModelException {
        if (relationship != null)
            throw new ModelException(
                msg.msg("EXC_RelationshipAlreadyDefined", //NOI18N
                        getName(), relationship));
        return super.createJDOArray();
    }
View Full Code Here

     * @return a new JDOMap instance bound to this JDOField
     * @exception ModelException if impossible
     */
    public JDOMap createJDOMap() throws ModelException {
        if (relationship != null)
            throw new ModelException(
                msg.msg("EXC_RelationshipAlreadyDefined", //NOI18N
                        getName(), relationship));
        return super.createJDOMap();
    }
View Full Code Here

    public void setJavaField(JavaField javaField) throws ModelException {
        if (javaField instanceof JavaProperty) {
            this.javaField = javaField;
        }
        else {
            throw new ModelException(msg.msg(
                "EXC_InvalidJavaFieldForJDOProperty", javaField)); //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 instanceof JDOField) && fieldNumbersCalculated) {
            throw new ModelException(
                msg.msg("EXC_CannotRemoveJDOField")); //NOI18N
        }

        // nullify JDOField arrays storing calculated field lists
        declaredManagedFields = null;
View Full Code Here

     * @param name the name of the field
     * @exception ModelException if impossible
     */
    public JDOField createJDOField(String name) throws ModelException {
        if ((getDeclaredField(name) == null) && fieldNumbersCalculated) {
            throw new ModelException(
                msg.msg("EXC_CannotCreateJDOField")); //NOI18N
        }
        return super.createJDOField(name);
    }
View Full Code Here

    public void setJavaField(JavaField javaField) throws ModelException {
        if (javaField instanceof JavaProperty) {
            this.javaField = javaField;
        }
        else {
            throw new ModelException(msg.msg(
                "EXC_InvalidJavaFieldForJDOProperty", javaField)); //NOI18N
        }
    }
View Full Code Here

    public void setPersistenceModifier (int persistenceModifier)
        throws ModelException {
        if (nameHasJDOPrefix() &&
            (persistenceModifier == PersistenceModifier.PERSISTENT ||
             persistenceModifier == PersistenceModifier.TRANSACTIONAL)) {
            throw new ModelException(
                msg.msg("EXC_IllegalJDOPrefix", getName())); //NOI18N
        }
        this.persistenceModifier = persistenceModifier;
    }
View Full Code Here

        String name, JDOClass declaringClass, JDOField associatedJDOField)
        throws ModelException {
        super(name, declaringClass);
        this.associatedJDOField = associatedJDOField;
        if (associatedJDOField == null) {
            throw new ModelException(
                msg.msg("EXC_InvalidNullAssociatedJDOField")); //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.