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.RetentionPolicy.RUNTIME; 016 017/** 018 * The NamedAttributeNode annotation is used to specify an attribute node of within an entity graph or subgraph. 019 * 020 * @since JPA 2.1 021 */ 022@Target({}) 023@Retention(RUNTIME) 024public @interface NamedAttributeNode { 025 /** 026 * Specifies the name of the corresponding attribute. 027 * 028 * @return value 029 */ 030 String value(); 031 032 /** 033 * Refers to a NamedSubgraph specification that further characterizes an attribute node corresponding to a 034 * managed type (entity or embeddable). The value of the subgraph element must correspond to the name used for 035 * the subgraph in the NamedSubgraph element. If the referenced attribute is an entity which has entity 036 * subclasses, there may be more than one NamedSubgraph element with this name, and the subgraph element is 037 * considered to refer to all of these. 038 * 039 * @return subgraph 040 */ 041 String subgraph() default ""; 042 043 /** 044 * Refers to a NamedSubgraph specification that further characterizes an attribute node corresponding to the 045 * key of a Map-valued attribute. The value of the the keySubgraph element must correspond to the name used for 046 * the subgraph in the NamedSubgraph element. If the referenced attribute is an entity which has entity 047 * subclasses, there may be more than one NamedSubgraph element with this name, and the keySubgraph element is 048 * considered to refer to all of these. 049 * 050 * @return key subgraph 051 */ 052 String keySubgraph() default ""; 053}