Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036678
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] Y. DBSourceManagerminorhave not tried2017-08-21 12:502017-09-21 16:49
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version3.0PR17Q4
StatusclosedFix in branchFixed in SCM revisionfca6041ae989
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036678: Improve the way the DataSetTableQueryGenerator class can be extended

DescriptionThe DataSetTableQueryGenerator class is able to create SQL queries to fetch the records of a given dataset. The code that invoke it can customize the query by passing the DataSetTableQueryGeneratorExtraProperties, but now there is an need to allow subclasses of DataSetTableQueryGenerator to add further customizations.

This could be done by defining a protected method in DataSetTableQueryGenerator that by default does nothing but that can be overwritten by subclasses to add the customizations they require.
Steps To Reproduce-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
has duplicate feature request 0036440 closedAugustoMauch Allow subclasses of DataSetTableQueryGenerator to customize generated query where clause 

-  Notes
(0098653)
hgbot (developer)
2017-08-25 13:15

Repository: erp/devel/dbsm-main
Changeset: 8d4deebe4ce8c7f0ed835055de2dd7139bf0cf05
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Aug 21 13:44:43 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/8d4deebe4ce8c7f0ed835055de2dd7139bf0cf05 [^]

Related with issue 36678: Supports more than one WhereClauseSimpleExpression

The way the WhereClauseSimpleExpression where iterated to build a where clause was wrong, as if there were more than one the query would be built without joining each where clause with an 'AND' keyword.

---
M src/org/apache/ddlutils/io/DataSetTableQueryGenerator.java
---
(0098654)
hgbot (developer)
2017-08-25 13:15

Repository: erp/devel/dbsm-main
Changeset: dad61522fa209772608a913632c51251bdbdfbfb
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Aug 21 13:46:12 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/dad61522fa209772608a913632c51251bdbdfbfb [^]

Fixes issue 36678: Where clause can be customized by query generator subclass

Classes that extend DataSetTableQueryGenerator can now customize the where clause by overwriting the customizeExtraProperties method. The customization is done by adding WhereClauseSimpleExpression to the DataSetTableQueryGeneratorExtraProperties passed as parameter.

---
M src/org/apache/ddlutils/io/DataSetTableQueryGenerator.java
---
(0098655)
hgbot (developer)
2017-08-25 13:15

Repository: erp/devel/dbsm-main
Changeset: 3951b20a691dc0791f87aed12e6cb78a040bbc69
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Aug 21 14:59:09 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/3951b20a691dc0791f87aed12e6cb78a040bbc69 [^]

Related with issue 36678: Includes tableName parameter in transformWhereClause

Classes that extend DataSetTableQueryGenerator sometimes need to know the name of the table being exported in order to know how to transform its query. For instance, depending on the table being exported sometimes a clause to exclude the records defined for client 0.

Now that table name is passed as a parameter to transformWhereClause. It is an API change, but it does not have any consequences, I checked that no one else is invoking that method.

---
M src/org/apache/ddlutils/io/DataSetTableQueryGenerator.java
---
(0098675)
alostale (manager)
2017-08-29 08:04

reviewed
(0098728)
hgbot (developer)
2017-08-30 11:15

Repository: erp/devel/pi
Changeset: fca6041ae989885963e9ce1cbb01816d8cc478d2
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Aug 30 10:51:37 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fca6041ae989885963e9ce1cbb01816d8cc478d2 [^]

Fixes issue 36678: Where clause can be customized by query generator subclass

Classes that extend DataSetTableQueryGenerator can now customize the where clause by overwriting the customizeExtraProperties method. The customization is done by adding WhereClauseSimpleExpression to the DataSetTableQueryGeneratorExtraProperties passed as parameter.

Classes that extend DataSetTableQueryGenerator sometimes need to know the name of the table being exported in order to know how to transform its query. For instance, depending on the table being exported sometimes a clause to exclude the records defined for client 0.

Now that table name is passed as a parameter to transformWhereClause. It is an API change, but it does not have any consequences, I checked that no one else is invoking that method.

The way the WhereClauseSimpleExpression where iterated to build a where clause was wrong, as if there were more than one the query would be built without joining each where clause with an 'AND' keyword.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0099346)
hudsonbot (developer)
2017-09-21 16:49

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/9750b78d3e5c [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-08-21 12:50 AugustoMauch New Issue
2017-08-21 12:50 AugustoMauch Assigned To => AugustoMauch
2017-08-21 12:50 AugustoMauch Modules => Core
2017-08-21 12:50 AugustoMauch Triggers an Emergency Pack => No
2017-08-21 15:11 AugustoMauch Relationship added has duplicate 0036440
2017-08-25 13:15 hgbot Checkin
2017-08-25 13:15 hgbot Note Added: 0098653
2017-08-25 13:15 hgbot Checkin
2017-08-25 13:15 hgbot Note Added: 0098654
2017-08-25 13:15 hgbot Status new => resolved
2017-08-25 13:15 hgbot Resolution open => fixed
2017-08-25 13:15 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/dad61522fa209772608a913632c51251bdbdfbfb [^]
2017-08-25 13:15 hgbot Checkin
2017-08-25 13:15 hgbot Note Added: 0098655
2017-08-29 08:04 alostale Review Assigned To => alostale
2017-08-29 08:04 alostale Note Added: 0098675
2017-08-29 08:04 alostale Status resolved => closed
2017-08-29 08:04 alostale Fixed in Version => 3.0PR17Q4
2017-08-30 11:15 hgbot Checkin
2017-08-30 11:15 hgbot Note Added: 0098728
2017-08-30 11:15 hgbot Status closed => resolved
2017-08-30 11:15 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/dbsm-main/rev/dad61522fa209772608a913632c51251bdbdfbfb [^] => http://code.openbravo.com/erp/devel/pi/rev/fca6041ae989885963e9ce1cbb01816d8cc478d2 [^]
2017-09-01 08:35 alostale Status resolved => closed
2017-09-21 16:49 hudsonbot Checkin
2017-09-21 16:49 hudsonbot Note Added: 0099346


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker