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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ModelValidationException()
Creates newModelValidationException
of typeERROR
without a detail message and withnull
as the offending object.ModelValidationException(int errorType, Object offendingObject, String msg)
Constructs aModelValidationException
of the specified type with the specified detail message and offending object.ModelValidationException(Object offendingObject)
Constructs aModelValidationException
of typeERROR
with the specified offending object and no detail message.ModelValidationException(Object offendingObject, String msg)
Constructs aModelValidationException
of typeERROR
with the specified detail message and offending object.ModelValidationException(String msg)
Constructs aModelValidationException
of typeERROR
with the specified detail message andnull
as the offending object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
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 newModelValidationException
of typeERROR
without a detail message and withnull
as the offending object.
-
ModelValidationException
public ModelValidationException(String msg)
Constructs aModelValidationException
of typeERROR
with the specified detail message andnull
as the offending object.- Parameters:
msg
- the detail message.
-
ModelValidationException
public ModelValidationException(Object offendingObject)
Constructs aModelValidationException
of typeERROR
with the specified offending object and no detail message.- Parameters:
offendingObject
- the offending object.
-
ModelValidationException
public ModelValidationException(Object offendingObject, String msg)
Constructs aModelValidationException
of typeERROR
with the specified detail message and offending object.- Parameters:
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()
-
getMessage
public String getMessage()
Returns the error message string of this throwable object.- Overrides:
getMessage
in classThrowable
- Returns:
- the error message string of this
ModelValidationException
, prepended with the warning string if the type isWARNING
-
-