Source Code Cross Referenced for ManyToMany.java in  » J2EE » openejb3 » org » apache » openejb » jee » jpa » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » openejb3 » org.apache.openejb.jee.jpa 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */package org.apache.openejb.jee.jpa;
017:
018:        import java.util.List;
019:        import javax.xml.bind.annotation.XmlAccessType;
020:        import javax.xml.bind.annotation.XmlAccessorType;
021:        import javax.xml.bind.annotation.XmlAttribute;
022:        import javax.xml.bind.annotation.XmlElement;
023:        import javax.xml.bind.annotation.XmlType;
024:        import javax.xml.bind.annotation.XmlTransient;
025:
026:        /**
027:         *
028:         *
029:         *         @Target({METHOD, FIELD}) @Retention(RUNTIME)
030:         *         public @interface ManyToMany {
031:         *           Class targetEntity() default void.class;
032:         *           CascadeType[] cascade() default {};
033:         *           FetchType fetch() default LAZY;
034:         *           String mappedBy() default "";
035:         *         }
036:         *
037:         *
038:         *
039:         * <p>Java class for many-to-many complex type.
040:         *
041:         * <p>The following schema fragment specifies the expected content contained within this class.
042:         *
043:         * <pre>
044:         * &lt;complexType name="many-to-many">
045:         *   &lt;complexContent>
046:         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
047:         *       &lt;sequence>
048:         *         &lt;element name="order-by" type="{http://java.sun.com/xml/ns/persistence/orm}order-by" minOccurs="0"/>
049:         *         &lt;element name="map-key" type="{http://java.sun.com/xml/ns/persistence/orm}map-key" minOccurs="0"/>
050:         *         &lt;element name="join-table" type="{http://java.sun.com/xml/ns/persistence/orm}join-table" minOccurs="0"/>
051:         *         &lt;element name="cascade" type="{http://java.sun.com/xml/ns/persistence/orm}cascade-type" minOccurs="0"/>
052:         *       &lt;/sequence>
053:         *       &lt;attribute name="fetch" type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
054:         *       &lt;attribute name="mapped-by" type="{http://www.w3.org/2001/XMLSchema}string" />
055:         *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
056:         *       &lt;attribute name="target-entity" type="{http://www.w3.org/2001/XMLSchema}string" />
057:         *     &lt;/restriction>
058:         *   &lt;/complexContent>
059:         * &lt;/complexType>
060:         * </pre>
061:         *
062:         *
063:         */
064:        @XmlAccessorType(XmlAccessType.FIELD)
065:        @XmlType(name="many-to-many",propOrder={"orderBy","mapKey","joinTable","cascade"})
066:        public class ManyToMany implements  RelationField {
067:
068:            @XmlElement(name="order-by")
069:            protected String orderBy;
070:            @XmlElement(name="map-key")
071:            protected MapKey mapKey;
072:            @XmlElement(name="join-table")
073:            protected JoinTable joinTable;
074:            protected CascadeType cascade;
075:            @XmlAttribute
076:            protected FetchType fetch;
077:            @XmlAttribute(name="mapped-by")
078:            protected String mappedBy;
079:            @XmlAttribute(required=true)
080:            protected String name;
081:            @XmlAttribute(name="target-entity")
082:            protected String targetEntity;
083:            @XmlTransient
084:            protected RelationField relatedField;
085:            @XmlTransient
086:            protected boolean syntheticField;
087:
088:            /**
089:             * Gets the value of the orderBy property.
090:             *
091:             * @return
092:             *     possible object is
093:             *     {@link String }
094:             *
095:             */
096:            public String getOrderBy() {
097:                return orderBy;
098:            }
099:
100:            /**
101:             * Sets the value of the orderBy property.
102:             *
103:             * @param value
104:             *     allowed object is
105:             *     {@link String }
106:             *
107:             */
108:            public void setOrderBy(String value) {
109:                this .orderBy = value;
110:            }
111:
112:            /**
113:             * Gets the value of the mapKey property.
114:             *
115:             * @return
116:             *     possible object is
117:             *     {@link MapKey }
118:             *
119:             */
120:            public MapKey getMapKey() {
121:                return mapKey;
122:            }
123:
124:            /**
125:             * Sets the value of the mapKey property.
126:             *
127:             * @param value
128:             *     allowed object is
129:             *     {@link MapKey }
130:             *
131:             */
132:            public void setMapKey(MapKey value) {
133:                this .mapKey = value;
134:            }
135:
136:            /**
137:             * Gets the value of the joinTable property.
138:             *
139:             * @return
140:             *     possible object is
141:             *     {@link JoinTable }
142:             *
143:             */
144:            public JoinTable getJoinTable() {
145:                return joinTable;
146:            }
147:
148:            /**
149:             * Sets the value of the joinTable property.
150:             *
151:             * @param value
152:             *     allowed object is
153:             *     {@link JoinTable }
154:             *
155:             */
156:            public void setJoinTable(JoinTable value) {
157:                this .joinTable = value;
158:            }
159:
160:            /**
161:             * Gets the value of the cascade property.
162:             *
163:             * @return
164:             *     possible object is
165:             *     {@link CascadeType }
166:             *
167:             */
168:            public CascadeType getCascade() {
169:                return cascade;
170:            }
171:
172:            /**
173:             * Sets the value of the cascade property.
174:             *
175:             * @param value
176:             *     allowed object is
177:             *     {@link CascadeType }
178:             *
179:             */
180:            public void setCascade(CascadeType value) {
181:                this .cascade = value;
182:            }
183:
184:            /**
185:             * Gets the value of the fetch property.
186:             *
187:             * @return
188:             *     possible object is
189:             *     {@link FetchType }
190:             *
191:             */
192:            public FetchType getFetch() {
193:                return fetch;
194:            }
195:
196:            /**
197:             * Sets the value of the fetch property.
198:             *
199:             * @param value
200:             *     allowed object is
201:             *     {@link FetchType }
202:             *
203:             */
204:            public void setFetch(FetchType value) {
205:                this .fetch = value;
206:            }
207:
208:            /**
209:             * Gets the value of the mappedBy property.
210:             *
211:             * @return
212:             *     possible object is
213:             *     {@link String }
214:             *
215:             */
216:            public String getMappedBy() {
217:                return mappedBy;
218:            }
219:
220:            /**
221:             * Sets the value of the mappedBy property.
222:             *
223:             * @param value
224:             *     allowed object is
225:             *     {@link String }
226:             *
227:             */
228:            public void setMappedBy(String value) {
229:                this .mappedBy = value;
230:            }
231:
232:            /**
233:             * Gets the value of the name property.
234:             *
235:             * @return
236:             *     possible object is
237:             *     {@link String }
238:             *
239:             */
240:            public String getName() {
241:                return name;
242:            }
243:
244:            /**
245:             * Sets the value of the name property.
246:             *
247:             * @param value
248:             *     allowed object is
249:             *     {@link String }
250:             *
251:             */
252:            public void setName(String value) {
253:                this .name = value;
254:            }
255:
256:            /**
257:             * Gets the value of the targetEntity property.
258:             *
259:             * @return
260:             *     possible object is
261:             *     {@link String }
262:             *
263:             */
264:            public String getTargetEntity() {
265:                return targetEntity;
266:            }
267:
268:            /**
269:             * Sets the value of the targetEntity property.
270:             *
271:             * @param value
272:             *     allowed object is
273:             *     {@link String }
274:             *
275:             */
276:            public void setTargetEntity(String value) {
277:                this .targetEntity = value;
278:            }
279:
280:            public List<JoinColumn> getJoinColumn() {
281:                throw new UnsupportedOperationException(
282:                        "Many to many element can not have join columns");
283:            }
284:
285:            /**
286:             * This is only used for xml converters and will normally return null.
287:             * Gets the field on the target entity for this relationship.
288:             * @return the field on the target entity for this relationship.
289:             */
290:            public RelationField getRelatedField() {
291:                return relatedField;
292:            }
293:
294:            /**
295:             * Gets the field on the target entity for this relationship.
296:             * @param value field on the target entity for this relationship.
297:             */
298:            public void setRelatedField(RelationField value) {
299:                this .relatedField = value;
300:            }
301:
302:            /**
303:             * This is only used for xml converters and will normally return false.
304:             * A true value indicates that this field was generated for CMR back references.
305:             * @return true if this field was generated for CMR back references.
306:             */
307:            public boolean isSyntheticField() {
308:                return syntheticField;
309:            }
310:
311:            /**
312:             * This is only used for xml converters and will normally return false.
313:             * A true value indicates that this field was generated for CMR back references.
314:             * @return true if this field was generated for CMR back references.
315:             */
316:            public void setSyntheticField(boolean syntheticField) {
317:                this.syntheticField = syntheticField;
318:            }
319:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.