edigitman icon

Tuple to Jasper JRMapCollectionDataSource

edigitman | PRO | 07/31/24 07:57:30 PM UTC | 0 ⭐ | 13951 👁️ | Never ⏰ | [Database, Auomatic Columns]
Java |

590 B

|

Source Code

|

0 👍

/

0 👎

private Collection<Map<String, ?>> getFormattedRows(List<Tuple> queryRows) {
        final Collection<Map<String, ?>> formattedRows = new ArrayList<>();
        queryRows.forEach(row -> {
            final Map<String, Object> formattedRow = new HashMap<>();
 
            row.getElements().forEach(column -> {
                final String columnName = column.getAlias();
                final Object columnValue = row.get(column);
                formattedRow.put(columnName, columnValue);
            });
            formattedRows.add(formattedRow);
        });
        return formattedRows;

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎