Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036678Openbravo ERPY. DBSourceManagerpublic2017-08-21 12:502017-09-21 16:49
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
3.0PR17Q4 
alostale
Core
No
0036678: Improve the way the DataSetTableQueryGenerator class can be extended
The 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.
-
No tags attached.
has duplicate feature request 0036440 closed AugustoMauch Allow subclasses of DataSetTableQueryGenerator to customize generated query where clause 
Issue History
2017-08-21 12:50AugustoMauchNew Issue
2017-08-21 12:50AugustoMauchAssigned To => AugustoMauch
2017-08-21 12:50AugustoMauchModules => Core
2017-08-21 12:50AugustoMauchTriggers an Emergency Pack => No
2017-08-21 15:11AugustoMauchRelationship addedhas duplicate 0036440
2017-08-25 13:15hgbotCheckin
2017-08-25 13:15hgbotNote Added: 0098653
2017-08-25 13:15hgbotCheckin
2017-08-25 13:15hgbotNote Added: 0098654
2017-08-25 13:15hgbotStatusnew => resolved
2017-08-25 13:15hgbotResolutionopen => fixed
2017-08-25 13:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/dad61522fa209772608a913632c51251bdbdfbfb [^]
2017-08-25 13:15hgbotCheckin
2017-08-25 13:15hgbotNote Added: 0098655
2017-08-29 08:04alostaleReview Assigned To => alostale
2017-08-29 08:04alostaleNote Added: 0098675
2017-08-29 08:04alostaleStatusresolved => closed
2017-08-29 08:04alostaleFixed in Version => 3.0PR17Q4
2017-08-30 11:15hgbotCheckin
2017-08-30 11:15hgbotNote Added: 0098728
2017-08-30 11:15hgbotStatusclosed => resolved
2017-08-30 11:15hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/dad61522fa209772608a913632c51251bdbdfbfb [^] => http://code.openbravo.com/erp/devel/pi/rev/fca6041ae989885963e9ce1cbb01816d8cc478d2 [^]
2017-09-01 08:35alostaleStatusresolved => closed
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099346

Notes
(0098653)
hgbot   
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   
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   
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   
2017-08-29 08:04   
reviewed
(0098728)
hgbot   
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   
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