Planned to re-structure the SQLStatementRemove class on the following pattern.
1) Writing Getters and Setters methods for the private class attributes.
2) buildStatement Method
a) I think it is better to remove the part of getting collumn info for identities from this method and instead we pass the ID's array as parameter to buildStatement method. getColumninfoforidentities should be performed in the class who is calling buildStatement method.
b) or 2nd approach would be that we do getColumninfoforidentities in the constructor at the time of initialization because it will be used by both buildStatment method and executeStatement method
a) Same as above. Shift getColumnInfoforIdentities from it and then pass it as a parameter. or call it in constructor. I think doing the above functionality in constructor seems good idea. Suggestions?
b) Separate the prepareStatement stuff from this method to the separate method which just prepares the statment for the connection passed as parameter
c) Shift the identity size check from this method because it is not the processing of this layer
d) Shift extended.delete(con, identity) from this method
The code will be more structured and readable then.
Hi Ralf, Can you please guide me where can I shift the code of getcolumninfoforidentities, identity size check and extended delete ?
I went through different classes and I think SQLEngine is playing with the identities and extended stuff. Can you please point me to the actual code which is making use of this SQLStatmentRemove class so that we can shift that code there.
Any comments or suggestions Please.