i am fresher in hibernate. Can i create a common framework to insert into database tables using hashmap? Explanation: I have more tables in my database. table1 = {tablename1, column11, value11, column21, value21, ...columnN1, valueN1}. table2 = {tablename2, column12, value12, column22, value22, ...columnN2, valueN2}. ........... tableN = {tablenameN, column1N, value1N, column2N, value2N, ...columnNN, valueNN}.
Data structure for insert datas into tables. Parent HashMap (key=tableName1-N, value=object of Child HashMap) Child HashMap (key=column11-1N, value=value11-1N)
Datas can be collected/read from text file (eg:- tableName.txt) and put it into tables with table name is same as the name of text file.
Format of text file
tablename1.txt contents: [column11|column12|column13...] [value11|value12|value13....] [value21|value22|value23....] ........ [valueN1|valueN2|valueN3....]
I have more text files with different table names. And put the datas into corresponding tables w.r.t file name as table name.
Can anybody provide common hibernate solution for all table updates with contents of all text file contents?
|