Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

.NET dataset in java

 
liana lim
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to know if there is a tool like .NET dataset but in java

i need to perform like this :
// BIG PROCESS begin
process a begin
get data from database
process
save result to database
end process a

process b begin
get data from database(which is process a result)
process
save result to database
end process b

next process ....
///BIG PROCESS end

i want to cut database access, because it make the application work slower.
thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A ResultSet is probably what you are looking for.
 
liana lim
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i already try resultset, i can't update resultset without update the database
i use 2 commands to update resultset
resultset.updateString(index,string) and resultset.updateRow()
with those command both of resultset and database get updated.

// BIG PROCESS begin
process a begin
get data from database
process
save result to resultset
end process a

process b begin
get data from resultset(which is process a result)
process
save result to resultset
end process b

next process ....
///BIG PROCESS end
save data to database

can i do like that with resultset. if i can, how?
thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cache your results in a Collection of some sort.
 
stefano bitossi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you could search for some library implementing the cachedrowset interface (http://download.oracle.com/javase/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html , http://download.oracle.com/docs/cd/E17824_01/dsc_docs/docs/jscreator/apis/rowset/com/sun/rowset/CachedRowSetImpl.html ) , otherwise you'll have to make it by yourself. A dataset is a collection of Table objects (a bean in java) which holds a list of rows , and a set of Adapters , objects which manages the connections and the queries between db and your application using tables
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic