Morning.
I need to add indexing in hibernate entity. As I know it is possible to do using @Index annotation to specify index for separate column but I need an index
You'd better go with a composite primary key.
This article explains how to do it with JPA annotations. It uses @Embeddable and @EmbeddedId
@Embeddable
@EmbeddedId