简体   繁体   中英

Manually create Resultset / CachedRowSet

I am developing an application where my app will get data from some other source in delimited format (raw data), then I need to convert the raw data to either resultset or cachedrowset, then I will pass the constructed resulset / cachedrowset to the client app (which calls my app to get data).

I've previously developed a .Net app which can achievethis by using DataTable (data constructed without connection).

However, I do not know how to achieve this in Java. Can anyone help?

I would create a Model(POJO) class , I will populate data from resultset to model class object . Convert it into json or xml. And send it as response to the Client application.

Java Object to xml conversion See : What is the best way to convert a java object to xml with open source apis

Java Object to json conversion : Follow tutorial here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM