*
* @return a matching view instance or null
*/
public ViewInstanceEntity findByName(String viewName, String instanceName) {
EntityManager entityManager = entityManagerProvider.get();
ViewInstanceEntityPK pk = new ViewInstanceEntityPK();
pk.setViewName(viewName);
pk.setName(instanceName);
return entityManager.find(ViewInstanceEntity.class, pk);
}