Source Code Cross Referenced for NamedSQLQueryDefinition.java in  » Database-ORM » hibernate » org » hibernate » engine » 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 » Database ORM » hibernate » org.hibernate.engine 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        //$Id: NamedSQLQueryDefinition.java 11199 2007-02-13 21:04:24Z epbernard $
002:        package org.hibernate.engine;
003:
004:        import java.util.List;
005:        import java.util.Map;
006:
007:        import org.hibernate.FlushMode;
008:        import org.hibernate.CacheMode;
009:        import org.hibernate.engine.query.sql.NativeSQLQueryReturn;
010:
011:        /**
012:         * Definition of a named native SQL query, defined
013:         * in the mapping metadata.
014:         * 
015:         * @author Max Andersen
016:         */
017:        public class NamedSQLQueryDefinition extends NamedQueryDefinition {
018:
019:            private NativeSQLQueryReturn[] queryReturns;
020:            private final List querySpaces;
021:            private final boolean callable;
022:            private String resultSetRef;
023:
024:            /**
025:             * This form used to construct a NamedSQLQueryDefinition from the binder
026:             * code when a the result-set mapping information is explicitly
027:             * provided in the query definition (i.e., no resultset-mapping used)
028:             *
029:             * @param query The sql query string
030:             * @param queryReturns The in-lined query return definitions
031:             * @param querySpaces Any specified query spaces (used for auto-flushing)
032:             * @param cacheable Whether the query results are cacheable
033:             * @param cacheRegion If cacheable, the region into which to store the results
034:             * @param timeout A JDBC-level timeout to be applied
035:             * @param fetchSize A JDBC-level fetch-size to be applied
036:             * @param flushMode The flush mode to use for this query
037:             * @param cacheMode The cache mode to use during execution and subsequent result loading
038:             * @param readOnly Whether returned entities should be marked as read-only in the session
039:             * @param comment Any sql comment to be applied to the query
040:             * @param parameterTypes parameter type map
041:             * @param callable Does the query string represent a callable object (i.e., proc)
042:             */
043:            public NamedSQLQueryDefinition(String query,
044:                    NativeSQLQueryReturn[] queryReturns, List querySpaces,
045:                    boolean cacheable, String cacheRegion, Integer timeout,
046:                    Integer fetchSize, FlushMode flushMode,
047:                    CacheMode cacheMode, boolean readOnly, String comment,
048:                    Map parameterTypes, boolean callable) {
049:                super (query.trim(), /* trim done to workaround stupid oracle bug that cant handle whitespaces before a { in a sp */
050:                cacheable, cacheRegion, timeout, fetchSize, flushMode,
051:                        cacheMode, readOnly, comment, parameterTypes);
052:                this .queryReturns = queryReturns;
053:                this .querySpaces = querySpaces;
054:                this .callable = callable;
055:            }
056:
057:            /**
058:             * This form used to construct a NamedSQLQueryDefinition from the binder
059:             * code when a resultset-mapping reference is used.
060:             *
061:             * @param query The sql query string
062:             * @param resultSetRef The resultset-mapping name
063:             * @param querySpaces Any specified query spaces (used for auto-flushing)
064:             * @param cacheable Whether the query results are cacheable
065:             * @param cacheRegion If cacheable, the region into which to store the results
066:             * @param timeout A JDBC-level timeout to be applied
067:             * @param fetchSize A JDBC-level fetch-size to be applied
068:             * @param flushMode The flush mode to use for this query
069:             * @param cacheMode The cache mode to use during execution and subsequent result loading
070:             * @param readOnly Whether returned entities should be marked as read-only in the session
071:             * @param comment Any sql comment to be applied to the query
072:             * @param parameterTypes parameter type map
073:             * @param callable Does the query string represent a callable object (i.e., proc)
074:             */
075:            public NamedSQLQueryDefinition(String query, String resultSetRef,
076:                    List querySpaces, boolean cacheable, String cacheRegion,
077:                    Integer timeout, Integer fetchSize, FlushMode flushMode,
078:                    CacheMode cacheMode, boolean readOnly, String comment,
079:                    Map parameterTypes, boolean callable) {
080:                super (query.trim(), /* trim done to workaround stupid oracle bug that cant handle whitespaces before a { in a sp */
081:                cacheable, cacheRegion, timeout, fetchSize, flushMode,
082:                        cacheMode, readOnly, comment, parameterTypes);
083:                this .resultSetRef = resultSetRef;
084:                this .querySpaces = querySpaces;
085:                this .callable = callable;
086:            }
087:
088:            /**
089:             * This form used from annotations (?).  Essentially the same as the above using a
090:             * resultset-mapping reference, but without cacheMode, readOnly, and comment.
091:             *
092:             * FIXME: annotations do not use it, so it can be remove from my POV
093:             * @deprecated
094:             *
095:             * @param query The sql query string
096:             * @param resultSetRef The result-set-mapping name
097:             * @param querySpaces Any specified query spaces (used for auto-flushing)
098:             * @param cacheable Whether the query results are cacheable
099:             * @param cacheRegion If cacheable, the region into which to store the results
100:             * @param timeout A JDBC-level timeout to be applied
101:             * @param fetchSize A JDBC-level fetch-size to be applied
102:             * @param flushMode The flush mode to use for this query
103:             * @param parameterTypes parameter type map
104:             * @param callable Does the query string represent a callable object (i.e., proc)
105:             */
106:            public NamedSQLQueryDefinition(String query, String resultSetRef,
107:                    List querySpaces, boolean cacheable, String cacheRegion,
108:                    Integer timeout, Integer fetchSize, FlushMode flushMode,
109:                    Map parameterTypes, boolean callable) {
110:                this (query, resultSetRef, querySpaces, cacheable, cacheRegion,
111:                        timeout, fetchSize, flushMode, null, false, null,
112:                        parameterTypes, callable);
113:            }
114:
115:            public NativeSQLQueryReturn[] getQueryReturns() {
116:                return queryReturns;
117:            }
118:
119:            public List getQuerySpaces() {
120:                return querySpaces;
121:            }
122:
123:            public boolean isCallable() {
124:                return callable;
125:            }
126:
127:            public String getResultSetRef() {
128:                return resultSetRef;
129:            }
130:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.