[
https://issues.apache.org/jira/browse/OFBIZ-1968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12858252#action_12858252
]
Scott Gray commented on OFBIZ-1968:
-----------------------------------
Here's an example of using groovy's Categories with existing util classes:
{code}
import org.ofbiz.entity.util.EntityUtil;
taxInfos = delegator.findByAnd("PartyTaxAuthInfo", [partyId :
billingParty.partyId, taxAuthGeoId : taxRate.taxAuthGeoId, taxAuthPartyId :
taxRate.taxAuthPartyId])
use (EntityUtil) {
// Equivalent to EntityUtil.filterByDate(taxInfos);
dateFilteredTaxInfos = taxInfos.filterByDate();
}
{code}
> Enrich Groovy integration with Ofbiz framework
> ----------------------------------------------
>
> Key: OFBIZ-1968
> URL: https://issues.apache.org/jira/browse/OFBIZ-1968
> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Reporter: Anil K Patel
> Priority: Minor
>
> Enrich Groovy integration with Ofbiz framework in order to bring goodies of
> Minilang to Groovy scripts. Start with simple things like use
> findByPrimaryKey in groovy scripts without having to prefix it with delegator
> and then automatically find values for primary key fields from environment if
> they are not explicitly passed in the call. Later other similar goodies of
> minilang can be added.
> Use Groovy to add DSL where possible.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira