Fri, 28 Feb 2014 11:23:32 +0100[Relaxing Reconciliations] New buttons to be able to edit old documents
Eduardo Argal Guibert <eduardo.argal@openbravo.com> [Fri, 28 Feb 2014 11:23:32 +0100] rev 22292
[Relaxing Reconciliations] New buttons to be able to edit old documents

Thu, 27 Feb 2014 20:13:13 +0100[xsql-scrollabe] Convert ReportGeneralLedger to scrollable xsql
Stefan Hühner <stefan.huehner@openbravo.com> [Thu, 27 Feb 2014 20:13:13 +0100] rev 22291
[xsql-scrollabe] Convert ReportGeneralLedger to scrollable xsql
This make it possible to run huge dataset with this report without out of
memory problems.

Changes:
- printPageXls:
- use scrollable version instead of [] version
- add important finally block to call close() always
- use .hasData() instead of [].length != 0
- use LimitRowsScrollableFieldProvider utility class instead of manually checking [].length >limit
- printPagePdf:
- use scrollable version instead of [] version
- add finally to call close() always
- use .hasData() instead of [].length != 0
- Rewrite manual loop over [] to add data to use new private helper class Addtotals based
on AbstractScrollableFieldProviderFilter.
This allows to modify row by row as it is processed.
The code doing the data modification per row is unchanged compare to the initial version.
Just the explicit loop goes away
- printPageHtml
This function uses the same select but is adding limit/offset so it did not have the memory problem,
so no need to rewirte all of the printPageHtml to not have a [].
To not need to duplicate all the select method into a scrolling & non-scrolling one we call the scrolling
function but then build a FieldProvider[] again when calling the method to avoid rewriting the rest of
the printPageHtml function.

Thu, 27 Feb 2014 20:06:54 +0100[xsql-scrolling] Implement reading of xsql results using a scrollable interface
Stefan Hühner <stefan.huehner@openbravo.com> [Thu, 27 Feb 2014 20:06:54 +0100] rev 22290
[xsql-scrolling] Implement reading of xsql results using a scrollable interface
This implements a new optional feature to the Sqlc codegen for xsql files.

It can be activated per SqlMethod by using return="scrollable" instead of the
typtical return="multuple".

When used the interface for using this SqlMethod changes. Instead of it returning
an array of the generated class (i.e. ReportGeneralLedgerData[]) now it returns
a single instance of this class. However this class then implements a new interface
called 'ScrollableFieldProvider'.
This interface allows to read the result row by row without loading all of it into
memory avoiding huge memory usage and out of memory problems when processing a lot
of result rows.

Additionally this adds a new version of the renderJR-method which allows to pass
this data directly to jasper allowing streaming of data from xsql up to jasper
without loading all of the rows ever into memory.

Note: that Sqlc code-generation is completely unchanged for all code not explicitely
using the new feature.

As now not all results are available at the same tiem code which is looking at or
modifying such data before passing to to JasperReports needs to be adapted.

Included here is one helper class to implement a common case of checking number
of result rows and stopping processing is a limit is exceeded.
This is used in several records to comply with row-number restriction on xls export.

Common pattern to convert simple jasper call:
Before:
FieldProvider[] data = SomeDataClass.select (....);
renderJR(...., data, .... );

After:

ScrollableFieldProfier data = null;
try {
data= SomeDataclass.select( .... );
renderJR(..., data, ....);
} finally {
if (data != null) {
data.close();
}

IMPORTANT NOTE: It is very important to add this finally block which calls close() always as before calling close
a connection, transaction, result set for this query are kept open.

And all those must be close always (!)

The finally block allows to do this easily in case of success and error.

Thu, 27 Feb 2014 15:38:49 +0100[xsql-scrollabe] Small cleanup + refactor of ReportGeneralLedger
Stefan Hühner <stefan.huehner@openbravo.com> [Thu, 27 Feb 2014 15:38:49 +0100] rev 22289
[xsql-scrollabe] Small cleanup + refactor of ReportGeneralLedger
In preparation of converting that report to use scrollable xsql result do the
following cleanup + changes to make that easier
- Remove many isDebugEnabled calls, as that code is not very hot (so not called
many many times) no gain in performance for those calls and make code harder
to read.
- Remove some unsued variables + a duplicate call to getFamily
- Move checks of having both date from & date to non empty to be early in
the code and to raise error + stop process there (return).
That allow to not add extra indent to following code.
- move setting of elementvalueto to be =elementvaluefrom if it was
not specified to be earlier.

Thu, 27 Feb 2014 15:31:52 +0100[xsql-scrollable] Refactor sqlc: extract reading one result row into new method
Stefan Hühner <stefan.huehner@openbravo.com> [Thu, 27 Feb 2014 15:31:52 +0100] rev 22288
[xsql-scrollable] Refactor sqlc: extract reading one result row into new method
- Extract the code-generation for reading one row of a query result into
and instance of the generated class into a helper method. That allows
to call that later from multiple place.
- Note: Just refactoring zero change in generated code.

Thu, 27 Feb 2014 15:27:52 +0100[xsql-scrollable] Refactor Sqlc initClass generation
Stefan Hühner <stefan.huehner@openbravo.com> [Thu, 27 Feb 2014 15:27:52 +0100] rev 22287
[xsql-scrollable] Refactor Sqlc initClass generation
- split out header part into own StringBuffer
- prepare to allow builindg part of header only after
all the xsql file has been parsed instead of building
all after parsing only first method.
This allows to include data known only after parsing all the file
into the generated header.
- Just refactoring no change in generated code.
Diffing build/javasqlc before and after this commit show no changes

Thu, 27 Feb 2014 22:54:19 +0530Fixes Issue 0025859: Enable to run Payment Aging Reports.
Atul Gaware <atul.gaware@openbravo.com> [Thu, 27 Feb 2014 22:54:19 +0530] rev 22286
Fixes Issue 0025859: Enable to run Payment Aging Reports.

Mon, 24 Feb 2014 17:54:36 +0530Fixes Issue 25010:Remove Created Payment msg when error in add payment from inv
Atul Gaware <atul.gaware@openbravo.com> [Mon, 24 Feb 2014 17:54:36 +0530] rev 22285
Fixes Issue 25010:Remove Created Payment msg when error in add payment from inv

Thu, 27 Feb 2014 10:37:19 +0100Merge back from main
RM packaging bot <staff.rm@openbravo.com> [Thu, 27 Feb 2014 10:37:19 +0100] rev 22284
Merge back from main

Thu, 27 Feb 2014 09:30:29 +0000Merge temporary head for 3.0MP31.2
RM packaging bot <staff.rm@openbravo.com> [Thu, 27 Feb 2014 09:30:29 +0000] rev 22283
Merge temporary head for 3.0MP31.2