com.sun.jdo.api.persistence.model.util
Class ModelValidationException

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

public class ModelValidationException
extends ModelException

Version:
%I%
Author:
raccah
See Also:
Serialized Form

Field Summary
static int ERROR
          Constant representing an error.
static int WARNING
          Constant representing a warning.
 
Constructor Summary
ModelValidationException()
          Creates new ModelValidationException of type ERROR without a detail message and with null as the offending object.
ModelValidationException(int errorType, Object offendingObject, String msg)
          Constructs a ModelValidationException of the specified type with the specified detail message and offending object.
ModelValidationException(Object offendingObject)
          Constructs a ModelValidationException of type ERROR with the specified offending object and no detail message.
ModelValidationException(Object offendingObject, String msg)
          Constructs a ModelValidationException of type ERROR with the specified detail message and offending object.
ModelValidationException(String msg)
          Constructs a ModelValidationException of type ERROR with the specified detail message and null as the offending object.
 
Method Summary
 String getMessage()
          Returns the error message string of this throwable object.
protected static ResourceBundle getMessages()
           
 Object getOffendingObject()
          Get the offending object -- the one being validated when the problem occurred.
 int getType()
          Get the type -- one of ERROR or WARNING.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERROR

public static final int ERROR
Constant representing an error.

See Also:
Constant Field Values

WARNING

public static final int WARNING
Constant representing a warning.

See Also:
Constant Field Values
Constructor Detail

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 Detail

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


Copyright © 2012 GlassFish Community. All Rights Reserved.