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 * Defines the set of cascadable operations that are propagated 014 * to the associated entity. 015 * The value <code>cascade=ALL</code> is equivalent to 016 * <code>cascade={PERSIST, MERGE, REMOVE, REFRESH, DETACH}</code>. 017 * 018 * @since Java Persistence 1.0 019 */ 020public enum CascadeType { 021 022 /** 023 * Cascade all operations 024 */ 025 ALL, 026 027 /** 028 * Cascade persist operation 029 */ 030 PERSIST, 031 032 /** 033 * Cascade merge operation 034 */ 035 MERGE, 036 037 /** 038 * Cascade remove operation 039 */ 040 REMOVE, 041 042 /** 043 * Cascade refresh operation 044 */ 045 REFRESH, 046 047 /** 048 * Cascade detach operation 049 * 050 * @since Java Persistence 2.0 051 */ 052 DETACH 053}