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
public class ConversionException extends EclipseLinkException
Purpose: Conversion exceptions such as method or class not defined will raise this exception.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Class
classToConvertTo
static int
COULD_NOT_BE_CONVERTED
static int
COULD_NOT_BE_CONVERTED_EXTENDED
static int
COULD_NOT_BE_CONVERTED_TO_CLASS
static int
COULD_NOT_CONVERT_TO_BYTE_ARRAY
static int
INCORRECT_DATE_FORMAT
static int
INCORRECT_DATE_TIME_FORMAT
static int
INCORRECT_TIME_FORMAT
static int
INCORRECT_TIMESTAMP_FORMAT
protected Object
sourceObject
static int
UNABLE_TO_SET_PROPERTIES
-
Fields inherited from class org.eclipse.persistence.exceptions.EclipseLinkException
CR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConversionException()
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
-
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 Detail
-
classToConvertTo
protected Class classToConvertTo
-
sourceObject
protected transient Object sourceObject
-
COULD_NOT_BE_CONVERTED
public static final int COULD_NOT_BE_CONVERTED
- See Also:
- Constant Field Values
-
COULD_NOT_BE_CONVERTED_EXTENDED
public static final int COULD_NOT_BE_CONVERTED_EXTENDED
- See Also:
- Constant Field Values
-
INCORRECT_DATE_FORMAT
public static final int INCORRECT_DATE_FORMAT
- See Also:
- Constant Field Values
-
INCORRECT_TIME_FORMAT
public static final int INCORRECT_TIME_FORMAT
- See Also:
- Constant Field Values
-
INCORRECT_TIMESTAMP_FORMAT
public static final int INCORRECT_TIMESTAMP_FORMAT
- See Also:
- Constant Field Values
-
COULD_NOT_CONVERT_TO_BYTE_ARRAY
public static final int COULD_NOT_CONVERT_TO_BYTE_ARRAY
- See Also:
- Constant Field Values
-
COULD_NOT_BE_CONVERTED_TO_CLASS
public static final int COULD_NOT_BE_CONVERTED_TO_CLASS
- See Also:
- Constant Field Values
-
INCORRECT_DATE_TIME_FORMAT
public static final int INCORRECT_DATE_TIME_FORMAT
- See Also:
- Constant Field Values
-
UNABLE_TO_SET_PROPERTIES
public static final int UNABLE_TO_SET_PROPERTIES
- See Also:
- Constant Field Values
-
-
Method Detail
-
couldNotBeConverted
public static ConversionException couldNotBeConverted(Object mapping, Object descriptor, ConversionException exception)
-
couldNotBeConverted
public static ConversionException couldNotBeConverted(Object object, Class javaClass)
-
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
public static ConversionException couldNotConvertToByteArray(Object object)
-
incorrectDateFormat
public static ConversionException incorrectDateFormat(String dateString)
-
incorrectTimeFormat
public static ConversionException incorrectTimeFormat(String timeString)
-
incorrectTimestampFormat
public static ConversionException incorrectTimestampFormat(String timestampString)
-
incorrectDateTimeFormat
public static ConversionException incorrectDateTimeFormat(String dateTimeString, Class classBeingConvertedTo)
-
incorrectDateTimeFormat
public static ConversionException incorrectDateTimeFormat(String dateTimeString)
-
getClassToConvertTo
public Class getClassToConvertTo()
PUBLIC: Return the class to convert to.
-
getSourceObject
public Object getSourceObject()
PUBLIC: Return the object for which the problem was detected.
-
setClassToConvertTo
public void setClassToConvertTo(Class classToConvertTo)
INTERNAL: Set the class to convert to.
-
setSourceObject
public void setSourceObject(Object sourceObject)
INTERNAL: Set the object for which the problem was detected.
-
-