tx.begin();
if (isAuthenticated())
this.getEntityPublisher(em, body.getAuthInfo());
TModelDetail result = new TModelDetail();
List<String> tmodelKeyList = body.getTModelKey();
for (String tmodelKey : tmodelKeyList) {
org.apache.juddi.model.Tmodel modelTModel = null;
try {
modelTModel = em.find(org.apache.juddi.model.Tmodel.class, tmodelKey);
} catch (ClassCastException e) {}
if (modelTModel == null)
throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.TModelNotFound", tmodelKey));
org.uddi.api_v3.TModel apiTModel = new org.uddi.api_v3.TModel();
MappingModelToApi.mapTModel(modelTModel, apiTModel);
result.getTModel().add(apiTModel);
}
tx.commit();
long procTime = System.nanoTime() - startTime;
serviceCounter.update(InquiryQuery.GET_TMODELDETAIL, QueryStatus.SUCCESS, procTime);