//Find the MediaType by matching the Mimetype
Criteria filter = new Criteria();
filter.addEqualTo("mimetypes.name", mimeTypeName);
QueryByCriteria query = QueryFactory.newQuery(mediaTypeClass, filter);
Collection mediaTypeCollection = getPersistenceBrokerTemplate().getCollectionByQuery(query);
Iterator mtIterator = mediaTypeCollection.iterator();
if (mtIterator.hasNext())
{