Hi Rafa,
Based on quick read of your diff, I think you can replace most of the
where-clause and OBQuery with these lines:
final PriceList priceList = OBDal.getInstance().get(PriceList.class,
strMPriceListID);
if (priceList != null) {
strPriceListCurrency = pl.getCurrency().getId();
}
gr. Martiin
Rafa Roda @ Openbravo wrote:
> Hi Openbravo developers!
>
> I've been playing around a bit with DAL replacing an XSQL from a
> callout by a DAL OBQuery.
>
> The callout is SL_Project_PriceList.java [1], a simple callout that
> selects the Currency from the Price List chosen in the Multiphase or
> Service Project header.
>
> The diff attached does the job but I would like to know if it can be
> achieved in a cleaner way from a code perspective.
>
> Based on this, I would like to update the How-To Callout example [2]
> in order to use DAL OBQuery instead of an xSQL file.
>
> Thanks for any comment.
>
> Rafa Roda Palacios
>
> [1]
> https://code.openbravo.com/erp/devel/pi/file/74eb0fd11265/src/org/openbravo/erpCommon/ad_callouts/SL_Project_PriceList.java
> [2]
> http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide/How_to_develop_a_callout
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> ------------------------------------------------------------------------
>
> _______________________________________________
> Openbravo-development mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openbravo-development
>
--
With Regards, Martin Taal
Openbravo
M: +31 6 288 48 943
@: [email protected]
Skype: martintaal
Openbravo Headquarters:
P: +34 93 27 25 947
F: +34 93 27 25 905
Address: Edificio Slan, Planta 2a, Landaben, Calle J, 31012 Pamplona, Navarra,
Spain
Mailing address: PO Box 5117, 31010 Pamplona, Navarra, Spain
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Openbravo-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-development