I moved a site from one domain to another (essentially what you're doing) and it took 4 to 5 months to regain all previous rankings. After doing the actual move (which was easy, I redirected everything so I didn't have to go page by page) I contacted sites linking to me and asked them to update their links. This is something you should do. Many webmasters are responsive, and the most powerful links I had were moved within a week. This will help you recover faster than you otherwise might.
This code will do your entire site, and redirect all non-www traffic to www.
Code:
RewriteEngine on
rewriteCond %{HTTP_HOST} ^(www\.)?OLDDOMAIN\.com$ [NC]
rewriteRule ^(.*)$ http://www.NEWDOMAIN.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^NEWDOMAIN\.com
RewriteRule (.*) http://www.NEWDOMAIN.com/$1 [R=301,L]