cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cayenne] stariy95 opened a new pull request #401: CAY-2527 Map Object[] result to pojo
Date Wed, 07 Aug 2019 14:19:20 GMT
stariy95 opened a new pull request #401: CAY-2527 Map Object[] result to pojo
URL: https://github.com/apache/cayenne/pull/401
 
 
   This PR adds simple `map(Function<T,R> mapper)` method to all fluent queries that
can return `Object[]` result.
   
   Usage example:
   ```java
   class ArtistDTO {
       ArtistDTO(Object[]) {
            // ...
       }
   }
   // ...
   List<ArtistDTO> result = ObjectSelect.columnQuery(Artist.class, Artist.ARTIST_NAME,
Artist.DATE_OF_BIRTH)
                   .map(ArtistDTO::new)
                   .select(context);
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message