ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert G." <...@mercon24.de>
Subject Re: list<genericValue> check for value, get value
Date Fri, 22 Jun 2012 11:56:39 GMT
Thanks for your fast reply. The problem is, that with that method I get the
whole string, but I need the entity fields. My string what is printed now
looks like:

/[GenericEntity:ProductPriceRule][createdStamp,2012-06-20
23:37:56.898(java.sql.Timestamp)][createdTxStamp,2012-06-20
23:37:56.759(java.sql.Timestamp)][description,[10000] Panasonic PT-AX100
Projektor(java.lang.String)][fromDate,2012-06-20
23:37:56.81(java.sql.Timestamp)][isSale,Y(java.lang.String)][lastUpdatedStamp,2012-06-22
06:46:54.734(java.sql.Timestamp)][lastUpdatedTxStamp,2012-06-22
06:46:54.714(java.sql.Timestamp)][productPriceRuleId,10000(java.lang.String)][ruleName,DEAL(java.lang.String)][thruDate,2012-06-30
02:01:02.0(java.sql.Timestamp)] /

from this I f.ex. wannt to extract the thruDate etc.

Do you know how to handle?

Thanks :)



Ankit Jain wrote
> 
> Use EntityUtil.getFirst(List<GenericValue> values) it will return the
> first
> record of the list, internally it do values.get(0).
> 
> Regards,
> Ankit Jain
> 
> 
> 
> 
> On Fri, Jun 22, 2012 at 4:43 PM, Robert G. &lt;gan@&gt; wrote:
> 
>> Hey,
>>
>> I have a list as mentioned in the subject. This is created in the
>> PriceServices.Java file.
>>
>> My Problem is, that this list is size()=1. So all is written like 1 long
>> string. But this string contains important information about the price
>> rules, where I need f.ex the end-date from etc.
>>
>> Do you now how I can get these data out of it? Why it is just size=1?
>>
>> Normally I can use ".contains()" on lists...but with size=1 obviously it
>> does not work.
>>
>> please help me soon :)
>>
>> Thanks
>>
>> Robert
>>
>> --
>> View this message in context:
>> http://ofbiz.135035.n4.nabble.com/list-genericValue-check-for-value-get-value-tp4633929.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
> 


--
View this message in context: http://ofbiz.135035.n4.nabble.com/list-genericValue-check-for-value-get-value-tp4633929p4633934.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Mime
View raw message