cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Timofeev (JIRA)" <>
Subject [jira] [Created] (CAY-2527) API to map Object[] result to POJO
Date Wed, 06 Feb 2019 09:16:00 GMT
Nikita Timofeev created CAY-2527:

             Summary: API to map Object[] result to POJO
                 Key: CAY-2527
             Project: Cayenne
          Issue Type: Task
          Components: Core Library
            Reporter: Nikita Timofeev
            Assignee: Nikita Timofeev
             Fix For: 4.2.M1

There are several queries that can return {{Object[]}} as a result (like {{ColumnSelect}}
or {{SQLSelect}}). It can be much more convenient if we can map this result to some POJO.

API usage example:
class MyPojo {
    String name;
    long count;
    MyPojo(Object[] data) { = (String)data[0];
        this.count = (Long)data[1];
List<MyPojo> result = ObjectSelect
    .columnQuery(Artist.class, Artist.ARTIST_NAME, Artist.PAINTING_ARRAY.count())

This message was sent by Atlassian JIRA

View raw message