Not much you can do, other than introduce an interface that just refines GenericRepository
public interface LongKeyedRepository>
extends GenericRepository { {
//No new methods need to be defined
}
Then you can have
private LongKeyedRepository myEntityRepository;
etc.