Javac warnings

I have replaced deprecated

Database.ReadOnly -> Database.READONLY

a simple one.

Looking at the other warnings of deprecation too.