private StoreData buildStoreData(ClassMetaData cmd, ClassLoaderResolver clr) {
   String kindName = EntityUtils.getKindName(getIdentifierFactory(), cmd);
   DatastoreTable table = new DatastoreTable(kindName, this, cmd, clr, dba);
   StoreData sd = new MappedStoreData(cmd, table, true);
   registerStoreData(sd);
   // needs to be called after we register the store data to avoid stack overflow
   table.buildMapping();
   return sd;
 }
 private StoreData buildStoreDataWithTable(ClassMetaData cmd, DatastoreTable table) {
   MappedStoreData sd = new MappedStoreData(cmd, table, false);
   registerStoreData(sd);
   sd.setDatastoreContainerObject(table);
   table.manageClass(cmd);
   return sd;
 }