@Test public void testGetGroupLevelWebServerResource() { final JpaGroupWebServerConfigTemplate jpaGroupWebServerConfigTemplate = resourceDao.getGroupLevelWebServerResource("httpd.conf", "someGroup"); assertEquals("someMetaData", jpaGroupWebServerConfigTemplate.getMetaData()); }
@Override public JpaGroupWebServerConfigTemplate getGroupLevelWebServerResource(final String resourceName, final String groupName) { final Query q = em.createNamedQuery(JpaGroupWebServerConfigTemplate.QUERY_GET_GROUP_LEVEL_WEBSERVER_RESOURCE); q.setParameter(JpaGroupWebServerConfigTemplate.QUERY_PARAM_TEMPLATE_NAME, resourceName); q.setParameter(JpaGroupWebServerConfigTemplate.QUERY_PARAM_GROUP_NAME, groupName); return (JpaGroupWebServerConfigTemplate) q.getSingleResult(); }
ResourceDaoImpl implements ResourceDao { @Override public JpaGroupWebServerConfigTemplate getGroupLevelWebServerResource(final String resourceName, final String groupName) { final Query q = em.createNamedQuery(JpaGroupWebServerConfigTemplate.QUERY_GET_GROUP_LEVEL_WEBSERVER_RESOURCE); q.setParameter(JpaGroupWebServerConfigTemplate.QUERY_PARAM_TEMPLATE_NAME, resourceName); q.setParameter(JpaGroupWebServerConfigTemplate.QUERY_PARAM_GROUP_NAME, groupName); return (JpaGroupWebServerConfigTemplate) q.getSingleResult(); } }
ResourceDaoImpl implements ResourceDao { @Override public JpaGroupWebServerConfigTemplate getGroupLevelWebServerResource(final String resourceName, final String groupName) { final Query q = em.createNamedQuery(JpaGroupWebServerConfigTemplate.QUERY_GET_GROUP_LEVEL_WEBSERVER_RESOURCE); q.setParameter(JpaGroupWebServerConfigTemplate.QUERY_PARAM_TEMPLATE_NAME, resourceName); q.setParameter(JpaGroupWebServerConfigTemplate.QUERY_PARAM_GROUP_NAME, groupName); return (JpaGroupWebServerConfigTemplate) q.getSingleResult(); }  }
ResourceDaoImpl implements ResourceDao { @Override public JpaGroupWebServerConfigTemplate getGroupLevelWebServerResource(final String resourceName, final String groupName) { final Query q = em.createNamedQuery(JpaGroupWebServerConfigTemplate.QUERY_GET_GROUP_LEVEL_WEBSERVER_RESOURCE); q.setParameter(JpaGroupWebServerConfigTemplate.QUERY_PARAM_TEMPLATE_NAME, resourceName); q.setParameter(JpaGroupWebServerConfigTemplate.QUERY_PARAM_GROUP_NAME, groupName); return (JpaGroupWebServerConfigTemplate) q.getSingleResult(); }  @Override int deleteWebServerResource(final String templateName, final String webServerName); @Override int deleteGroupLevelWebServerResource(final String templateName, final String groupName); @Override int deleteJvmResource(final String templateName, final String jvmName); @Override int deleteGroupLevelJvmResource(final String templateName, final String groupName); @Override int deleteAppResource(final String templateName, final String appName, final String jvmName); @Override int deleteGroupLevelAppResource(String appName, final String groupName, final String templateName); @Override int deleteWebServerResources(final List<String> templateNameList, final String webServerName); @Override int deleteGroupLevelWebServerResources(final List<String> templateNameList, final String groupName); @Override int deleteJvmResources(final List<String> templateNameList, final String jvmName); @Override int deleteGroupLevelJvmResources(final List<String> templateNameList, final String groupName); @Override int deleteAppResources(final List<String> templateNameList, final String appName, final String jvmName); @Override int deleteGroupLevelAppResources(final String appName, final String groupName, final List<String> templateNameList); @Override int deleteExternalProperties(); @Override JpaWebServerConfigTemplate getWebServerResource(final String resourceName, final String webServerName); @Override JpaJvmConfigTemplate getJvmResource(final String resourceName, final String jvmName); @Override JpaApplicationConfigTemplate getAppResource(final String resourceName, final String appName, final String jvmName); @Override JpaGroupWebServerConfigTemplate getGroupLevelWebServerResource(final String resourceName, final String groupName); @Override JpaGroupJvmConfigTemplate getGroupLevelJvmResource(final String resourceName, final String groupName); @Override JpaGroupAppConfigTemplate getGroupLevelAppResource(final String resourceName, final String appName, final String groupName); @Override List<String> getGroupLevelAppResourceNames(String groupName, String webAppName); @Override JpaResourceConfigTemplate getExternalPropertiesResource(String resourceName); @Override JpaResourceConfigTemplate createResource(Long entityId, Long groupId, Long appId, EntityType entityType, String resourceFileName, String templateContent, String metaData); @Override void updateResource(ResourceIdentifier resourceIdentifier, EntityType entityType, String templateContent); @Override void updateResourceGroup(JpaApplication jpaApplication, JpaGroup jpaGroup); @Override List<String> getResourceNames(ResourceIdentifier identifier, EntityType entityType); }
ResourceDaoImpl implements ResourceDao { @Override public JpaGroupWebServerConfigTemplate getGroupLevelWebServerResource(final String resourceName, final String groupName) { final Query q = em.createNamedQuery(JpaGroupWebServerConfigTemplate.QUERY_GET_GROUP_LEVEL_WEBSERVER_RESOURCE); q.setParameter(JpaGroupWebServerConfigTemplate.QUERY_PARAM_TEMPLATE_NAME, resourceName); q.setParameter(JpaGroupWebServerConfigTemplate.QUERY_PARAM_GROUP_NAME, groupName); return (JpaGroupWebServerConfigTemplate) q.getSingleResult(); }  @Override int deleteWebServerResource(final String templateName, final String webServerName); @Override int deleteGroupLevelWebServerResource(final String templateName, final String groupName); @Override int deleteJvmResource(final String templateName, final String jvmName); @Override int deleteGroupLevelJvmResource(final String templateName, final String groupName); @Override int deleteAppResource(final String templateName, final String appName, final String jvmName); @Override int deleteGroupLevelAppResource(String appName, final String groupName, final String templateName); @Override int deleteWebServerResources(final List<String> templateNameList, final String webServerName); @Override int deleteGroupLevelWebServerResources(final List<String> templateNameList, final String groupName); @Override int deleteJvmResources(final List<String> templateNameList, final String jvmName); @Override int deleteGroupLevelJvmResources(final List<String> templateNameList, final String groupName); @Override int deleteAppResources(final List<String> templateNameList, final String appName, final String jvmName); @Override int deleteGroupLevelAppResources(final String appName, final String groupName, final List<String> templateNameList); @Override int deleteExternalProperties(); @Override JpaWebServerConfigTemplate getWebServerResource(final String resourceName, final String webServerName); @Override JpaJvmConfigTemplate getJvmResource(final String resourceName, final String jvmName); @Override JpaApplicationConfigTemplate getAppResource(final String resourceName, final String appName, final String jvmName); @Override JpaGroupWebServerConfigTemplate getGroupLevelWebServerResource(final String resourceName, final String groupName); @Override JpaGroupJvmConfigTemplate getGroupLevelJvmResource(final String resourceName, final String groupName); @Override JpaGroupAppConfigTemplate getGroupLevelAppResource(final String resourceName, final String appName, final String groupName); @Override List<String> getGroupLevelAppResourceNames(String groupName, String webAppName); @Override JpaResourceConfigTemplate getExternalPropertiesResource(String resourceName); @Override JpaResourceConfigTemplate createResource(Long entityId, Long groupId, Long appId, EntityType entityType, String resourceFileName, String templateContent, String metaData); @Override void updateResource(ResourceIdentifier resourceIdentifier, EntityType entityType, String templateContent); @Override void updateResourceGroup(JpaApplication jpaApplication, JpaGroup jpaGroup); @Override List<String> getResourceNames(ResourceIdentifier identifier, EntityType entityType);  }