How to lock the screen to a specified orientation?

■ Summary
The following code snippet demonstrates how to lock the screen to a specified orientation.

■ Reference Sites
http://download.tizen.org/misc/examples/w3c_html5/device/the_screen_orientation_api/screen_orientation.html