Module org.eclipse.persistence.core
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
FieldsModifier and TypeFieldDescriptionprotected Class<?> static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected Objectstatic final intFields inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
CR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedINTERNAL: TopLink exceptions should only be thrown by TopLink.protectedConversionException(String message, Object sourceObject, Class<?> classToConvertTo, Exception exception) INTERNAL: TopLink exceptions should only be thrown by TopLink. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConversionExceptioncouldNotBeConverted(Object object, Class<?> javaClass) static ConversionExceptioncouldNotBeConverted(Object object, Class<?> javaClass, Exception exception) static ConversionExceptioncouldNotBeConverted(Object mapping, Object descriptor, ConversionException exception) static ConversionExceptioncouldNotBeConvertedToClass(Object object, Class<?> javaClass, Exception exception) static ConversionExceptioncouldNotConvertToByteArray(Object object) static ConversionExceptioncouldNotTranslatePropertiesIntoObject(Object object, String propertyName, String propertyValue, Exception cause) Class<?> PUBLIC: Return the class to convert to.PUBLIC: Return the object for which the problem was detected.static ConversionExceptionincorrectDateFormat(String dateString) static ConversionExceptionincorrectDateTimeFormat(String dateTimeString) static ConversionExceptionincorrectDateTimeFormat(String dateTimeString, Class<?> classBeingConvertedTo) static ConversionExceptionincorrectTimeFormat(String timeString) static ConversionExceptionincorrectTimestampFormat(String timestampString) voidsetClassToConvertTo(Class<?> classToConvertTo) INTERNAL: Set the class to convert to.voidsetSourceObject(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, toStringMethods 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.
-