[Major] moved OrderDao and ResourceDao factory methods to transaction

It makes using transaction feel easier.