Assuming that (using JPA) I have an entity with an id:
...
@Id
@TableGenerator(name = "EVENT_GEN",
table = "SEQUENCES",
pkColumnName = "SEQ_NAME",
valueColumnName = "SEQ_NUMBER",
pkColumnValue = "ID_SEQUENCE",
allocationSize=1)
private Long id;
...
how can I declare a custom annotation so the above id mapping will be :
@CustomIdAnnotation
private Long id
May be something like this SO answer.