public void updateProject(Project project, Session session) {
   verifySession(session);
   if (generator == null) {
     generator =
         new StoredProcedureGeneratorForAdapter(new SchemaManager((DatabaseSession) session));
     generator.setUseTableNames(true);
   }
   removeOptimisticLocking(project);
   ((DatabaseSession) session).addDescriptors(project);
   generator.generateStoredProceduresDefinitionsForProject(project);
   generator.amendDescriptors();
 }
 public void updateDatabase(Session session) {
   try {
     generator.writeStoredProcedures();
   } finally {
     clear();
   }
 }