org.hibernate.HibernateException.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(10.7k)|赞(0)|评价(0)|浏览(204)

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

HibernateException.<init>介绍

[英]Constructs a HibernateException using the given exception message.
[中]使用给定的异常消息构造HibernateException。

代码示例

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException externalizersNotRegistered(final Integer externalizerId, final Class<?> aClass) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), externalizersNotRegistered$str(), externalizerId, aClass));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String registeredExternalizerNotLoadedFromOGMClassloader = "OGM001104: Infinispan Externalizer '%s' was registered but apparently loaded from the wrong module. Aborting as a version mismatch could corrupt stored data.";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException externalizerIdNotMatchingType(final Integer externalizerId, final AdvancedExternalizer<?> registeredExternalizer, final AdvancedExternalizer expectedExternalizer) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), externalizerIdNotMatchingType$str(), externalizerId, registeredExternalizer, expectedExternalizer));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String missingCacheConfiguration = "OGM001106: Missing configuration for cache '%1$s' and a default configuration was not provided";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException exceptionGeneratingValueForCounter(final String counterName) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), exceptionGeneratingValueForCounter$str(), counterName));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String cannotInstantiateStoredProcedure = "OGM001111: Cannot instantiate stored procedure '%s' with resolved name '%s'.";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException cannotInstantiateStoredProcedure(final String storedProcedureName, final String className, final Exception e) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), cannotInstantiateStoredProcedure$str(), storedProcedureName, className), e);
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
@Override

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException illegalDiscrimantorType(final String arg0) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), illegalDiscrimantorType$str(), arg0));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String unableToConvertStringToDiscriminator = "OGM000027: Could not convert string to discriminator object";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException getPropertyDoesNotExistException(final String arg0, final String arg1, final ElementType arg2) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), getPropertyDoesNotExistException$str(), arg0, arg1, arg2));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String getUnsupportedElementTypeException = "OGM000042: The given element type %1$s is neither FIELD nor METHOD.";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException missingConfigurationProperty(final String arg0) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), missingConfigurationProperty$str(), arg0));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String unsupportedPropertyType = "OGM000053: Value of unsupported type given for configuration property '%1$s': '%2$s'";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException invalidConfigurationUrl(final String arg0, final String arg1) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), invalidConfigurationUrl$str(), arg0, arg1));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String couldNotRetrieveEntityForRetrievalOfGeneratedProperties = "OGM000056: Unable to load record for retrieval of generated properties; Entity type: %1$s, id: %2$s";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException errorOnEntityBatchLoad(final String arg0, final Exception arg1) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), errorOnEntityBatchLoad$str(), arg0), arg1);
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String notALong = "OGM000081: The value set for the configuration property '%1$s' must be a long number. Found '%2$s'.";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException multipleEntitiesOutputNotSupported(final String arg0, final java.util.Collection<?> arg1) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), multipleEntitiesOutputNotSupported$str(), arg0, arg1));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String addEntityNotAllowedInNativeQueriesUsingProjection = "OGM000091: Projection and addEntity are not allowed in the same query on <%1$s> %2$s";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException cannotExtractStoredProcedureResultSet(final String arg0, final Object arg1, final Exception arg2) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), cannotExtractStoredProcedureResultSet$str(), arg0, arg1), arg2);
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String cannotExtractTupleFromObject = "OGM000097: Cannot extract tuple from value '%s'.";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException errorOnFetchJndiClientProperty(final String arg0) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), errorOnFetchJndiClientProperty$str(), arg0));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String unableToParseOrderByFragment = "OGM000099: Unable to parse order-by fragment: '%s'.";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException constraintViolation(final EntityKey entityKey, final String message, final Exception cause) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), constraintViolation$str(), entityKey, message), cause);
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
@Override

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException cannotExecuteWorkOutsideIsolatedTransaction() {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), cannotExecuteWorkOutsideIsolatedTransaction$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
@Override

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException multipleEntitiesOutputNotSupported(final String arg0, final java.util.Collection<?> arg1) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), multipleEntitiesOutputNotSupported$str(), arg0, arg1));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String addEntityNotAllowedInNativeQueriesUsingProjection = "OGM000091: Projection and addEntity are not allowed in the same query on <%1$s> %2$s";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
  public final HibernateException errorIntrospectingObject(final Exception arg0) {
    final HibernateException result = new HibernateException(String.format(getLoggingLocale(), errorIntrospectingObject$str()), arg0);
    final StackTraceElement[] st = result.getStackTrace();
    result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
    return result;
  }
}

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException unableToDropDatabase(final MongoException e, final String databaseName) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), unableToDropDatabase$str(), databaseName), e);
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
@Override

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException unableToConnectToDatastore(final String message, final Exception e) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), unableToConnectToDatastore$str(), message), e);
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String unableToDetermineCollectionName = "OGM001217: The following native query does neither specify the collection name nor is its result type mapped to an entity: %s";

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException unableToDetermineCollectionName(final String nativeQuery) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), unableToDetermineCollectionName$str(), nativeQuery));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
@Override

代码示例来源:origin: hibernate/hibernate-ogm

@Override
public final HibernateException unableToInvokeMethodViaReflection(final String clazz, final String method) {
  final HibernateException result = new HibernateException(String.format(getLoggingLocale(), unableToInvokeMethodViaReflection$str(), clazz, method));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String updateQueryMustBeExecutedViaExecuteUpdate = "OGM001227: Query must be executed using the 'executeUpdate()' method: %s";

相关文章