1 /*
2 * Copyright (c) 2008, 2019 Oracle and/or its affiliates. All rights reserved.
3 *
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v. 2.0 which is available at
6 * http://www.eclipse.org/legal/epl-2.0,
7 * or the Eclipse Distribution License v. 1.0 which is available at
8 * http://www.eclipse.org/org/documents/edl-v10.php.
9 *
10 * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
11 */
12
13 // Contributors:
14 // Linda DeMichiel - 2.1
15 // Linda DeMichiel - 2.0
16
17 package javax.persistence;
18
19 /**
20 * The validation mode to be used by the provider for the persistence
21 * unit.
22 *
23 * @since 2.0
24 */
25 public enum ValidationMode {
26
27 /**
28 * If a Bean Validation provider is present in the environment,
29 * the persistence provider must perform the automatic validation
30 * of entities. If no Bean Validation provider is present in the
31 * environment, no lifecycle event validation takes place.
32 * This is the default behavior.
33 */
34 AUTO,
35
36 /**
37 * The persistence provider must perform the lifecycle event
38 * validation. It is an error if there is no Bean Validation
39 * provider present in the environment.
40 */
41 CALLBACK,
42
43 /**
44 * The persistence provider must not perform lifecycle event validation.
45 */
46 NONE
47 }
48