polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Merlin <paulmer...@apache.org>
Subject Re: toValueList, toValueMap, toValueSet
Date Sun, 04 Sep 2016 23:36:25 GMT
Le 2016-09-03 05:24, Niclas Hedhman a écrit :
> This has now been committed to develop.
> 
> The difference in client code is approx something like his;
> 
> UnitOfWork uow = uowf.currentUnitOfWork();
> Vets vets = uow.get( Vets.class, "<all vets>" );
> return vets
>     .vets()
>     .toList()
>     .stream()
>     .map( entity -> uow.toValue( Vet.class, entity ))
>     .collect( Collectors.toList() );
> 
> 
> compared to
> 
> UnitOfWork uow = uowf.currentUnitOfWork();
> Vets vets = uow.get( Vets.class, "<all vets>" );
> return uow.toValueList( vets.vets() );

Lovely!


Mime
View raw message