Top Description Fields Constructors Methods
org.eclipse.persistence.exceptions

public Class ConversionException

extends EclipseLinkException
Class Inheritance
Imports
java.util.*, org.eclipse.persistence.exceptions.i18n.ExceptionMessageGenerator

Purpose: Conversion exceptions such as method or class not defined will raise this exception.

Field Summary

Modifier and TypeField and Description
protected Class<?>
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
protected transient Object
public static final int
Inherited from org.eclipse.persistence.exceptions.EclipseLinkException:
CRerrorCodehasBeenLoggedindentationStringinternalExceptionsessionshouldPrintInternalException

Constructor Summary

AccessConstructor and 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

Modifier and TypeMethod and Description
public static ConversionException
couldNotBeConverted(Object mapping, Object descriptor, ConversionException exception)

public static ConversionException
couldNotBeConverted(Object object, Class<?> javaClass)

public static ConversionException
couldNotBeConverted(Object object, Class<?> javaClass, Exception exception)

public static ConversionException
couldNotBeConvertedToClass(Object object, Class<?> javaClass, Exception exception)

public static ConversionException
public static ConversionException
couldNotTranslatePropertiesIntoObject(Object object, String propertyName, String propertyValue, Exception cause)

public Class<?>
getClassToConvertTo()

PUBLIC: Return the class to convert to.

public Object
getSourceObject()

PUBLIC: Return the object for which the problem was detected.

public static ConversionException
public static ConversionException
incorrectDateTimeFormat(String dateTimeString, Class<?> classBeingConvertedTo)

public static ConversionException
public static ConversionException
public static ConversionException
public void
setClassToConvertTo(Class<?> classToConvertTo)

INTERNAL: Set the class to convert to.

public void
setSourceObject(Object sourceObject)

INTERNAL: Set the object for which the problem was detected.

Inherited from org.eclipse.persistence.exceptions.EclipseLinkException:
crgetErrorCodegetIndentationStringgetInternalExceptiongetMessagegetSessiongetUnformattedMessagehasBeenLoggedprintStackTraceprintStackTraceprintStackTracesetErrorCodesetHasBeenLoggedsetIndentationStringsetInternalExceptionsetSessionsetShouldPrintInternalExceptionshouldPrintInternalExceptiontoString

Field Detail

classToConvertToback to summary
protected Class<?> classToConvertTo
COULD_NOT_BE_CONVERTEDback to summary
public static final int COULD_NOT_BE_CONVERTED
COULD_NOT_BE_CONVERTED_EXTENDEDback to summary
public static final int COULD_NOT_BE_CONVERTED_EXTENDED
COULD_NOT_BE_CONVERTED_TO_CLASSback to summary
public static final int COULD_NOT_BE_CONVERTED_TO_CLASS
COULD_NOT_CONVERT_TO_BYTE_ARRAYback to summary
public static final int COULD_NOT_CONVERT_TO_BYTE_ARRAY
INCORRECT_DATE_FORMATback to summary
public static final int INCORRECT_DATE_FORMAT
INCORRECT_DATE_TIME_FORMATback to summary
public static final int INCORRECT_DATE_TIME_FORMAT
INCORRECT_TIME_FORMATback to summary
public static final int INCORRECT_TIME_FORMAT
INCORRECT_TIMESTAMP_FORMATback to summary
public static final int INCORRECT_TIMESTAMP_FORMAT
sourceObjectback to summary
protected transient Object sourceObject
UNABLE_TO_SET_PROPERTIESback to summary
public static final int UNABLE_TO_SET_PROPERTIES

Constructor Detail

ConversionExceptionback to summary
protected ConversionException()

INTERNAL: TopLink exceptions should only be thrown by TopLink. This constructor is only for error message scripting.

ConversionExceptionback to summary
protected ConversionException(String message, Object sourceObject, Class<?> classToConvertTo, Exception exception)

INTERNAL: TopLink exceptions should only be thrown by TopLink.

Method Detail

couldNotBeConvertedback to summary
public static ConversionException couldNotBeConverted(Object mapping, Object descriptor, ConversionException exception)
couldNotBeConvertedback to summary
public static ConversionException couldNotBeConverted(Object object, Class<?> javaClass)
couldNotBeConvertedback to summary
public static ConversionException couldNotBeConverted(Object object, Class<?> javaClass, Exception exception)
couldNotBeConvertedToClassback to summary
public static ConversionException couldNotBeConvertedToClass(Object object, Class<?> javaClass, Exception exception)
couldNotConvertToByteArrayback to summary
public static ConversionException couldNotConvertToByteArray(Object object)
couldNotTranslatePropertiesIntoObjectback to summary
public static ConversionException couldNotTranslatePropertiesIntoObject(Object object, String propertyName, String propertyValue, Exception cause)
getClassToConvertToback to summary
public Class<?> getClassToConvertTo()

PUBLIC: Return the class to convert to.

getSourceObjectback to summary
public Object getSourceObject()

PUBLIC: Return the object for which the problem was detected.

incorrectDateFormatback to summary
public static ConversionException incorrectDateFormat(String dateString)
incorrectDateTimeFormatback to summary
public static ConversionException incorrectDateTimeFormat(String dateTimeString, Class<?> classBeingConvertedTo)
incorrectDateTimeFormatback to summary
public static ConversionException incorrectDateTimeFormat(String dateTimeString)
incorrectTimeFormatback to summary
public static ConversionException incorrectTimeFormat(String timeString)
incorrectTimestampFormatback to summary
public static ConversionException incorrectTimestampFormat(String timestampString)
setClassToConvertToback to summary
public void setClassToConvertTo(Class<?> classToConvertTo)

INTERNAL: Set the class to convert to.

setSourceObjectback to summary
public void setSourceObject(Object sourceObject)

INTERNAL: Set the object for which the problem was detected.