DEVIDM-51 - Added javaDoc.
DEVIDM-51 - Moved the sql transaction closer to the actual sql calls.