@Test public void testGetInstanceReferencedTo() { List<ConfigInstance> instances = configDao.getInstanceReferencedTo(Config_Foo1_Key, Env2_Id); assertNotNull(instances); assertEquals(1, instances.size()); instances = configDao.getInstanceReferencedTo(Config_Foo1_Key, Env1_Id); assertNotNull(instances); assertEquals(0, instances.size()); }
@SuppressWarnings("unchecked") @Override public List<ConfigInstance> getInstanceReferencedTo(String configKey, int envId) { return getSqlMapClientTemplate().queryForList("Config.getInstanceReferencedTo", Maps.entry("configKey", "${" + configKey + "}").entry("envId", envId).get()); }
ConfigIbatisDao extends SqlMapClientDaoSupport implements ConfigDao { @SuppressWarnings("unchecked") @Override public List<ConfigInstance> getInstanceReferencedTo(String configKey, int envId) { return getSqlMapClientTemplate().queryForList("Config.getInstanceReferencedTo", Maps.entry("configKey", "${" + configKey + "}").entry("envId", envId).get()); } }
ConfigIbatisDao extends SqlMapClientDaoSupport implements ConfigDao { @SuppressWarnings("unchecked") @Override public List<ConfigInstance> getInstanceReferencedTo(String configKey, int envId) { return getSqlMapClientTemplate().queryForList("Config.getInstanceReferencedTo", Maps.entry("configKey", "${" + configKey + "}").entry("envId", envId).get()); }  }
ConfigIbatisDao extends SqlMapClientDaoSupport implements ConfigDao { @SuppressWarnings("unchecked") @Override public List<ConfigInstance> getInstanceReferencedTo(String configKey, int envId) { return getSqlMapClientTemplate().queryForList("Config.getInstanceReferencedTo", Maps.entry("configKey", "${" + configKey + "}").entry("envId", envId).get()); }  @SuppressWarnings("unchecked") List<Config> findConfigByProject(int projectId); @SuppressWarnings({ "unchecked" }) List<ConfigInstance> findInstancesByProjectAndEnv(int projectId, int envId); Config getConfig(int configId); @Override Config getNextConfig(int configId); @Override Config getPrevConfig(int configId); @Override int updateConfig(Config config); @SuppressWarnings("unchecked") @Override Map<Integer, ConfigInstance> findDefaultInstances(int projectId, int envId); @SuppressWarnings("unchecked") @Override List<Integer> findHasInstanceConfigs(int projectId, int envId); @SuppressWarnings("unchecked") @Override List<Integer> findHasContextInstConfigs(int projectId, int envId); @Override int deleteInstances(int configId, Integer envId); int deleteInstance(int configId, int envId, String group); @Override int deleteConfig(int configId); @Override int createConfig(Config config); @Override int getMaxConfigSeq(int projectId); @Override int getMaxConfigInstSeq(int configId, int envId); @Override Config findConfigByKey(String key); @SuppressWarnings("unchecked") @Override List<Config> findConfigByKeys(List<String> keys); @SuppressWarnings("unchecked") @Override List<Config> findConfigByKeyPattern(String keyPattern); @Override ConfigInstance findInstance(int configId, int envId, String context); @Override int createInstance(ConfigInstance instance); @Override int updateInstance(ConfigInstance instance); @SuppressWarnings("unchecked") @Override List<ConfigInstance> findInstancesByConfig(int configId, Integer maxPerEnv); @SuppressWarnings("unchecked") @Override List<ConfigInstance> findInstancesByConfig(int configId, int envId, Integer maxPerEnv); @Override int getConfigInstCount(int configId, int envId); @Override int updateModifyStatus(int configId, int envId); int createStatus(ConfigStatus status); int deleteStatus(int configId, int envId); @SuppressWarnings("unchecked") @Override List<ConfigStatus> findStatus(int projectId, int envId); @SuppressWarnings("unchecked") @Override List<ConfigStatus> findModifyTime(int projectId, int envId); @Override long getConfigCount(ConfigCriteria criteria); @SuppressWarnings("unchecked") @Override List<Config> getConfigList(ConfigCriteria criteria, Paginater paginater); @Override long getSearchConfigCount(ConfigCriteria criteria); @SuppressWarnings("unchecked") @Override List<Config> getSearchConfigList(ConfigCriteria criteria, Paginater paginater); @Override boolean hasConfigReferencedTo(String configKey, int envId); @SuppressWarnings("unchecked") @Override List<ConfigInstance> getInstanceReferencedTo(String configKey, int envId); @SuppressWarnings("unchecked") @Override List<Integer> getProjectHasReferencedConfigs(int projectId); @Override List<Config> findConfigByPrefix(String prefix); @Override ConfigInstance findInstance(String key, int envId, String context); @Override List<ConfigInstance> findInstancesByKeys(List<String> keyList, int envId, String group); @Override List<ConfigInstance> findInstancesByPrefix(String prefix, int envId, String group); @Override List<ConfigInstance> findInstancesByProject(int projectId, int envId, String group); }
ConfigIbatisDao extends SqlMapClientDaoSupport implements ConfigDao { @SuppressWarnings("unchecked") @Override public List<ConfigInstance> getInstanceReferencedTo(String configKey, int envId) { return getSqlMapClientTemplate().queryForList("Config.getInstanceReferencedTo", Maps.entry("configKey", "${" + configKey + "}").entry("envId", envId).get()); }  @SuppressWarnings("unchecked") List<Config> findConfigByProject(int projectId); @SuppressWarnings({ "unchecked" }) List<ConfigInstance> findInstancesByProjectAndEnv(int projectId, int envId); Config getConfig(int configId); @Override Config getNextConfig(int configId); @Override Config getPrevConfig(int configId); @Override int updateConfig(Config config); @SuppressWarnings("unchecked") @Override Map<Integer, ConfigInstance> findDefaultInstances(int projectId, int envId); @SuppressWarnings("unchecked") @Override List<Integer> findHasInstanceConfigs(int projectId, int envId); @SuppressWarnings("unchecked") @Override List<Integer> findHasContextInstConfigs(int projectId, int envId); @Override int deleteInstances(int configId, Integer envId); int deleteInstance(int configId, int envId, String group); @Override int deleteConfig(int configId); @Override int createConfig(Config config); @Override int getMaxConfigSeq(int projectId); @Override int getMaxConfigInstSeq(int configId, int envId); @Override Config findConfigByKey(String key); @SuppressWarnings("unchecked") @Override List<Config> findConfigByKeys(List<String> keys); @SuppressWarnings("unchecked") @Override List<Config> findConfigByKeyPattern(String keyPattern); @Override ConfigInstance findInstance(int configId, int envId, String context); @Override int createInstance(ConfigInstance instance); @Override int updateInstance(ConfigInstance instance); @SuppressWarnings("unchecked") @Override List<ConfigInstance> findInstancesByConfig(int configId, Integer maxPerEnv); @SuppressWarnings("unchecked") @Override List<ConfigInstance> findInstancesByConfig(int configId, int envId, Integer maxPerEnv); @Override int getConfigInstCount(int configId, int envId); @Override int updateModifyStatus(int configId, int envId); int createStatus(ConfigStatus status); int deleteStatus(int configId, int envId); @SuppressWarnings("unchecked") @Override List<ConfigStatus> findStatus(int projectId, int envId); @SuppressWarnings("unchecked") @Override List<ConfigStatus> findModifyTime(int projectId, int envId); @Override long getConfigCount(ConfigCriteria criteria); @SuppressWarnings("unchecked") @Override List<Config> getConfigList(ConfigCriteria criteria, Paginater paginater); @Override long getSearchConfigCount(ConfigCriteria criteria); @SuppressWarnings("unchecked") @Override List<Config> getSearchConfigList(ConfigCriteria criteria, Paginater paginater); @Override boolean hasConfigReferencedTo(String configKey, int envId); @SuppressWarnings("unchecked") @Override List<ConfigInstance> getInstanceReferencedTo(String configKey, int envId); @SuppressWarnings("unchecked") @Override List<Integer> getProjectHasReferencedConfigs(int projectId); @Override List<Config> findConfigByPrefix(String prefix); @Override ConfigInstance findInstance(String key, int envId, String context); @Override List<ConfigInstance> findInstancesByKeys(List<String> keyList, int envId, String group); @Override List<ConfigInstance> findInstancesByPrefix(String prefix, int envId, String group); @Override List<ConfigInstance> findInstancesByProject(int projectId, int envId, String group);  }