public static QueryException cannotAddElement(Object anObject, Object aContainer, Exception ex) { Object[] args = { anObject, anObject.getClass(), aContainer.getClass() }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CANNOT_ADD_ELEMENT, args)); queryException.setErrorCode(CANNOT_ADD_ELEMENT); queryException.setInternalException(ex); return queryException; }
public static QueryException cannotAddElement(Object anObject, Object aContainer, Exception ex) { Object[] args = { anObject, anObject.getClass(), aContainer.getClass() }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CANNOT_ADD_ELEMENT, args)); queryException.setErrorCode(CANNOT_ADD_ELEMENT); queryException.setInternalException(ex); return queryException; }
public static QueryException calledMethodThrewException(java.lang.reflect.Method aMethod, Object object, Exception ex) { Object[] args = { aMethod, object, object.getClass() }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CALLED_METHOD_THREW_EXCEPTION, args)); queryException.setErrorCode(CALLED_METHOD_THREW_EXCEPTION); queryException.setInternalException(ex); return queryException; }
public static QueryException methodInvocationFailed(java.lang.reflect.Method aMethod, Object anObject, Exception ex) { Object[] args = { aMethod, anObject, anObject.getClass() }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, METHOD_INVOCATION_FAILED, args)); queryException.setErrorCode(METHOD_INVOCATION_FAILED); queryException.setInternalException(ex); return queryException; }
public static QueryException couldNotInstantiateContainerClass(Class aClass, Exception exception) { Object[] args = { aClass.toString() }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, COULD_NOT_INSTANTIATE_CONTAINER_CLASS, args)); queryException.setErrorCode(COULD_NOT_INSTANTIATE_CONTAINER_CLASS); queryException.setInternalException(exception); return queryException; }
public static QueryException methodInvocationFailed(java.lang.reflect.Method aMethod, Object anObject, Exception ex) { Object[] args = { aMethod, anObject, anObject.getClass() }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, METHOD_INVOCATION_FAILED, args)); queryException.setErrorCode(METHOD_INVOCATION_FAILED); queryException.setInternalException(ex); return queryException; }
public static QueryException calledMethodThrewException(java.lang.reflect.Method aMethod, Object object, Exception ex) { Object[] args = { aMethod, object, object.getClass() }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CALLED_METHOD_THREW_EXCEPTION, args)); queryException.setErrorCode(CALLED_METHOD_THREW_EXCEPTION); queryException.setInternalException(ex); return queryException; }
public static QueryException exceptionWhileReadingMapKey(Object object, Exception ex) { Object[] args = { object, ex }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, EXCEPTION_WHILE_READING_MAP_KEY, args)); queryException.setErrorCode(EXCEPTION_WHILE_READING_MAP_KEY); queryException.setInternalException(ex); return queryException; }
public static QueryException unableToSetRedirectorOnQueryFromHint(DatabaseQuery query, String hint, String redirectorClass, Exception ex) { Object[] args = {hint, redirectorClass }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, UNABLE_TO_SET_REDIRECTOR_FROM_HINT, args), query); queryException.setInternalException(ex); queryException.setErrorCode(UNABLE_TO_SET_REDIRECTOR_FROM_HINT); return queryException; }
public static QueryException reflectiveCallOnTopLinkClassFailed(String className, Exception e) { Object[] args = { className }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, REFLECTIVE_CALL_ON_TOPLINK_CLASS_FAILED, args)); queryException.setErrorCode(REFLECTIVE_CALL_ON_TOPLINK_CLASS_FAILED); queryException.setInternalException(e); return queryException; }
public static QueryException errorInstantiatedClassForQueryHint(Exception exception, DatabaseQuery query, Class theClass, String hint) { Object[] args = { theClass, hint }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, ERROR_INSTANTIATING_CLASS_FOR_QUERY_HINT, args), query); queryException.setErrorCode(ERROR_INSTANTIATING_CLASS_FOR_QUERY_HINT); queryException.setInternalException(exception); return queryException; }
public static QueryException unableToSetRedirectorOnQueryFromHint(DatabaseQuery query, String hint, String redirectorClass, Exception ex) { Object[] args = {hint, redirectorClass }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, UNABLE_TO_SET_REDIRECTOR_FROM_HINT, args), query); queryException.setInternalException(ex); queryException.setErrorCode(UNABLE_TO_SET_REDIRECTOR_FROM_HINT); return queryException; }
public static QueryException redirectionMethodError(Exception exception, DatabaseQuery query) { Object[] args = { }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, REDIRECTION_METHOD_ERROR, args), query); queryException.setInternalException(exception); queryException.setErrorCode(REDIRECTION_METHOD_ERROR); return queryException; }
public static QueryException classNotFoundWhileUsingQueryHint(DatabaseQuery query, Object hintValue, Exception exc) { Object[] args = { hintValue }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CLASS_NOT_FOUND_WHILE_USING_QUERY_HINT, args), query); queryException.setErrorCode(CLASS_NOT_FOUND_WHILE_USING_QUERY_HINT); queryException.setInternalException(exc); return queryException; }
public static QueryException redirectionMethodNotDefinedCorrectly(Class methodClass, String methodName, Exception exception, DatabaseQuery query) { Object[] args = { methodClass, methodName, CR }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, REDIRECTION_METHOD_NOT_DEFINED_CORRECTLY, args), query); queryException.setInternalException(exception); queryException.setErrorCode(REDIRECTION_METHOD_NOT_DEFINED_CORRECTLY); return queryException; }
public static QueryException errorInstantiatedClassForQueryHint(Exception exception, DatabaseQuery query, Class theClass, String hint) { Object[] args = { theClass, hint }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, ERROR_INSTANTIATING_CLASS_FOR_QUERY_HINT, args), query); queryException.setErrorCode(ERROR_INSTANTIATING_CLASS_FOR_QUERY_HINT); queryException.setInternalException(exception); return queryException; }
public static QueryException exceptionWhileReadingMapKey(Object object, Exception ex) { Object[] args = { object, ex }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, EXCEPTION_WHILE_READING_MAP_KEY, args)); queryException.setErrorCode(EXCEPTION_WHILE_READING_MAP_KEY); queryException.setInternalException(ex); return queryException; }
/** * An exception was thrown while initializing the constructor from the class. */ public static QueryException exceptionWhileInitializingConstructor(Exception thrownException, DatabaseQuery query, Class targetClass) { Object[] args = { targetClass, thrownException }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, EXCEPTION_WHILE_LOADING_CONSTRUCTOR, args)); queryException.setErrorCode(EXCEPTION_WHILE_LOADING_CONSTRUCTOR); queryException.setInternalException(thrownException); queryException.setQuery(query); return queryException; }
/** * An exception was throwing while using a ReportQuery with a constructor expression */ public static QueryException exceptionWhileUsingConstructorExpression(Exception thrownException, DatabaseQuery query) { Object[] args = { thrownException }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, EXCEPTION_WHILE_USING_CONSTRUCTOR_EXPRESSION, args)); queryException.setErrorCode(EXCEPTION_WHILE_USING_CONSTRUCTOR_EXPRESSION); queryException.setInternalException(thrownException); queryException.setQuery(query); return queryException; }
/** * An exception was throwing while using a ReportQuery with a constructor expression */ public static QueryException exceptionWhileUsingConstructorExpression(Exception thrownException, DatabaseQuery query) { Object[] args = { thrownException }; QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, EXCEPTION_WHILE_USING_CONSTRUCTOR_EXPRESSION, args)); queryException.setErrorCode(EXCEPTION_WHILE_USING_CONSTRUCTOR_EXPRESSION); queryException.setInternalException(thrownException); queryException.setQuery(query); return queryException; }