From 8040c6e32d377b1766c023c6ee59143b22e16f69 Mon Sep 17 00:00:00 2001 From: Yoryos Valotasios Date: Tue, 23 Nov 2010 00:25:14 +0200 Subject: [PATCH] SQLServer2005Dialect: Moved the small methods on top of the class --- .../dialect/SQLServer2005Dialect.java | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/core/src/main/java/org/hibernate/dialect/SQLServer2005Dialect.java b/core/src/main/java/org/hibernate/dialect/SQLServer2005Dialect.java index 1a538eb4ad..fbd3792aa4 100644 --- a/core/src/main/java/org/hibernate/dialect/SQLServer2005Dialect.java +++ b/core/src/main/java/org/hibernate/dialect/SQLServer2005Dialect.java @@ -57,6 +57,31 @@ public class SQLServer2005Dialect extends SQLServerDialect { registerFunction("row_number", new NoArgSQLFunction("row_number", StandardBasicTypes.INTEGER, true)); } + @Override + public boolean supportsLimit() { + return true; + } + + @Override + public boolean useMaxForLimit() { + return true; + } + + @Override + public boolean supportsLimitOffset() { + return true; + } + + @Override + public boolean bindLimitParametersFirst() { + return false; + } + + @Override + public boolean supportsVariableLimit() { + return true; + } + @Override public int convertToFirstRowValue(int zeroBasedFirstResult) { // Our dialect isn't zero based. The first row should get the number 1 @@ -176,29 +201,4 @@ public class SQLServer2005Dialect extends SQLServerDialect { // Isert after the select statement the row_number() function: sql.insert(selectEndIndex, " ROW_NUMBER() OVER (" + orderby + ") as __hibernate_row_nr__,"); } - - @Override - public boolean supportsLimit() { - return true; - } - - @Override - public boolean useMaxForLimit() { - return true; - } - - @Override - public boolean supportsLimitOffset() { - return true; - } - - @Override - public boolean bindLimitParametersFirst() { - return false; - } - - @Override - public boolean supportsVariableLimit() { - return true; - } }