Java – how to store objects from a database?
I am developing a Java application that will graphically depict and organize hundreds of objects Each of these objects is loaded from the SQL database for use in this program
I plan to keep a local copy of all data, retrieve it through a JDBC connection, and sort it locally (probably the same as merge sort, because this is my favorite)
How would you advise me to store data locally? Ideally, it is easy to traverse, sort, and compare source databases
At present, I have some objects called ideas, which are populated from the database Then, to display them, I created the same number of ideagraphics objects and added them to the appropriate jpanels This can be slow sometimes
Solution
You can implement the comparator interface and use collections Sort(), a modified mergeport, as shown in here