Package com.sun.jdo.api.persistence.model

Examples of com.sun.jdo.api.persistence.model.ModelException


   */
  public void setUpdateAction (int action) throws ModelException
  {
    if ((action < NONE_ACTION) || (action > AGGREGATE_ACTION))
    {
      throw new ModelException(I18NHelper.getMessage(getMessages(),
        "jdo.relationship.update_action_invalid", action))// NOI18N
    }

    getRelationshipImpl().setUpdateAction(action);
  }
View Full Code Here


   */
  public void setDeleteAction (int action) throws ModelException
  {
    if ((action < NONE_ACTION) || (action > AGGREGATE_ACTION))
    {
      throw new ModelException(I18NHelper.getMessage(getMessages(),
        "jdo.relationship.delete_action_invalid", action))// NOI18N
    }

    getRelationshipImpl().setDeleteAction(action);
  }
View Full Code Here

   */
  public void setLowerBound (int lowerBound) throws ModelException
  {
    if ((lowerBound > getUpperBound()) || (lowerBound < 0))
    {
      throw new ModelException(I18NHelper.getMessage(getMessages(),
        "jdo.relationship.lower_cardinality_invalid"));    // NOI18N
    }

    getRelationshipImpl().setLowerBound(lowerBound);
  }
View Full Code Here

   */
  public void setUpperBound (int upperBound) throws ModelException
  {
    if ((upperBound < getLowerBound()) || (upperBound <= 0))
    {
      throw new ModelException(I18NHelper.getMessage(getMessages(),
        "jdo.relationship.upper_cardinality_invalid"));    // NOI18N
    }

    getRelationshipImpl().setUpperBound(upperBound);
  }
View Full Code Here

      if (!hasPrefix || (!nameSuffix.equalsIgnoreCase("Key") &&   // NOI18N
        !nameSuffix.equalsIgnoreCase(".OID")          // NOI18N
        && !nameSuffix.equalsIgnoreCase("$OID")))        // NOI18N
      {
        throw new ModelException(I18NHelper.getMessage(getMessages(),
          "jdo.class.key_class_invalid",             // NOI18N
          new Object[]{name, className}));
      }
    }
View Full Code Here

          throw new ModelVetoException(e);
        }
      }
      else
      {
        throw new ModelException(I18NHelper.getMessage(getMessages(),
          "mapping.column.column_defined", columnName))// NOI18N
      }
    }
    else
    {
      throw new ModelException(I18NHelper.getMessage(getMessages(),
        "mapping.element.null_argument"));          // NOI18N
    }
  }
View Full Code Here

  {
    if (column instanceof ColumnPairElement)
    {
      if (!getAssociatedColumns().isEmpty())
      {
        throw new ModelException(I18NHelper.getMessage(getMessages(),
          "mapping.column.associated_columns_defined",     // NOI18N
          NameUtil.getRelativeMemberName(
          column.getName().getFullName())));
      }

      super.addColumn(column);
    }
    else
    {
      throw new ModelException(I18NHelper.getMessage(getMessages(),
        "mapping.column.column_invalid",       // NOI18N
        NameUtil.getRelativeMemberName(
        column.getName().getFullName())));
    }
  }
View Full Code Here

      {
        fireVetoableChange(PROP_ASSOCIATED_COLUMNS, null, null);

        if (!getAssociatedColumns().remove(columnName))
        {
          throw new ModelException(
            I18NHelper.getMessage(getMessages(),
            "mapping.element.element_not_removed",    // NOI18N
            columnName));
        }
View Full Code Here

        // this part was blank -- do we want an error or skip here?
      }
    }
    else
    {
      throw new ModelException(I18NHelper.getMessage(getMessages(),
        "mapping.element.null_argument"));        // NOI18N
    }
  }
View Full Code Here

      {
        fireVetoableChange(PROP_KEY_COLUMNS, null, null);

        if (!getKey().remove(columnName))
        {
          throw new ModelException(
            I18NHelper.getMessage(getMessages(),
            "mapping.element.element_not_removed",    // NOI18N
            columnName));
        }
View Full Code Here

TOP

Related Classes of com.sun.jdo.api.persistence.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.