当前位置: 首页>>代码示例>>Java>>正文


Java DatasetRecord.getRefDatasetUrn方法代码示例

本文整理汇总了Java中wherehows.common.schemas.DatasetRecord.getRefDatasetUrn方法的典型用法代码示例。如果您正苦于以下问题:Java DatasetRecord.getRefDatasetUrn方法的具体用法?Java DatasetRecord.getRefDatasetUrn怎么用?Java DatasetRecord.getRefDatasetUrn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wherehows.common.schemas.DatasetRecord的用法示例。


在下文中一共展示了DatasetRecord.getRefDatasetUrn方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: insertDataset

import wherehows.common.schemas.DatasetRecord; //导入方法依赖的package包/类
public static void insertDataset(JsonNode dataset)
  throws Exception {

  ObjectMapper om = new ObjectMapper();
  om.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
  DatasetRecord record = om.convertValue(dataset, DatasetRecord.class);

  if (record.getRefDatasetUrn() != null) {
    Map<String, Object> refDataset = getDatasetByUrn(record.getRefDatasetUrn());
    // Find ref dataset id
    if (refDataset != null) {
      record.setRefDatasetId(((Long) refDataset.get("id")).intValue());
    }
  }


  DatabaseWriter dw = new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, "dict_dataset");
  dw.append(record);
  dw.close();
}
 
开发者ID:SirAeroWN,项目名称:premier-wherehows,代码行数:21,代码来源:DatasetDao.java

示例2: updateDataset

import wherehows.common.schemas.DatasetRecord; //导入方法依赖的package包/类
public static void updateDataset(JsonNode dataset)
  throws Exception {
  ObjectMapper om = new ObjectMapper();
  om.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
  DatasetRecord record = om.convertValue(dataset, DatasetRecord.class);
  if (record.getRefDatasetUrn() != null) {
    Map<String, Object> refDataset = getDatasetByUrn(record.getRefDatasetUrn());
    // Find ref dataset id
    if (refDataset != null) {
      record.setRefDatasetId(((Long) refDataset.get("id")).intValue());
    }
  }

  DatabaseWriter dw = new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, "dict_dataset");
  dw.update(record.toUpdateDatabaseValue(), record.getUrn());
  dw.close();
}
 
开发者ID:SirAeroWN,项目名称:premier-wherehows,代码行数:18,代码来源:DatasetDao.java

示例3: insertDataset

import wherehows.common.schemas.DatasetRecord; //导入方法依赖的package包/类
public static void insertDataset(JsonNode dataset)
  throws Exception {

  ObjectMapper om = new ObjectMapper();
  om.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
  DatasetRecord record = om.convertValue(dataset, DatasetRecord.class);
  if (record.getRefDatasetUrn() != null) {
    Map<String, Object> refDataset = getDatasetByUrn(record.getRefDatasetUrn());
    // Find ref dataset id
    if (refDataset != null) {
      record.setRefDatasetId(((Long) refDataset.get("id")).intValue());
    }
  }


  // Find layout id
  if (record.getSamplePartitionFullPath() != null) {
    PartitionPatternMatcher ppm = new PartitionPatternMatcher(PartitionLayoutDao.getPartitionLayouts());
    record.setPartitionLayoutPatternId(ppm.analyze(record.getSamplePartitionFullPath()));
  }

  DatabaseWriter dw = new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, "dict_dataset");
  dw.append(record);
  dw.close();
}
 
开发者ID:thomas-young-2013,项目名称:wherehowsX,代码行数:26,代码来源:DatasetDao.java

示例4: updateDataset

import wherehows.common.schemas.DatasetRecord; //导入方法依赖的package包/类
public static void updateDataset(JsonNode dataset)
  throws Exception {
  ObjectMapper om = new ObjectMapper();
  om.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
  DatasetRecord record = om.convertValue(dataset, DatasetRecord.class);
  if (record.getRefDatasetUrn() != null) {
    Map<String, Object> refDataset = getDatasetByUrn(record.getRefDatasetUrn());
    // Find ref dataset id
    if (refDataset != null) {
      record.setRefDatasetId(((Long) refDataset.get("id")).intValue());
    }
  }
  // Find layout id
  if (record.getSamplePartitionFullPath() != null) {
    PartitionPatternMatcher ppm = new PartitionPatternMatcher(PartitionLayoutDao.getPartitionLayouts());
    record.setPartitionLayoutPatternId(ppm.analyze(record.getSamplePartitionFullPath()));
  }

  DatabaseWriter dw = new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, "dict_dataset");
  dw.update(record.toUpdateDatabaseValue(), record.getUrn());
  dw.close();
}
 
开发者ID:thomas-young-2013,项目名称:wherehowsX,代码行数:23,代码来源:DatasetDao.java

示例5: insertDataset

import wherehows.common.schemas.DatasetRecord; //导入方法依赖的package包/类
public static void insertDataset(DatasetRecord record) throws Exception {
  if (record.getRefDatasetUrn() != null) {
    Map<String, Object> refDataset = getDatasetByUrn(record.getRefDatasetUrn());
    // Find ref dataset id
    if (refDataset != null) {
      record.setRefDatasetId(((Long) refDataset.get("id")).intValue());
    }
  }

  // Find layout id
  if (record.getSamplePartitionFullPath() != null) {
    PartitionPatternMatcher ppm = new PartitionPatternMatcher(PartitionLayoutDao.getPartitionLayouts());
    record.setPartitionLayoutPatternId(ppm.analyze(record.getSamplePartitionFullPath()));
  }

  DatabaseWriter dw = new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, "dict_dataset");
  dw.append(record);
  dw.close();
}
 
开发者ID:linkedin,项目名称:WhereHows,代码行数:20,代码来源:DatasetDao.java

示例6: updateDataset

import wherehows.common.schemas.DatasetRecord; //导入方法依赖的package包/类
public static void updateDataset(DatasetRecord record) throws Exception {
  if (record.getRefDatasetUrn() != null) {
    Map<String, Object> refDataset = getDatasetByUrn(record.getRefDatasetUrn());
    // Find ref dataset id
    if (refDataset != null) {
      record.setRefDatasetId(((Long) refDataset.get("id")).intValue());
    }
  }
  // Find layout id
  if (record.getSamplePartitionFullPath() != null) {
    PartitionPatternMatcher ppm = new PartitionPatternMatcher(PartitionLayoutDao.getPartitionLayouts());
    record.setPartitionLayoutPatternId(ppm.analyze(record.getSamplePartitionFullPath()));
  }

  DatabaseWriter dw = new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, "dict_dataset");
  dw.update(record.toUpdateDatabaseValue(), record.getUrn());
  dw.close();
}
 
开发者ID:linkedin,项目名称:WhereHows,代码行数:19,代码来源:DatasetDao.java


注:本文中的wherehows.common.schemas.DatasetRecord.getRefDatasetUrn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。