本文整理了Java中org.eclipse.persistence.exceptions.QueryException.setInternalException
方法的一些代码示例,展示了QueryException.setInternalException
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryException.setInternalException
方法的具体详情如下:
包路径:org.eclipse.persistence.exceptions.QueryException
类名称:QueryException
方法名:setInternalException
暂无
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
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;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
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;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
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;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
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;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
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;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
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;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
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;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
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;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
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;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* 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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* 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;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* 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;
}
内容来源于网络,如有侵权,请联系作者删除!