You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Scott Gray (JIRA)" <ji...@apache.org> on 2011/06/25 11:00:48 UTC
[jira] [Closed] (OFBIZ-4307) New method to filter one field from a
list of GenericValues (to a List of Strings)
[ https://issues.apache.org/jira/browse/OFBIZ-4307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott Gray closed OFBIZ-4307.
-----------------------------
Resolution: Not A Problem
Hi Mirko, thanks for your contribution but I'm afraid there is already a method in EntityUtil that performs the same function. see getFieldListFromEntityList(...).
> New method to filter one field from a list of GenericValues (to a List of Strings)
> ----------------------------------------------------------------------------------
>
> Key: OFBIZ-4307
> URL: https://issues.apache.org/jira/browse/OFBIZ-4307
> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Affects Versions: SVN trunk
> Reporter: Mirko Vogelsmeier
> Priority: Minor
> Attachments: EntityUtil.java.patch
>
>
> Hi there,
> in the past i often got Lists of GenericValues that only contained a GenericValue with one field each, because the delegator already filtered the result.
> Like you want to filter "orderHeader" for a service to work with the orderId. In this case you got a list of GenericValues with only the field "orderId". But to work with the List you still always have to do .get to extract the one field.
> I added a method that is able to filter a List<GenericValue> to a List<String>.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira