Hello,
I am thinking to make one select, update and insert query dynamically despite to use them with different column names every time in the project.
For example I want to do
1) how many Strings and Integer parameter will be passed
2) then these number of parameter will be set as method parameters e.g. public
String query(int i1, int i2, String str1, Str2, Str3){
3) columns name will be passed according to the number of parameters already set
4) table, where clause or order by condition parameter will be set
5) and preparedStatement setInt or setString will be set according to the number of passed parameters
In my view that will be good way to call this method every time for any select, update and insert query because we'll make three methods for select, insert and update and all related queries will work
Please advise?
Best regards