@Test public void testFindConfigByKeys() { List<Config> configs = configDao.findConfigByKeys(Arrays.asList(Config_Foo1_Key, Config_Foo2_Key, "not_exists_key")); assertNotNull(configs); assertEquals(2, configs.size()); configs = configDao.findConfigByKeys(Collections.<String>emptyList()); assertNotNull(configs); assertEquals(0, configs.size()); }
@SuppressWarnings("unchecked") @Override public List<Config> findConfigByKeys(List<String> keys) { if (keys == null || keys.isEmpty()) { return Collections.emptyList(); } return getSqlMapClientTemplate().queryForList("Config.findConfigByKeys", keys); }
ConfigIbatisDao extends SqlMapClientDaoSupport implements ConfigDao { @SuppressWarnings("unchecked") @Override public List<Config> findConfigByKeys(List<String> keys) { if (keys == null || keys.isEmpty()) { return Collections.emptyList(); } return getSqlMapClientTemplate().queryForList("Config.findConfigByKeys", keys); } }
ConfigIbatisDao extends SqlMapClientDaoSupport implements ConfigDao { @SuppressWarnings("unchecked") @Override public List<Config> findConfigByKeys(List<String> keys) { if (keys == null || keys.isEmpty()) { return Collections.emptyList(); } return getSqlMapClientTemplate().queryForList("Config.findConfigByKeys", keys); }  }
ConfigIbatisDao extends SqlMapClientDaoSupport implements ConfigDao { @SuppressWarnings("unchecked") @Override public List<Config> findConfigByKeys(List<String> keys) { if (keys == null || keys.isEmpty()) { return Collections.emptyList(); } return getSqlMapClientTemplate().queryForList("Config.findConfigByKeys", keys); }  @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<Config> findConfigByKeys(List<String> keys) { if (keys == null || keys.isEmpty()) { return Collections.emptyList(); } return getSqlMapClientTemplate().queryForList("Config.findConfigByKeys", keys); }  @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);  }