TRUNK-4496 Moved sql query from service to Dao to remove the sql level a...

...ccess privelege required for saving an order