test_class.declarator: clusterConfigDao
test_class.modifier: private
test_class.original_string: private ClusterConfigDao clusterConfigDao;
test_class.type: ClusterConfigDao
test_class.var_name: clusterConfigDao
test_class.file: smart-metastore/src/test/java/org/smartdata/metastore/dao/TestClusterConfigDao.java
test_class.identifier: TestClusterConfigDao
test_class.superclass: extends TestDaoUtil
test_case.body: @Test
    public void testgetCountByName() {
      Assert.assertTrue(clusterConfigDao.getCountByName("test") == 0);
      ClusterConfig clusterConfig = new ClusterConfig(1, "test", "test1");
      clusterConfigDao.insert(clusterConfig);
      Assert.assertTrue(clusterConfigDao.getCountByName("test") == 1);
    }
test_case.class_method_signature: TestClusterConfigDao.testgetCountByName()
test_case.full_signature: @Test public void testgetCountByName()
test_case.identifier: testgetCountByName
test_case.invocations: assertTrue getCountByName insert assertTrue getCountByName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testgetCountByName()
focal_class.declarator: dataSource
focal_class.modifier: private
focal_class.original_string: private DataSource dataSource;
focal_class.type: DataSource
focal_class.var_name: dataSource
focal_class.file: smart-metastore/src/main/java/org/smartdata/metastore/dao/ClusterConfigDao.java
focal_class.identifier: ClusterConfigDao
focal_class.class_method_signature: ClusterConfigDao.setDataSource(DataSource dataSource)
focal_class.full_signature: public void setDataSource(DataSource dataSource)
focal_class.identifier: setDataSource
focal_class.modifiers: public
focal_class.parameters: (DataSource dataSource)
focal_class.return: void
focal_class.signature: void setDataSource(DataSource dataSource)
focal_class.class_method_signature: ClusterConfigDao.ClusterConfigDao(DataSource dataSource)
focal_class.full_signature: public  ClusterConfigDao(DataSource dataSource)
focal_class.identifier: ClusterConfigDao
focal_class.modifiers: public
focal_class.parameters: (DataSource dataSource)
focal_class.signature:  ClusterConfigDao(DataSource dataSource)
focal_class.class_method_signature: ClusterConfigDao.getAll()
focal_class.full_signature: public List<ClusterConfig> getAll()
focal_class.identifier: getAll
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<ClusterConfig>
focal_class.signature: List<ClusterConfig> getAll()
focal_class.class_method_signature: ClusterConfigDao.getByIds(List<Long> cids)
focal_class.full_signature: public List<ClusterConfig> getByIds(List<Long> cids)
focal_class.identifier: getByIds
focal_class.modifiers: public
focal_class.parameters: (List<Long> cids)
focal_class.return: List<ClusterConfig>
focal_class.signature: List<ClusterConfig> getByIds(List<Long> cids)
focal_class.class_method_signature: ClusterConfigDao.getById(long cid)
focal_class.full_signature: public ClusterConfig getById(long cid)
focal_class.identifier: getById
focal_class.modifiers: public
focal_class.parameters: (long cid)
focal_class.return: ClusterConfig
focal_class.signature: ClusterConfig getById(long cid)
focal_class.class_method_signature: ClusterConfigDao.getCountByName(String name)
focal_class.full_signature: public long getCountByName(String name)
focal_class.identifier: getCountByName
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.return: long
focal_class.signature: long getCountByName(String name)
focal_class.class_method_signature: ClusterConfigDao.getByName(String name)
focal_class.full_signature: public ClusterConfig getByName(String name)
focal_class.identifier: getByName
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.return: ClusterConfig
focal_class.signature: ClusterConfig getByName(String name)
focal_class.class_method_signature: ClusterConfigDao.delete(long cid)
focal_class.full_signature: public void delete(long cid)
focal_class.identifier: delete
focal_class.modifiers: public
focal_class.parameters: (long cid)
focal_class.return: void
focal_class.signature: void delete(long cid)
focal_class.class_method_signature: ClusterConfigDao.insert(ClusterConfig clusterConfig)
focal_class.full_signature: public long insert(ClusterConfig clusterConfig)
focal_class.identifier: insert
focal_class.modifiers: public
focal_class.parameters: (ClusterConfig clusterConfig)
focal_class.return: long
focal_class.signature: long insert(ClusterConfig clusterConfig)
focal_class.class_method_signature: ClusterConfigDao.insert(ClusterConfig[] clusterConfigs)
focal_class.full_signature: public void insert(ClusterConfig[] clusterConfigs)
focal_class.identifier: insert
focal_class.modifiers: public
focal_class.parameters: (ClusterConfig[] clusterConfigs)
focal_class.return: void
focal_class.signature: void insert(ClusterConfig[] clusterConfigs)
focal_class.class_method_signature: ClusterConfigDao.updateById(int cid, String configPath)
focal_class.full_signature: public int updateById(int cid, String configPath)
focal_class.identifier: updateById
focal_class.modifiers: public
focal_class.parameters: (int cid, String configPath)
focal_class.return: int
focal_class.signature: int updateById(int cid, String configPath)
focal_class.class_method_signature: ClusterConfigDao.updateByNodeName(String nodeName, String configPath)
focal_class.full_signature: public int updateByNodeName(String nodeName, String configPath)
focal_class.identifier: updateByNodeName
focal_class.modifiers: public
focal_class.parameters: (String nodeName, String configPath)
focal_class.return: int
focal_class.signature: int updateByNodeName(String nodeName, String configPath)
focal_class.class_method_signature: ClusterConfigDao.toMap(ClusterConfig clusterConfig)
focal_class.full_signature: private Map<String, Object> toMap(ClusterConfig clusterConfig)
focal_class.identifier: toMap
focal_class.modifiers: private
focal_class.parameters: (ClusterConfig clusterConfig)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> toMap(ClusterConfig clusterConfig)
focal_method.body: public long getCountByName(String name) {
      JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
      return jdbcTemplate.queryForObject(
          "SELECT COUNT(*) FROM cluster_config WHERE node_name = ?", Long.class, name);
    }
focal_method.class_method_signature: ClusterConfigDao.getCountByName(String name)
focal_method.full_signature: public long getCountByName(String name)
focal_method.identifier: getCountByName
focal_method.invocations: queryForObject
focal_method.modifiers: public
focal_method.parameters: (String name)
focal_method.return: long
focal_method.signature: long getCountByName(String name)