private void initMaps(Model model) {
    // TODO: decide whether caching here is okay
    EnterpriseBeans allBeans = getBundleDescriptor().getEnterpriseBeans();
    Entity[] entityBeans = allBeans.getEntity();
    int i, count = ((entityBeans != null) ? entityBeans.length : 0);
    DevelopmentNameMapper mapper = getNameMapper();

    for (i = 0; i < count; i++) {
      Entity ejb = entityBeans[i];

      if (Entity.PERSISTENCE_TYPE_CONTAINER.equals(ejb.getPersistenceType())) {
        String ejbName = ejb.getEjbName();

        // cache entity objects by name
        entityMap.put(ejbName, ejb);

        // cache cmp/cmr fields by ejb name
        cmpFieldMap.put(ejbName, mapper.getFieldsForEjb(ejbName));

        // collect all keys
        ejbKeyMap.put(ejbName, getPKFields(model, ejb));
      }
    }

    initRelationshipMap();
  }
 public DevelopmentConversionHelper(DevelopmentNameMapper nameMapper, Model model) {
   this.nameMapper = nameMapper;
   bundleDescriptor = nameMapper.getBundleDescriptor();
   initMaps(model);
 }