refactory the aggregate root id generation implementation.