I m having many dataobjects (*.java)(having getters and setters)

My requirement is that, I want to write a generic Method, which will accept argument as Object and will call all getters of that Object.

Basically I want to write a log file with all dataobjects which are going to be inserted in database. When I insert into database, log will be written to log file.

How can we get all getters of Object ?

Is it possible ?

Or otherwise simply I have to do explicit casting........ ???