|
From: <hib...@li...> - 2006-05-10 16:58:27
|
Author: ste...@jb...
Date: 2006-05-10 12:58:09 -0400 (Wed, 10 May 2006)
New Revision: 9922
Modified:
trunk/Hibernate3/src/org/hibernate/sql/Template.java
Log:
added back renderWhereStringTemplate() signature needed by annotations
Modified: trunk/Hibernate3/src/org/hibernate/sql/Template.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/sql/Template.java 2006-05-10 13:40:04 UTC (rev 9921)
+++ trunk/Hibernate3/src/org/hibernate/sql/Template.java 2006-05-10 16:58:09 UTC (rev 9922)
@@ -70,11 +70,29 @@
public static String renderWhereStringTemplate(String sqlWhereString, Dialect dialect, SQLFunctionRegistry functionRegistry) {
return renderWhereStringTemplate(sqlWhereString, TEMPLATE, dialect, functionRegistry);
}
-
+
/**
+ * Same functionality as {@link #renderWhereStringTemplate(String, String, Dialect, SQLFunctionRegistry)},
+ * except that a SQLFunctionRegistry is not provided (i.e., only the dialect-defined functions are
+ * considered). This is only intended for use by the annotations project until the
+ * many-to-many/map-key-from-target-table feature is pulled into core.
+ *
+ * @deprecated Only intended for annotations usage; use {@link #renderWhereStringTemplate(String, String, Dialect, SQLFunctionRegistry)} instead
+ */
+ public static String renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect) {
+ return renderWhereStringTemplate( sqlWhereString, placeholder, dialect, new SQLFunctionRegistry( dialect, java.util.Collections.EMPTY_MAP ) );
+ }
+
+ /**
* Takes the where condition provided in the mapping attribute and interpolates the alias.
* Handles subselects, quoted identifiers, quoted strings, expressions, SQL functions,
* named parameters.
+ *
+ * @param sqlWhereString The string into which to interpolate the placeholder value
+ * @param placeholder The value to be interpolated into the the sqlWhereString
+ * @param dialect The dialect to apply
+ * @param functionRegistry The registry of all sql functions
+ * @return The rendered sql fragment
*/
public static String renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect, SQLFunctionRegistry functionRegistry ) {
//TODO: make this a bit nicer
|