protected void configureDatabaseIdent ( String dbident ) { _dbident = dbident ; // give the repository a chance to do any schema migration before things get further // underway try { executeUpdate ( new Operation < Object > ( ) { public Object invoke ( Connection conn , DatabaseLiaison liaison ) throws SQLException , PersistenceException { migrateSchema ( conn , liaison ) ; return null ; } } ) ; } catch ( PersistenceException pe ) { log . warning ( "Failure migrating schema" , "dbident" , _dbident , pe ) ; } }
This is called automatically if a dbident is provided at construct time but a derived class can pass null to its constructor and then call this method itself later if it wishes to obtain its database identifier from an overridable method which could not otherwise be called at construct time .