|
From: <hib...@li...> - 2006-06-09 17:45:09
|
Author: ste...@jb...
Date: 2006-06-09 13:44:51 -0400 (Fri, 09 Jun 2006)
New Revision: 10007
Modified:
trunk/Hibernate3/src/org/hibernate/engine/NamedSQLQueryDefinition.java
Log:
cleanup
Modified: trunk/Hibernate3/src/org/hibernate/engine/NamedSQLQueryDefinition.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/engine/NamedSQLQueryDefinition.java 2006-06-09 15:03:23 UTC (rev 10006)
+++ trunk/Hibernate3/src/org/hibernate/engine/NamedSQLQueryDefinition.java 2006-06-09 17:44:51 UTC (rev 10007)
@@ -24,54 +24,91 @@
private final boolean callable;
private String resultSetRef;
- /** backward compatibility: to be removed after HA 3.2beta5*/
+ /**
+ * This form used to construct a NamedSQLQueryDefinition from the binder
+ * code when a the result-set mapping information is explicitly
+ * provided in the query definition (i.e., no resultset-mapping used)
+ *
+ * @param query The sql query string
+ * @param queryReturns The in-lined query return definitions
+ * @param scalarReturns The in-lined scalar query return definitions
+ * @param querySpaces Any specified query spaces (used for auto-flushing)
+ * @param cacheable Whether the query results are cacheable
+ * @param cacheRegion If cacheable, the region into which to store the results
+ * @param timeout A JDBC-level timeout to be applied
+ * @param fetchSize A JDBC-level fetch-size to be applied
+ * @param flushMode The flush mode to use for this query
+ * @param cacheMode The cache mode to use during execution and subsequent result loading
+ * @param readOnly Whether returned entities should be marked as read-only in the session
+ * @param comment Any sql comment to be applied to the query
+ * @param parameterTypes parameter type map
+ * @param callable Does the query string represent a callable object (i.e., proc)
+ */
public NamedSQLQueryDefinition(
- String query,
- SQLQueryReturn[] queryReturns,
- SQLQueryScalarReturn[] scalarReturns,
- List querySpaces,
- boolean cacheable,
- String cacheRegion,
- Integer timeout,
- Integer fetchSize,
- FlushMode flushMode,
- Map parameterTypes,
- boolean callable
- ) {
- this(
- query,
- queryReturns,
- scalarReturns,
- querySpaces,
+ String query,
+ SQLQueryReturn[] queryReturns,
+ SQLQueryScalarReturn[] scalarReturns,
+ List querySpaces,
+ boolean cacheable,
+ String cacheRegion,
+ Integer timeout,
+ Integer fetchSize,
+ FlushMode flushMode,
+ CacheMode cacheMode,
+ boolean readOnly,
+ String comment,
+ Map parameterTypes,
+ boolean callable) {
+ super(
+ query.trim(), /* trim done to workaround stupid oracle bug that cant handle whitespaces before a { in a sp */
cacheable,
cacheRegion,
timeout,
fetchSize,
flushMode,
- null,
- false,
- null,
- parameterTypes,
- callable
+ cacheMode,
+ readOnly,
+ comment,
+ parameterTypes
);
+ this.queryReturns = queryReturns;
+ this.scalarReturns = scalarReturns;
+ this.querySpaces = querySpaces;
+ this.callable = callable;
}
+ /**
+ * This form used to construct a NamedSQLQueryDefinition from the binder
+ * code when a resultset-mapping reference is used.
+ *
+ * @param query The sql query string
+ * @param resultSetRef The resultset-mapping name
+ * @param querySpaces Any specified query spaces (used for auto-flushing)
+ * @param cacheable Whether the query results are cacheable
+ * @param cacheRegion If cacheable, the region into which to store the results
+ * @param timeout A JDBC-level timeout to be applied
+ * @param fetchSize A JDBC-level fetch-size to be applied
+ * @param flushMode The flush mode to use for this query
+ * @param cacheMode The cache mode to use during execution and subsequent result loading
+ * @param readOnly Whether returned entities should be marked as read-only in the session
+ * @param comment Any sql comment to be applied to the query
+ * @param parameterTypes parameter type map
+ * @param callable Does the query string represent a callable object (i.e., proc)
+ */
public NamedSQLQueryDefinition(
- String query,
- SQLQueryReturn[] queryReturns,
- SQLQueryScalarReturn[] scalarReturns,
- List querySpaces,
- boolean cacheable,
- String cacheRegion,
- Integer timeout,
- Integer fetchSize,
- FlushMode flushMode,
- CacheMode cacheMode,
- boolean readOnly,
- String comment,
- Map parameterTypes,
- boolean callable
- ) {
+ String query,
+ String resultSetRef,
+ List querySpaces,
+ boolean cacheable,
+ String cacheRegion,
+ Integer timeout,
+ Integer fetchSize,
+ FlushMode flushMode,
+ CacheMode cacheMode,
+ boolean readOnly,
+ String comment,
+ Map parameterTypes,
+ boolean callable) {
super(
query.trim(), /* trim done to workaround stupid oracle bug that cant handle whitespaces before a { in a sp */
cacheable,
@@ -84,24 +121,37 @@
comment,
parameterTypes
);
- this.queryReturns = queryReturns;
- this.scalarReturns = scalarReturns;
+ this.resultSetRef = resultSetRef;
this.querySpaces = querySpaces;
this.callable = callable;
}
+ /**
+ * This form used from annotations (?). Essentially the same as the above using a
+ * resultset-mapping reference, but without cacheMode, readOnly, and comment.
+ *
+ * @param query The sql query string
+ * @param resultSetRef The result-set-mapping name
+ * @param querySpaces Any specified query spaces (used for auto-flushing)
+ * @param cacheable Whether the query results are cacheable
+ * @param cacheRegion If cacheable, the region into which to store the results
+ * @param timeout A JDBC-level timeout to be applied
+ * @param fetchSize A JDBC-level fetch-size to be applied
+ * @param flushMode The flush mode to use for this query
+ * @param parameterTypes parameter type map
+ * @param callable Does the query string represent a callable object (i.e., proc)
+ */
public NamedSQLQueryDefinition(
- String query,
- String resultSetRef,
- List querySpaces,
- boolean cacheable,
- String cacheRegion,
- Integer timeout,
- Integer fetchSize,
- FlushMode flushMode,
- Map parameterTypes,
- boolean callable
- ) {
+ String query,
+ String resultSetRef,
+ List querySpaces,
+ boolean cacheable,
+ String cacheRegion,
+ Integer timeout,
+ Integer fetchSize,
+ FlushMode flushMode,
+ Map parameterTypes,
+ boolean callable) {
this(
query,
resultSetRef,
@@ -119,38 +169,6 @@
);
}
- public NamedSQLQueryDefinition(
- String query,
- String resultSetRef,
- List querySpaces,
- boolean cacheable,
- String cacheRegion,
- Integer timeout,
- Integer fetchSize,
- FlushMode flushMode,
- CacheMode cacheMode,
- boolean readOnly,
- String comment,
- Map parameterTypes,
- boolean callable
- ) {
- super(
- query.trim(), /* trim done to workaround stupid oracle bug that cant handle whitespaces before a { in a sp */
- cacheable,
- cacheRegion,
- timeout,
- fetchSize,
- flushMode,
- cacheMode,
- readOnly,
- comment,
- parameterTypes
- );
- this.resultSetRef = resultSetRef;
- this.querySpaces = querySpaces;
- this.callable = callable;
- }
-
public SQLQueryReturn[] getQueryReturns() {
return queryReturns;
}
|