I need to store only current time (HH:mm:ss) in database. I am using hibernate and Oracle as db. What datatype should i use for time in my Bean class?
Also, what datatype should i use in oracle (for table creation)?
Oracle does not have a time only data type. As far as your object is concerned you can use a java.sql.time object or you can use a Date or Calandar object and annotate it with @Temporal(TemporalType.TIME)