mirror of
https://github.com/tiennm99/lombok.git
synced 2026-05-26 00:01:06 +00:00
18 lines
515 B
Plaintext
18 lines
515 B
Plaintext
import lombok.AllArgsConstructor;
|
|
import lombok.Getter;
|
|
import lombok.Setter;
|
|
|
|
import javax.inject.Inject;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Column;
|
|
import javax.validation.constraints.Max;
|
|
|
|
@AllArgsConstructor(onConstructor=@__(@Inject))
|
|
public class OnXExample {
|
|
// @Getter(onMethod=@__({@Id, @Column(name="unique-id")})) //JDK7
|
|
// @Setter(onParam=@__(@Max(10000))) //JDK7
|
|
@Getter(onMethod_={@Id, @Column(name="unique-id")}) //JDK8
|
|
@Setter(onParam_=@Max(10000)) //JDK8
|
|
private long unid;
|
|
}
|