Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lombok with hibernate

Is this possible? Haven't seen much discussion on it.

like image 356
javaguy Avatar asked Feb 01 '11 18:02

javaguy


1 Answers

Sure! It works great from my experience. Here's an example entity:

@Entity @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public class PingerEntity {     // ID     @Id     @Getter     @Setter     @GeneratedValue(strategy = GenerationType.AUTO)     private Long id;       // USER     @Getter     @Setter     @ManyToOne(fetch = FetchType.LAZY, optional = false)     private UserEntity user;       // URL     @Getter     @Setter     @Basic(optional = false)     private String url;       /**      * The number of seconds between checks      */     @Getter     @Setter     @Basic(optional = false)     private int frequency;        @Getter     @Setter     @Basic(optional = false)     @Enumerated(EnumType.STRING)     public MonitorType monitorType; } 
like image 139
wmacura Avatar answered Oct 04 '22 06:10

wmacura