Package org.nuiton.topia.persistence
Class SchemaValidationTopiaException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.nuiton.topia.persistence.TopiaException
org.nuiton.topia.persistence.SchemaValidationTopiaException
- All Implemented Interfaces:
Serializable
This exception is throwed when the database schema is not suitable for the
current entities model. It means that a table or a column is missing
- Since:
- 3.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.google.common.base.Predicate<StackTraceElement>We can know that anHibernateExceptionis about schema validation if one of the stack trace element validate this predicate. -
Constructor Summary
ConstructorsConstructorDescriptionSchemaValidationTopiaException(String message, org.hibernate.HibernateException e) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidthrowIfHibernateExceptionIsAboutSchemaValidation(org.hibernate.HibernateException hibernateException) If givenHibernateExceptionis about schema validation, throw a SchemaValidationTopiaException.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
IS_STACK_TRACE_ELEMENT_ABOUT_SCHEMA_VALIDATION
protected static final com.google.common.base.Predicate<StackTraceElement> IS_STACK_TRACE_ELEMENT_ABOUT_SCHEMA_VALIDATIONWe can know that anHibernateExceptionis about schema validation if one of the stack trace element validate this predicate.
-
-
Constructor Details
-
SchemaValidationTopiaException
-
-
Method Details
-
throwIfHibernateExceptionIsAboutSchemaValidation
public static void throwIfHibernateExceptionIsAboutSchemaValidation(org.hibernate.HibernateException hibernateException) If givenHibernateExceptionis about schema validation, throw a SchemaValidationTopiaException.- Parameters:
hibernateException- the incoming exception to test and wrap if necessary
-