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 SummaryFieldsModifier 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.EclipseLinkExceptionCR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedINTERNAL: 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 SummaryModifier 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.EclipseLinkExceptioncr, getErrorCode, getIndentationString, getInternalException, getMessage, getSession, getUnformattedMessage, hasBeenLogged, printStackTrace, printStackTrace, printStackTrace, setErrorCode, setHasBeenLogged, setIndentationString, setInternalException, setSession, setShouldPrintInternalException, shouldPrintInternalException, toStringMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace
- 
Field Details- 
classToConvertTo
- 
sourceObject
- 
COULD_NOT_BE_CONVERTEDpublic static final int COULD_NOT_BE_CONVERTED- See Also:
 
- 
COULD_NOT_BE_CONVERTED_EXTENDEDpublic static final int COULD_NOT_BE_CONVERTED_EXTENDED- See Also:
 
- 
INCORRECT_DATE_FORMATpublic static final int INCORRECT_DATE_FORMAT- See Also:
 
- 
INCORRECT_TIME_FORMATpublic static final int INCORRECT_TIME_FORMAT- See Also:
 
- 
INCORRECT_TIMESTAMP_FORMATpublic static final int INCORRECT_TIMESTAMP_FORMAT- See Also:
 
- 
COULD_NOT_CONVERT_TO_BYTE_ARRAYpublic static final int COULD_NOT_CONVERT_TO_BYTE_ARRAY- See Also:
 
- 
COULD_NOT_BE_CONVERTED_TO_CLASSpublic static final int COULD_NOT_BE_CONVERTED_TO_CLASS- See Also:
 
- 
INCORRECT_DATE_TIME_FORMATpublic static final int INCORRECT_DATE_TIME_FORMAT- See Also:
 
- 
UNABLE_TO_SET_PROPERTIESpublic static final int UNABLE_TO_SET_PROPERTIES- See Also:
 
 
- 
- 
Constructor Details- 
ConversionExceptionprotected ConversionException()INTERNAL: TopLink exceptions should only be thrown by TopLink. This constructor is only for error message scripting.
- 
ConversionExceptionprotected ConversionException(String message, Object sourceObject, Class<?> classToConvertTo, Exception exception) INTERNAL: TopLink exceptions should only be thrown by TopLink.
 
- 
- 
Method Details- 
couldNotBeConvertedpublic static ConversionException couldNotBeConverted(Object mapping, Object descriptor, ConversionException exception) 
- 
couldNotBeConverted
- 
couldNotBeConvertedpublic static ConversionException couldNotBeConverted(Object object, Class<?> javaClass, Exception exception) 
- 
couldNotBeConvertedToClasspublic static ConversionException couldNotBeConvertedToClass(Object object, Class<?> javaClass, Exception exception) 
- 
couldNotTranslatePropertiesIntoObjectpublic static ConversionException couldNotTranslatePropertiesIntoObject(Object object, String propertyName, String propertyValue, Exception cause) 
- 
couldNotConvertToByteArray
- 
incorrectDateFormat
- 
incorrectTimeFormat
- 
incorrectTimestampFormat
- 
incorrectDateTimeFormatpublic static ConversionException incorrectDateTimeFormat(String dateTimeString, Class<?> classBeingConvertedTo) 
- 
incorrectDateTimeFormat
- 
getClassToConvertToPUBLIC: Return the class to convert to.
- 
getSourceObjectPUBLIC: Return the object for which the problem was detected.
- 
setClassToConvertToINTERNAL: Set the class to convert to.
- 
setSourceObjectINTERNAL: Set the object for which the problem was detected.
 
-