org.eclipse.persistence.exceptions.QueryException.setInternalException()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(10.4k)|赞(0)|评价(0)|浏览(66)

本文整理了Java中org.eclipse.persistence.exceptions.QueryException.setInternalException方法的一些代码示例,展示了QueryException.setInternalException的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryException.setInternalException方法的具体详情如下:
包路径:org.eclipse.persistence.exceptions.QueryException
类名称:QueryException
方法名:setInternalException

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;
}

相关文章

微信公众号

最新文章

更多

QueryException类方法