Answers for "java.sql.Date jpa"

0

java.sql.Date jpa

@Entity
public class MyEntity {
 
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
     
    @Temporal(TemporalType.TIMESTAMP)
    private Date utilDate;
     
    @Temporal(TemporalType.DATE)
    private Calendar utilCalendar;
     
    ...
     
    public Date getUtilDate() {
        return utilDate;
    }
 
    public void setUtilDate(Date utilDate) {
        this.utilDate = utilDate;
    }
 
    public Calendar getUtilCalendar() {
        return utilCalendar;
    }
 
    public void setUtilCalendar(Calendar utilCalendar) {
        this.utilCalendar = utilCalendar;
    }
}
Posted by: Guest on September-05-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language