Drop obsolete method getDatabase() and add type hint.