com.guicedee.guicedpersistence.readers.hibernateproperties.HibernatePersistenceValidationMode Maven / Gradle / Ivy
package com.guicedee.guicedpersistence.readers.hibernateproperties;
/**
* validation-mode
*
* By default, Bean Validation (and Hibernate Validator) is activated. When an entity is created, updated (and optionally deleted), it is validated before being sent to the
* database. The database schema generated by Hibernate also reflects the constraints declared on the entity.
*/
public enum HibernatePersistenceValidationMode
{
/**
* AUTO: if Bean Validation is present in the classpath, CALLBACK and DDL are activated.
*/
Auto,
/**
* CALLBACK: entities are validated on creation, update and deletion. If no Bean Validation provider is present, an exception is raised at initialization time.
*/
Callback,
/**
* DDL: (not standard, see below) database schemas are entities are validated on creation, update and deletion. If no Bean Validation provider is present, an exception is
* raised at initialization time.
*/
Ddl,
/**
* NONE: Bean Validation is not used at all
*/
None,
;
@Override
public String toString()
{
return name().toUpperCase();
}
}