public static ConversionException couldNotBeConverted(Object object, Class javaClass) { Class objectClass = null; if (object!=null) { objectClass = object.getClass(); } Object[] args = { object, objectClass, javaClass }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, COULD_NOT_BE_CONVERTED, args); ConversionException conversionException = new ConversionException(message, object, javaClass, null); conversionException.setErrorCode(COULD_NOT_BE_CONVERTED); return conversionException; }
public static ConversionException couldNotBeConverted(Object object, Class javaClass, Exception exception) { Class objectClass = null; if (object!=null) { objectClass = object.getClass(); } Object[] args = { object, objectClass, javaClass }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, COULD_NOT_BE_CONVERTED, args); ConversionException conversionException = new ConversionException(message, object, javaClass, exception); conversionException.setErrorCode(COULD_NOT_BE_CONVERTED); return conversionException; }
public static ConversionException couldNotBeConverted(Object object, Class javaClass) { Object[] args = { object, object.getClass(), javaClass }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, COULD_NOT_BE_CONVERTED, args); ConversionException conversionException = new ConversionException(message, object, javaClass, null); conversionException.setErrorCode(COULD_NOT_BE_CONVERTED); return conversionException; }
public static ConversionException couldNotBeConverted(Object object, Class javaClass, Exception exception) { Object[] args = { object, object.getClass(), javaClass }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, COULD_NOT_BE_CONVERTED, args); ConversionException conversionException = new ConversionException(message, object, javaClass, exception); conversionException.setErrorCode(COULD_NOT_BE_CONVERTED); return conversionException; }
public static ConversionException couldNotTranslatePropertiesIntoObject(Object object, String propertyName, String propertyValue, Exception cause) { // Unable to set {0} properties [{1}] into [{2}] Object[] args = { propertyName, propertyValue, object}; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, UNABLE_TO_SET_PROPERTIES, args); ConversionException conversionException = new ConversionException(message, object, object.getClass(), cause); conversionException.setErrorCode(UNABLE_TO_SET_PROPERTIES); return conversionException; }
public static ConversionException couldNotTranslatePropertiesIntoObject(Object object, String propertyName, String propertyValue, Exception cause) { // Unable to set {0} properties [{1}] into [{2}] Object[] args = { propertyName, propertyValue, object}; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, UNABLE_TO_SET_PROPERTIES, args); ConversionException conversionException = new ConversionException(message, object, object.getClass(), cause); conversionException.setErrorCode(UNABLE_TO_SET_PROPERTIES); return conversionException; }
public static ConversionException couldNotBeConvertedToClass(Object object, Class javaClass, Exception exception) { Object[] args = { object, object.getClass(), javaClass }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, COULD_NOT_BE_CONVERTED_TO_CLASS, args); ConversionException conversionException = new ConversionException(message, object, javaClass, exception); conversionException.setErrorCode(COULD_NOT_BE_CONVERTED_TO_CLASS); return conversionException; }
public static ConversionException couldNotBeConverted(Object object, Class javaClass) { Class objectClass = null; if (object!=null) { objectClass = object.getClass(); } Object[] args = { object, objectClass, javaClass }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, COULD_NOT_BE_CONVERTED, args); ConversionException conversionException = new ConversionException(message, object, javaClass, null); conversionException.setErrorCode(COULD_NOT_BE_CONVERTED); return conversionException; }
public static ConversionException couldNotBeConvertedToClass(Object object, Class javaClass, Exception exception) { Object[] args = { object, object.getClass(), javaClass }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, COULD_NOT_BE_CONVERTED_TO_CLASS, args); ConversionException conversionException = new ConversionException(message, object, javaClass, exception); conversionException.setErrorCode(COULD_NOT_BE_CONVERTED_TO_CLASS); return conversionException; }
public static ConversionException incorrectTimeFormat(String timeString) { Object[] args = { timeString }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, INCORRECT_TIME_FORMAT, args); ConversionException conversionException = new ConversionException(message, timeString, java.sql.Time.class, null); conversionException.setErrorCode(INCORRECT_TIME_FORMAT); return conversionException; }
public static ConversionException couldNotConvertToByteArray(Object object) { Object[] args = { object }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, COULD_NOT_CONVERT_TO_BYTE_ARRAY, args); ConversionException conversionException = new ConversionException(message, object, byte[].class, null); conversionException.setErrorCode(COULD_NOT_CONVERT_TO_BYTE_ARRAY); return conversionException; }
public static ConversionException incorrectTimeFormat(String timeString) { Object[] args = { timeString }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, INCORRECT_TIME_FORMAT, args); ConversionException conversionException = new ConversionException(message, timeString, java.sql.Time.class, null); conversionException.setErrorCode(INCORRECT_TIME_FORMAT); return conversionException; }
public static ConversionException incorrectTimestampFormat(String timestampString) { Object[] args = { timestampString }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, INCORRECT_TIMESTAMP_FORMAT, args); ConversionException conversionException = new ConversionException(message, timestampString, java.sql.Timestamp.class, null); conversionException.setErrorCode(INCORRECT_TIMESTAMP_FORMAT); return conversionException; }
public static ConversionException incorrectDateFormat(String dateString) { Object[] args = { dateString }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, INCORRECT_DATE_FORMAT, args); ConversionException conversionException = new ConversionException(message, dateString, java.sql.Date.class, null); conversionException.setErrorCode(INCORRECT_DATE_FORMAT); return conversionException; }
public static ConversionException incorrectDateTimeFormat(String dateTimeString, Class classBeingConvertedTo) { Object[] args = { dateTimeString }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, INCORRECT_DATE_TIME_FORMAT, args); ConversionException conversionException = new ConversionException(message, dateTimeString, classBeingConvertedTo, null); conversionException.setErrorCode(INCORRECT_DATE_TIME_FORMAT); return conversionException; }
public static ConversionException incorrectDateFormat(String dateString) { Object[] args = { dateString }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, INCORRECT_DATE_FORMAT, args); ConversionException conversionException = new ConversionException(message, dateString, java.sql.Date.class, null); conversionException.setErrorCode(INCORRECT_DATE_FORMAT); return conversionException; }
public static ConversionException incorrectDateTimeFormat(String dateTimeString, Class classBeingConvertedTo) { Object[] args = { dateTimeString }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, INCORRECT_DATE_TIME_FORMAT, args); ConversionException conversionException = new ConversionException(message, dateTimeString, classBeingConvertedTo, null); conversionException.setErrorCode(INCORRECT_DATE_TIME_FORMAT); return conversionException; }
public static ConversionException incorrectTimeFormat(String timeString) { Object[] args = { timeString }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, INCORRECT_TIME_FORMAT, args); ConversionException conversionException = new ConversionException(message, timeString, java.sql.Time.class, null); conversionException.setErrorCode(INCORRECT_TIME_FORMAT); return conversionException; }
public static ConversionException couldNotBeConverted(Object mapping, Object descriptor, ConversionException exception) { Object sourceObject = exception.getSourceObject(); Class javaClass = exception.getClassToConvertTo(); Exception original = (Exception)exception.getInternalException(); Object[] args = { sourceObject, sourceObject.getClass(), mapping, descriptor, javaClass }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, COULD_NOT_BE_CONVERTED_EXTENDED, args); ConversionException conversionException = new ConversionException(message, sourceObject, javaClass, original); conversionException.setStackTrace(exception.getStackTrace()); conversionException.setErrorCode(COULD_NOT_BE_CONVERTED_EXTENDED); return conversionException; }
public static ConversionException couldNotBeConverted(Object mapping, Object descriptor, ConversionException exception) { Object sourceObject = exception.getSourceObject(); Class javaClass = exception.getClassToConvertTo(); Exception original = (Exception)exception.getInternalException(); Object[] args = { sourceObject, sourceObject.getClass(), mapping, descriptor, javaClass }; String message = ExceptionMessageGenerator.buildMessage(ConversionException.class, COULD_NOT_BE_CONVERTED_EXTENDED, args); ConversionException conversionException = new ConversionException(message, sourceObject, javaClass, original); conversionException.setStackTrace(exception.getStackTrace()); conversionException.setErrorCode(COULD_NOT_BE_CONVERTED_EXTENDED); return conversionException; }