Hi I generate Dao classes for some DB operations
in this manner making methods of Dao class as static or none static is better?
Using sample dao class belo
this code is not thread-safe the way you have it written.
if you have the dataAccessor field and the methods static like this, you will have concurrency problems with multiple clients hitting this code at the same time. it's likely you'll have very strange exceptions occuring, and even possible that one client could see another client's data.
get rid of static on these methods and this field and instantiate a new instance of SampleDao for each client.