Bug on my Ceiling

(Bug on my Ceiling uploaded by brownpau.)

This spotted green beetle flew into my room and landed on my ceiling several nights ago. I was able to coax it into a jar and let it back out the window, but I sure hope it didn’t lay any eggs on my plants while it was visiting. Anyone know what kind of beetle this is, and if it’s a predator or herbivore?