Created
March 24, 2012 12:20
-
-
Save php-coder/2181923 to your computer and use it in GitHub Desktop.
Lombok annotations at members and at class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
@Table(name = "countries") | |
@Getter | |
@Setter | |
public class Country { | |
public static final int NAME_LENGTH = 50; | |
@Id | |
@GeneratedValue | |
private Integer id; | |
@Column(length = NAME_LENGTH, unique = true, nullable = false) | |
private String name; | |
@Column(name = "created_at", nullable = false) | |
private Date createdAt; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
@Table(name = "countries") | |
public class Country { | |
public static final int NAME_LENGTH = 50; | |
@Getter | |
@Setter | |
@Id | |
@GeneratedValue | |
private Integer id; | |
@Getter | |
@Setter | |
@Column(length = NAME_LENGTH, unique = true, nullable = false) | |
private String name; | |
@Getter | |
@Setter | |
@Column(name = "created_at", nullable = false) | |
private Date createdAt; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment