add index attribute for pojo