Skip to content

Create a list of objects from 1 resultset from a database in one iteration over the results

Notifications You must be signed in to change notification settings

lojones/ParseListFromDb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Given a table of results, how do you extract the data into java objects (pojo's) if one object consists of data from multiple rows?

In this example the data from the db looks something like this

ID City
1 Toronto
1 London
1 NY
2 LA
2 Tokyo

This gets converted to a list of pojos that looks like this

User id:1 cities:Toronto,London,NY

User id:2 cities:LA,Tokyo

About

Create a list of objects from 1 resultset from a database in one iteration over the results

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages