Class ModelValidationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.sun.jdo.api.persistence.model.ModelException
com.sun.jdo.api.persistence.model.util.ModelValidationException
All Implemented Interfaces:
Serializable

public class ModelValidationException extends ModelException
Version:
%I%
Author:
raccah
See Also:
  • Field Details

    • ERROR

      public static final int ERROR
      Constant representing an error.
      See Also:
    • WARNING

      public static final int WARNING
      Constant representing a warning.
      See Also:
  • Constructor Details

    • ModelValidationException

      public ModelValidationException()
      Creates new ModelValidationException of type ERROR without a detail message and with null as the offending object.
    • ModelValidationException

      public ModelValidationException(String msg)
      Constructs a ModelValidationException of type ERROR with the specified detail message and null as the offending object.
      Parameters:
      msg - the detail message.
    • ModelValidationException

      public ModelValidationException(Object offendingObject)
      Constructs a ModelValidationException of type ERROR with the specified offending object and no detail message.
      Parameters:
      offendingObject - the offending object.
    • ModelValidationException

      public ModelValidationException(Object offendingObject, String msg)
      Constructs a ModelValidationException of type ERROR with the specified detail message and offending object.
      Parameters:
      offendingObject - the offending object.
      msg - the detail message.
    • ModelValidationException

      public ModelValidationException(int errorType, Object offendingObject, String msg)
      Constructs a ModelValidationException of the specified type with the specified detail message and offending object.
      Parameters:
      errorType - the type -- one of ERROR or WARNING.
      offendingObject - the offending object.
      msg - the detail message.
  • Method Details

    • getMessages

      protected static final ResourceBundle getMessages()
      Returns:
      I18N message handler for this element
    • getOffendingObject

      public Object getOffendingObject()
      Get the offending object -- the one being validated when the problem occurred.
    • getType

      public int getType()
      Get the type -- one of ERROR or WARNING.
    • getMessage

      public String getMessage()
      Returns the error message string of this throwable object.
      Overrides:
      getMessage in class Throwable
      Returns:
      the error message string of this ModelValidationException, prepended with the warning string if the type is WARNING