Source Code Cross Referenced for NamedNativeQuery.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.ArrayList;
019:        import java.util.List;
020:        import javax.xml.bind.annotation.XmlAccessType;
021:        import javax.xml.bind.annotation.XmlAccessorType;
022:        import javax.xml.bind.annotation.XmlAttribute;
023:        import javax.xml.bind.annotation.XmlElement;
024:        import javax.xml.bind.annotation.XmlType;
025:
026:        /**
027:         * 
028:         * 
029:         *         @Target({TYPE}) @Retention(RUNTIME)
030:         *         public @interface NamedNativeQuery {
031:         *           String name();
032:         *           String query();
033:         *           QueryHint[] hints() default {};
034:         *           Class resultClass() default void.class;
035:         *           String resultSetMapping() default ""; //named SqlResultSetMapping
036:         *         }
037:         * 
038:         *       
039:         * 
040:         * <p>Java class for named-native-query complex type.
041:         * 
042:         * <p>The following schema fragment specifies the expected content contained within this class.
043:         * 
044:         * <pre>
045:         * &lt;complexType name="named-native-query">
046:         *   &lt;complexContent>
047:         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
048:         *       &lt;sequence>
049:         *         &lt;element name="query" type="{http://www.w3.org/2001/XMLSchema}string"/>
050:         *         &lt;element name="hint" type="{http://java.sun.com/xml/ns/persistence/orm}query-hint" maxOccurs="unbounded" minOccurs="0"/>
051:         *       &lt;/sequence>
052:         *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
053:         *       &lt;attribute name="result-class" type="{http://www.w3.org/2001/XMLSchema}string" />
054:         *       &lt;attribute name="result-set-mapping" type="{http://www.w3.org/2001/XMLSchema}string" />
055:         *     &lt;/restriction>
056:         *   &lt;/complexContent>
057:         * &lt;/complexType>
058:         * </pre>
059:         * 
060:         * 
061:         */
062:        @XmlAccessorType(XmlAccessType.FIELD)
063:        @XmlType(name="named-native-query",propOrder={"query","hint"})
064:        public class NamedNativeQuery {
065:
066:            @XmlElement(required=true)
067:            protected String query;
068:            protected List<QueryHint> hint;
069:            @XmlAttribute(required=true)
070:            protected String name;
071:            @XmlAttribute(name="result-class")
072:            protected String resultClass;
073:            @XmlAttribute(name="result-set-mapping")
074:            protected String resultSetMapping;
075:
076:            /**
077:             * Gets the value of the query property.
078:             * 
079:             * @return
080:             *     possible object is
081:             *     {@link String }
082:             *     
083:             */
084:            public String getQuery() {
085:                return query;
086:            }
087:
088:            /**
089:             * Sets the value of the query property.
090:             * 
091:             * @param value
092:             *     allowed object is
093:             *     {@link String }
094:             *     
095:             */
096:            public void setQuery(String value) {
097:                this .query = value;
098:            }
099:
100:            /**
101:             * Gets the value of the hint property.
102:             * 
103:             * <p>
104:             * This accessor method returns a reference to the live list,
105:             * not a snapshot. Therefore any modification you make to the
106:             * returned list will be present inside the JAXB object.
107:             * This is why there is not a <CODE>set</CODE> method for the hint property.
108:             * 
109:             * <p>
110:             * For example, to add a new item, do as follows:
111:             * <pre>
112:             *    getHint().add(newItem);
113:             * </pre>
114:             * 
115:             * 
116:             * <p>
117:             * Objects of the following type(s) are allowed in the list
118:             * {@link QueryHint }
119:             * 
120:             * 
121:             */
122:            public List<QueryHint> getHint() {
123:                if (hint == null) {
124:                    hint = new ArrayList<QueryHint>();
125:                }
126:                return this .hint;
127:            }
128:
129:            /**
130:             * Gets the value of the name property.
131:             * 
132:             * @return
133:             *     possible object is
134:             *     {@link String }
135:             *     
136:             */
137:            public String getName() {
138:                return name;
139:            }
140:
141:            /**
142:             * Sets the value of the name property.
143:             * 
144:             * @param value
145:             *     allowed object is
146:             *     {@link String }
147:             *     
148:             */
149:            public void setName(String value) {
150:                this .name = value;
151:            }
152:
153:            /**
154:             * Gets the value of the resultClass property.
155:             * 
156:             * @return
157:             *     possible object is
158:             *     {@link String }
159:             *     
160:             */
161:            public String getResultClass() {
162:                return resultClass;
163:            }
164:
165:            /**
166:             * Sets the value of the resultClass property.
167:             * 
168:             * @param value
169:             *     allowed object is
170:             *     {@link String }
171:             *     
172:             */
173:            public void setResultClass(String value) {
174:                this .resultClass = value;
175:            }
176:
177:            /**
178:             * Gets the value of the resultSetMapping property.
179:             * 
180:             * @return
181:             *     possible object is
182:             *     {@link String }
183:             *     
184:             */
185:            public String getResultSetMapping() {
186:                return resultSetMapping;
187:            }
188:
189:            /**
190:             * Sets the value of the resultSetMapping property.
191:             * 
192:             * @param value
193:             *     allowed object is
194:             *     {@link String }
195:             *     
196:             */
197:            public void setResultSetMapping(String value) {
198:                this.resultSetMapping = value;
199:            }
200:
201:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.