test_class.declarator: globalConfigDao
test_class.modifier: private
test_class.original_string: private GlobalConfigDao globalConfigDao;
test_class.type: GlobalConfigDao
test_class.var_name: globalConfigDao
test_class.file: smart-metastore/src/test/java/org/smartdata/metastore/dao/TestGlobalConfigDao.java
test_class.identifier: TestGlobalConfigDao
test_class.superclass: extends TestDaoUtil
test_case.body: @Test
    public void testUpdate() {
      GlobalConfig globalConfig = new GlobalConfig();
      globalConfig.setCid(1);
      globalConfig.setPropertyName("test");
      globalConfig.setPropertyValue("test1");
      globalConfigDao.insert(globalConfig);
  
      globalConfigDao.update("test", "test2");
      globalConfig.setPropertyValue("test2");
  
      Assert.assertTrue(globalConfigDao.getById(1).equals(globalConfig));
    }
test_case.class_method_signature: TestGlobalConfigDao.testUpdate()
test_case.full_signature: @Test public void testUpdate()
test_case.identifier: testUpdate
test_case.invocations: setCid setPropertyName setPropertyValue insert update setPropertyValue assertTrue equals getById
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUpdate()
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/GlobalConfigDao.java
focal_class.identifier: GlobalConfigDao
focal_class.class_method_signature: GlobalConfigDao.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: GlobalConfigDao.GlobalConfigDao(DataSource dataSource)
focal_class.full_signature: public  GlobalConfigDao(DataSource dataSource)
focal_class.identifier: GlobalConfigDao
focal_class.modifiers: public
focal_class.parameters: (DataSource dataSource)
focal_class.signature:  GlobalConfigDao(DataSource dataSource)
focal_class.class_method_signature: GlobalConfigDao.getAll()
focal_class.full_signature: public List<GlobalConfig> getAll()
focal_class.identifier: getAll
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<GlobalConfig>
focal_class.signature: List<GlobalConfig> getAll()
focal_class.class_method_signature: GlobalConfigDao.getByIds(List<Long> cid)
focal_class.full_signature: public List<GlobalConfig> getByIds(List<Long> cid)
focal_class.identifier: getByIds
focal_class.modifiers: public
focal_class.parameters: (List<Long> cid)
focal_class.return: List<GlobalConfig>
focal_class.signature: List<GlobalConfig> getByIds(List<Long> cid)
focal_class.class_method_signature: GlobalConfigDao.getById(long cid)
focal_class.full_signature: public GlobalConfig getById(long cid)
focal_class.identifier: getById
focal_class.modifiers: public
focal_class.parameters: (long cid)
focal_class.return: GlobalConfig
focal_class.signature: GlobalConfig getById(long cid)
focal_class.class_method_signature: GlobalConfigDao.getByPropertyName(String propertyName)
focal_class.full_signature: public GlobalConfig getByPropertyName(String propertyName)
focal_class.identifier: getByPropertyName
focal_class.modifiers: public
focal_class.parameters: (String propertyName)
focal_class.return: GlobalConfig
focal_class.signature: GlobalConfig getByPropertyName(String propertyName)
focal_class.class_method_signature: GlobalConfigDao.deleteByName(String propertyName)
focal_class.full_signature: public void deleteByName(String propertyName)
focal_class.identifier: deleteByName
focal_class.modifiers: public
focal_class.parameters: (String propertyName)
focal_class.return: void
focal_class.signature: void deleteByName(String propertyName)
focal_class.class_method_signature: GlobalConfigDao.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: GlobalConfigDao.insert(GlobalConfig globalConfig)
focal_class.full_signature: public long insert(GlobalConfig globalConfig)
focal_class.identifier: insert
focal_class.modifiers: public
focal_class.parameters: (GlobalConfig globalConfig)
focal_class.return: long
focal_class.signature: long insert(GlobalConfig globalConfig)
focal_class.class_method_signature: GlobalConfigDao.insert(GlobalConfig[] globalConfigs)
focal_class.full_signature: public void insert(GlobalConfig[] globalConfigs)
focal_class.identifier: insert
focal_class.modifiers: public
focal_class.parameters: (GlobalConfig[] globalConfigs)
focal_class.return: void
focal_class.signature: void insert(GlobalConfig[] globalConfigs)
focal_class.class_method_signature: GlobalConfigDao.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: GlobalConfigDao.update(String propertyName, String propertyValue)
focal_class.full_signature: public int update(String propertyName, String propertyValue)
focal_class.identifier: update
focal_class.modifiers: public
focal_class.parameters: (String propertyName, String propertyValue)
focal_class.return: int
focal_class.signature: int update(String propertyName, String propertyValue)
focal_class.class_method_signature: GlobalConfigDao.toMaps(GlobalConfig globalConfig)
focal_class.full_signature: private Map<String, Object> toMaps(GlobalConfig globalConfig)
focal_class.identifier: toMaps
focal_class.modifiers: private
focal_class.parameters: (GlobalConfig globalConfig)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> toMaps(GlobalConfig globalConfig)
focal_method.body: public int update(String propertyName, String propertyValue) {
      JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
      String sql = "UPDATE global_config SET property_value = ? WHERE property_name = ?";
      return jdbcTemplate.update(sql, propertyValue, propertyName);
    }
focal_method.class_method_signature: GlobalConfigDao.update(String propertyName, String propertyValue)
focal_method.full_signature: public int update(String propertyName, String propertyValue)
focal_method.identifier: update
focal_method.invocations: update
focal_method.modifiers: public
focal_method.parameters: (String propertyName, String propertyValue)
focal_method.return: int
focal_method.signature: int update(String propertyName, String propertyValue)