Class ConversionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.eclipse.persistence.exceptions.EclipseLinkException
org.eclipse.persistence.exceptions.ConversionException
- All Implemented Interfaces:
Serializable
Purpose: Conversion exceptions such as method or class not defined will raise this exception.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected Class
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
protected Object
static final int
Fields inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
CR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException
-
Constructor Summary
ModifierConstructorDescriptionprotected
INTERNAL: TopLink exceptions should only be thrown by TopLink.protected
ConversionException
(String message, Object sourceObject, Class classToConvertTo, Exception exception) INTERNAL: TopLink exceptions should only be thrown by TopLink. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConversionException
couldNotBeConverted
(Object object, Class javaClass) static ConversionException
couldNotBeConverted
(Object object, Class javaClass, Exception exception) static ConversionException
couldNotBeConverted
(Object mapping, Object descriptor, ConversionException exception) static ConversionException
couldNotBeConvertedToClass
(Object object, Class javaClass, Exception exception) static ConversionException
couldNotConvertToByteArray
(Object object) static ConversionException
couldNotTranslatePropertiesIntoObject
(Object object, String propertyName, String propertyValue, Exception cause) PUBLIC: Return the class to convert to.PUBLIC: Return the object for which the problem was detected.static ConversionException
incorrectDateFormat
(String dateString) static ConversionException
incorrectDateTimeFormat
(String dateTimeString) static ConversionException
incorrectDateTimeFormat
(String dateTimeString, Class classBeingConvertedTo) static ConversionException
incorrectTimeFormat
(String timeString) static ConversionException
incorrectTimestampFormat
(String timestampString) void
setClassToConvertTo
(Class classToConvertTo) INTERNAL: Set the class to convert to.void
setSourceObject
(Object sourceObject) INTERNAL: Set the object for which the problem was detected.Methods inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
cr, getErrorCode, getIndentationString, getInternalException, getMessage, getSession, getUnformattedMessage, hasBeenLogged, printStackTrace, printStackTrace, printStackTrace, setErrorCode, setHasBeenLogged, setIndentationString, setInternalException, setSession, setShouldPrintInternalException, shouldPrintInternalException, toString
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace
-
Field Details
-
classToConvertTo
-
sourceObject
-
COULD_NOT_BE_CONVERTED
public static final int COULD_NOT_BE_CONVERTED- See Also:
-
COULD_NOT_BE_CONVERTED_EXTENDED
public static final int COULD_NOT_BE_CONVERTED_EXTENDED- See Also:
-
INCORRECT_DATE_FORMAT
public static final int INCORRECT_DATE_FORMAT- See Also:
-
INCORRECT_TIME_FORMAT
public static final int INCORRECT_TIME_FORMAT- See Also:
-
INCORRECT_TIMESTAMP_FORMAT
public static final int INCORRECT_TIMESTAMP_FORMAT- See Also:
-
COULD_NOT_CONVERT_TO_BYTE_ARRAY
public static final int COULD_NOT_CONVERT_TO_BYTE_ARRAY- See Also:
-
COULD_NOT_BE_CONVERTED_TO_CLASS
public static final int COULD_NOT_BE_CONVERTED_TO_CLASS- See Also:
-
INCORRECT_DATE_TIME_FORMAT
public static final int INCORRECT_DATE_TIME_FORMAT- See Also:
-
UNABLE_TO_SET_PROPERTIES
public static final int UNABLE_TO_SET_PROPERTIES- See Also:
-
-
Constructor Details
-
ConversionException
protected ConversionException()INTERNAL: TopLink exceptions should only be thrown by TopLink. This constructor is only for error message scripting. -
ConversionException
protected ConversionException(String message, Object sourceObject, Class classToConvertTo, Exception exception) INTERNAL: TopLink exceptions should only be thrown by TopLink.
-
-
Method Details
-
couldNotBeConverted
public static ConversionException couldNotBeConverted(Object mapping, Object descriptor, ConversionException exception) -
couldNotBeConverted
-
couldNotBeConverted
public static ConversionException couldNotBeConverted(Object object, Class javaClass, Exception exception) -
couldNotBeConvertedToClass
public static ConversionException couldNotBeConvertedToClass(Object object, Class javaClass, Exception exception) -
couldNotTranslatePropertiesIntoObject
public static ConversionException couldNotTranslatePropertiesIntoObject(Object object, String propertyName, String propertyValue, Exception cause) -
couldNotConvertToByteArray
-
incorrectDateFormat
-
incorrectTimeFormat
-
incorrectTimestampFormat
-
incorrectDateTimeFormat
public static ConversionException incorrectDateTimeFormat(String dateTimeString, Class classBeingConvertedTo) -
incorrectDateTimeFormat
-
getClassToConvertTo
PUBLIC: Return the class to convert to. -
getSourceObject
PUBLIC: Return the object for which the problem was detected. -
setClassToConvertTo
INTERNAL: Set the class to convert to. -
setSourceObject
INTERNAL: Set the object for which the problem was detected.
-