Le 13/12/2010 08:56, Nicolas Malin a écrit :
Le 12/12/2010 01:32, Adam Heath a écrit :
BJ Freeman wrote:
most of the frame works are objects.
so how would you implement your object in simple-methods
like GenericValue?
These new classes are still GenericValue, while also being more specific.

class Party extends GenericValue {}
This system already exist with neogia addons. If you install the persistance layer with ofbiz-generator addons you have a "simulation" ORM over entity engine. It's not a greate revolution, we use this only for big customer project.

Nicolas
Just an example from neogia accounting components :

        String transId = (String) context.get(AcctgTransaction.transId);
AcctgTransaction acctgTransaction = AcctgTransactionServices.findByPrimaryKey(delegator, transId); List<AcctgTransactionItem> listAcctgTransactionItems = acctgTransaction.getAcctgTransactionItemsWC();

if (AcctgTransactionStatus.FINALIZED.equals(acctgTransaction.getStatusId())) { return ServiceUtil.returnSuccess(UtilProperties.getMessage(resource, "NaccountingAlreadyFinalized", locale));
        }

We also extend delegator interface :

List<AcctgTransaction> transactions = delegator.findNList(AcctgTransaction.ENTITY_NAME, EntityExpr.makeCondition(UtilMisc.toMap(AcctgTransaction.statusId, AcctgTransactionStatus.WIP)), null, null, null, false);

Nicolas

--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/

Reply via email to