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 newModelValidationExceptionof typeERRORwithout a detail message and withnullas the offending object.ModelValidationException(int errorType, Object offendingObject, String msg)Constructs aModelValidationExceptionof the specified type with the specified detail message and offending object.ModelValidationException(Object offendingObject)Constructs aModelValidationExceptionof typeERRORwith the specified offending object and no detail message.ModelValidationException(Object offendingObject, String msg)Constructs aModelValidationExceptionof typeERRORwith the specified detail message and offending object.ModelValidationException(String msg)Constructs aModelValidationExceptionof typeERRORwith the specified detail message andnullas the offending object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage()Returns the error message string of this throwable object.protected static ResourceBundlegetMessages()ObjectgetOffendingObject()Get the offending object -- the one being validated when the problem occurred.intgetType()-
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 newModelValidationExceptionof typeERRORwithout a detail message and withnullas the offending object.
-
ModelValidationException
public ModelValidationException(String msg)
Constructs aModelValidationExceptionof typeERRORwith the specified detail message andnullas the offending object.- Parameters:
msg- the detail message.
-
ModelValidationException
public ModelValidationException(Object offendingObject)
Constructs aModelValidationExceptionof typeERRORwith the specified offending object and no detail message.- Parameters:
offendingObject- the offending object.
-
ModelValidationException
public ModelValidationException(Object offendingObject, String msg)
Constructs aModelValidationExceptionof typeERRORwith 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:
getMessagein classThrowable- Returns:
- the error message string of this
ModelValidationException, prepended with the warning string if the type isWARNING
-
-