001/* 002 * Copyright (c) 2008, 2009, 2011 Oracle, Inc. All rights reserved. 003 * 004 * This program and the accompanying materials are made available under the 005 * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 006 * which accompanies this distribution. The Eclipse Public License is available 007 * at http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution License 008 * is available at http://www.eclipse.org/org/documents/edl-v10.php. 009 */ 010package javax.persistence; 011 012/** 013 * The validation mode to be used by the provider for the persistence 014 * unit. 015 * 016 * @since Java Persistence 2.0 017 */ 018public enum ValidationMode { 019 /** 020 * If a Bean Validation provider is present in the environment, 021 * the persistence provider must perform the automatic validation 022 * of entities. If no Bean Validation provider is present in the 023 * environment, no lifecycle event validation takes place. 024 * This is the default behavior. 025 */ 026 AUTO, 027 028 /** 029 * The persistence provider must perform the lifecycle event 030 * validation. It is an error if there is no Bean Validation 031 * provider present in the environment. 032 */ 033 CALLBACK, 034 035 /** 036 * The persistence provider must not perform lifecycle event validation. 037 */ 038 NONE 039}