//if we have the TModels set for a publisher then we need to make sure we did not exceed it.
if (maxTModels > 0) {
//get the tmodels owned by this publisher
List<?> tmodelKeysFound = FindTModelByPublisherQuery.select(em, null, publisher, null);
if (tmodelKeysFound != null && tmodelKeysFound.size() > maxTModels) {
throw new MaxEntitiesExceededException(new ErrorMessage("errors.save.maxTModelsExceeded"));
}
}
}