javax.persistence.Transient Maven / Gradle / Ivy
// $Id: Transient.java 17752 2009-10-15 01:19:21Z [email protected] $
// EJB3 Specification Copyright 2004-2009 Sun Microsystems, Inc.
package javax.persistence;
import java.lang.annotation.Target;
import java.lang.annotation.Retention;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Specifies that the property or field is not persistent. It is used
* to annotate a property or field of an entity class, mapped
* superclass, or embeddable class.
*
*
* Example:
*
* @Entity
* public class Employee {
* @Id int id;
* @Transient User currentUser;
* ...
* }
*
*
* @since Java Persistence 1.0
*/
@Target({ METHOD, FIELD })
@Retention(RUNTIME)
public @interface Transient {
}