@Target(value={METHOD,FIELD}) @Retention(value=RUNTIME) public @interface Id
Example: @Id public Long getId() { return id; }