tx.begin();
if (isAuthenticated())
this.getEntityPublisher(em, body.getAuthInfo());
BusinessDetail result = new BusinessDetail();
List<String> businessKeyList = body.getBusinessKey();
for (String businessKey : businessKeyList) {
org.apache.juddi.model.BusinessEntity modelBusinessEntity = null;
try {
modelBusinessEntity = em.find(org.apache.juddi.model.BusinessEntity.class, businessKey);
} catch (ClassCastException e) {}
if (modelBusinessEntity == null)
throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.BusinessNotFound", businessKey));
org.uddi.api_v3.BusinessEntity apiBusinessEntity = new org.uddi.api_v3.BusinessEntity();
MappingModelToApi.mapBusinessEntity(modelBusinessEntity, apiBusinessEntity);
result.getBusinessEntity().add(apiBusinessEntity);
}
tx.commit();
long procTime = System.nanoTime() - startTime;
serviceCounter.update(InquiryQuery.GET_BUSINESSDETAIL, QueryStatus.SUCCESS, procTime);