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
012import java.lang.annotation.Retention;
013import java.lang.annotation.Target;
014
015import static java.lang.annotation.ElementType.FIELD;
016import static java.lang.annotation.ElementType.METHOD;
017import static java.lang.annotation.RetentionPolicy.RUNTIME;
018
019/**
020 * Specifies that the property or field is not persistent. It is used
021 * to annotate a property or field of an entity class, mapped
022 * superclass, or embeddable class.
023 * <p>
024 * <pre>
025 *    Example:
026 *
027 *    &#064;Entity
028 *    public class Employee {
029 *        &#064;Id int id;
030 *        &#064;Transient User currentUser;
031 *        ...
032 *    }
033 * </pre>
034 *
035 * @since Java Persistence 1.0
036 */
037@Target({METHOD, FIELD})
038@Retention(RUNTIME)
039public @interface Transient {
040}