REIVEW: [NX-518] Orient database manager

This PR addresses the following issues:

https://issues.sonatype.org/browse/NX-518
https://issues.sonatype.org/browse/NX-519
https://issues.sonatype.org/browse/NX-542
cool, wasn't aware of checkState...will have to start using that instead of throwing ISE