if (anAsset.searchForPropertyGroup(SubsistenceConsumerPG.class) == null) { NewSubsistenceConsumerPG foodpg =
if (logger.isDebugEnabled()) logger.debug(getAgentIdentifier() + ".addConsumerPG for MilitaryPerson: " + anAsset);  NewSubsistenceConsumerPG foodpg = (NewSubsistenceConsumerPG)anAsset.searchForPropertyGroup(SubsistenceConsumerPG.class);   if (foodpg == null) { if (logger.isDebugEnabled()) logger.debug(getAgentIdentifier() + ".addConsumerPG CREATING SubConsumerPG for " + anAsset); foodpg =
  protected void addConsumerPGs(Collection consumers) {    Iterator people = consumers.iterator();    Asset a, anAsset;    while (people.hasNext()) {      a = (Asset)people.next();      if (a instanceof AggregateAsset) {        anAsset = ((AggregateAsset)a).getAsset();      } else {        anAsset = a;      }      if (anAsset instanceof MilitaryPerson) {        if (anAsset.searchForPropertyGroup(SubsistenceConsumerPG.class) == null) {          NewSubsistenceConsumerPG foodpg =             (NewSubsistenceConsumerPG)getLDM().getFactory().createPropertyGroup(SubsistenceConsumerPG.class);          foodpg.setMei(a);          foodpg.setService(service);          foodpg.setTheater(THEATER);          foodpg.setSubsistenceConsumerBG(new SubsistenceConsumerBG(foodpg));          foodpg.initialize(this);          anAsset.setPropertyGroup(foodpg);          publishChange(a);        }      }    }  }