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
- Version:
- %I%
- Author:
- raccah
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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.Constructs aModelValidationExceptionof typeERRORwith the specified detail message andnullas the offending object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the error message string of this throwable object.protected static final ResourceBundleGet 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 Details
-
ERROR
public static final int ERRORConstant representing an error.- See Also:
-
WARNING
public static final int WARNINGConstant representing a warning.- See Also:
-
-
Constructor Details
-
ModelValidationException
public ModelValidationException()Creates newModelValidationExceptionof typeERRORwithout a detail message and withnullas the offending object. -
ModelValidationException
Constructs aModelValidationExceptionof typeERRORwith the specified detail message andnullas the offending object.- Parameters:
msg- the detail message.
-
ModelValidationException
Constructs aModelValidationExceptionof typeERRORwith the specified offending object and no detail message.- Parameters:
offendingObject- the offending object.
-
ModelValidationException
Constructs aModelValidationExceptionof typeERRORwith the specified detail message and offending object.- Parameters:
offendingObject- the offending object.msg- the detail message.
-
ModelValidationException
Constructs aModelValidationExceptionof the specified type with the specified detail message and offending object.
-
-
Method Details
-
getMessages
- Returns:
- I18N message handler for this element
-
getOffendingObject
Get the offending object -- the one being validated when the problem occurred. -
getType
public int getType() -
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
-