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

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

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

QueryException.setQuery介绍

[英]INTERNAL: Set the query in which the problem was detected.
[中]内部:设置检测到问题的查询。

代码示例

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public static QueryException cannotCacheCursorResultsOnQuery(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CANNOT_CACHE_CURSOR_RESULTS_ON_QUERY, args));
  queryException.setQuery(query);
  queryException.setErrorCode(CANNOT_CACHE_CURSOR_RESULTS_ON_QUERY);
  return queryException;
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Oct 19, 2000 JED
 * Added this method and exception value
 */
public static QueryException noAttributesForReportQuery(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, NO_ATTRIBUTES_FOR_REPORT_QUERY, args));
  queryException.setErrorCode(NO_ATTRIBUTES_FOR_REPORT_QUERY);
  queryException.setQuery(query);
  return queryException;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * Oct 19, 2000 JED
 * Added this method and exception value
 */
public static QueryException noAttributesForReportQuery(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, NO_ATTRIBUTES_FOR_REPORT_QUERY, args));
  queryException.setErrorCode(NO_ATTRIBUTES_FOR_REPORT_QUERY);
  queryException.setQuery(query);
  return queryException;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Oct 18, 2000 JED
 * Added this method and exception value
 */
public static QueryException exampleAndReferenceObjectClassMismatch(Class exampleObjectClass, Class referenceObjectClass, DatabaseQuery query) {
  Object[] args = { exampleObjectClass, referenceObjectClass };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, EXAMPLE_AND_REFERENCE_OBJECT_CLASS_MISMATCH, args));
  queryException.setErrorCode(EXAMPLE_AND_REFERENCE_OBJECT_CLASS_MISMATCH);
  queryException.setQuery(query);
  return queryException;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * An exception was throwing while using a ReportQuery with a constructor expession
 */
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.setQuery(query);
  return queryException;
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

public static QueryException cannotCacheCursorResultsOnQuery(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CANNOT_CACHE_CURSOR_RESULTS_ON_QUERY, args));
  queryException.setQuery(query);
  queryException.setErrorCode(CANNOT_CACHE_CURSOR_RESULTS_ON_QUERY);
  return queryException;
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

public static QueryException cannotCachePartialObjects(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CANNOT_CACHE_PARTIAL_OBJECT, args));
  queryException.setQuery(query);
  queryException.setErrorCode(CANNOT_CACHE_PARTIAL_OBJECT);
  return queryException;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

public static QueryException cannotCacheCursorResultsOnQuery(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CANNOT_CACHE_CURSOR_RESULTS_ON_QUERY, args));
  queryException.setQuery(query);
  queryException.setErrorCode(CANNOT_CACHE_CURSOR_RESULTS_ON_QUERY);
  return queryException;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * Oct 18, 2000 JED
 * Added this method and exception value
 */
public static QueryException exampleAndReferenceObjectClassMismatch(Class exampleObjectClass, Class referenceObjectClass, DatabaseQuery query) {
  Object[] args = { exampleObjectClass, referenceObjectClass };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, EXAMPLE_AND_REFERENCE_OBJECT_CLASS_MISMATCH, args));
  queryException.setErrorCode(EXAMPLE_AND_REFERENCE_OBJECT_CLASS_MISMATCH);
  queryException.setQuery(query);
  return queryException;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

public static QueryException cannotCachePartialObjects(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CANNOT_CACHE_PARTIAL_OBJECT, args));
  queryException.setQuery(query);
  queryException.setErrorCode(CANNOT_CACHE_PARTIAL_OBJECT);
  return queryException;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public static QueryException cannotCacheIsolatedDataOnQuery(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CANNOT_CACHE_ISOLATED_DATA_ON_QUERY, args));
  queryException.setQuery(query);
  queryException.setErrorCode(CANNOT_CACHE_ISOLATED_DATA_ON_QUERY);
  return queryException;
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

public static QueryException cannotCacheIsolatedDataOnQuery(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CANNOT_CACHE_ISOLATED_DATA_ON_QUERY, args));
  queryException.setQuery(query);
  queryException.setErrorCode(CANNOT_CACHE_ISOLATED_DATA_ON_QUERY);
  return queryException;
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Oct 18, 2000 JED
 * Added this method and exception value
 */
public static QueryException exampleAndReferenceObjectClassMismatch(Class exampleObjectClass, Class referenceObjectClass, DatabaseQuery query) {
  Object[] args = { exampleObjectClass, referenceObjectClass };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, EXAMPLE_AND_REFERENCE_OBJECT_CLASS_MISMATCH, args));
  queryException.setErrorCode(EXAMPLE_AND_REFERENCE_OBJECT_CLASS_MISMATCH);
  queryException.setQuery(query);
  return queryException;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

public static QueryException cannotCacheIsolatedDataOnQuery(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CANNOT_CACHE_ISOLATED_DATA_ON_QUERY, args));
  queryException.setQuery(query);
  queryException.setErrorCode(CANNOT_CACHE_ISOLATED_DATA_ON_QUERY);
  return queryException;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public static QueryException cannotCachePartialObjects(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, CANNOT_CACHE_PARTIAL_OBJECT, args));
  queryException.setQuery(query);
  queryException.setErrorCode(CANNOT_CACHE_PARTIAL_OBJECT);
  return queryException;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Oct 19, 2000 JED
 * Added this method and exception value
 */
public static QueryException noAttributesForReportQuery(DatabaseQuery query) {
  Object[] args = {  };
  QueryException queryException = new QueryException(ExceptionMessageGenerator.buildMessage(QueryException.class, NO_ATTRIBUTES_FOR_REPORT_QUERY, args));
  queryException.setErrorCode(NO_ATTRIBUTES_FOR_REPORT_QUERY);
  queryException.setQuery(query);
  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;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

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

相关文章

微信公众号

最新文章

更多

QueryException类方法