public void deleteTBServiceTemplate(String UUID){
/*TestbedServiceTemplateImpl t_helper = manager.find(
TestbedServiceTemplateImpl.class, UUID);*/
Query query = manager.createQuery("from TestbedServiceTemplateImpl where discr='template' and hashUUID='"+UUID+"'");
if((query!=null)&&(query.getResultList().size()==1)){
TestbedServiceTemplateImpl t_helper = (TestbedServiceTemplateImpl)query.getResultList().iterator().next();
//only delete templates that are of type "template" and not used within an experiment
if(t_helper.getDiscriminator().equals(t_helper.DISCR_TEMPLATE)){
manager.remove(t_helper);
}
}
}