Esempio n. 1
0
 @SuppressWarnings({"rawtypes", "unchecked"})
 private void checkLoad(CatalogDAO catalog, Persistable obj, String defaultDatabase)
     throws Exception {
   // this is all about loading, so force the global cache to be cleaned out
   SchemaSourceFactory.reset();
   SchemaContext pc = buildContext(catalog);
   if (defaultDatabase != null) pc.setCurrentDatabase(pc.findDatabase(defaultDatabase));
   Persistable loaded = obj.reload(pc);
   String diffs = obj.differs(pc, loaded, false);
   if (diffs != null) fail(diffs);
 }