details: https://code.openbravo.com/erp/devel/pi/rev/d48fd49cb8fe
changeset: 20411:d48fd49cb8fe
user: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date: Tue May 21 17:37:29 2013 +0530
summary: Related to Issue 23743 : Code refactoring
Moved logic from createQueryString to getWhereAndOrderBy method.
diffstat:
src/org/openbravo/dal/service/OBQuery.java | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (23 lines):
diff -r a9613416cdd7 -r d48fd49cb8fe src/org/openbravo/dal/service/OBQuery.java
--- a/src/org/openbravo/dal/service/OBQuery.java Tue May 21 12:12:36
2013 +0200
+++ b/src/org/openbravo/dal/service/OBQuery.java Tue May 21 17:37:29
2013 +0530
@@ -246,9 +246,7 @@
String createQueryString() {
// split the orderby and where
- String qryStr = getWhereAndOrderBy();
- // replace WHERE keyword to lowercase as hql exception is generated in
org.hibernate.hql.PARSER
- qryStr = qryStr.replaceAll("WHERE", "where");
+ final String qryStr = getWhereAndOrderBy();
final String orderByClause;
String whereClause;
final int orderByIndex = qryStr.toLowerCase().indexOf(ORDERBY);
@@ -500,6 +498,8 @@
* @return the where and order by clause used in the query
*/
public String getWhereAndOrderBy() {
+ // replace WHERE keyword to lowercase as hql exception is generated in
org.hibernate.hql.PARSER
+ whereAndOrderBy = whereAndOrderBy.replaceAll("WHERE", "where");
return whereAndOrderBy;
}
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits