コード例 #1
0
ファイル: DataSource.java プロジェクト: sunlong/hellomonitor
  @Override
  public DataSource clone() throws CloneNotSupportedException {
    DataSource dataSource = (DataSource) super.clone();
    dataSource.setId(null);

    dataSource.dataPoints = new HashSet<DataPoint>();
    for (DataPoint dataPoint : this.dataPoints) {
      DataPoint dp = dataPoint.clone();
      dp.setDataSource(this);
      dataSource.dataPoints.add(dp);
    }
    return dataSource;
  }
コード例 #2
0
ファイル: DataSource.java プロジェクト: sunlong/hellomonitor
 public void copy(DataSource dataSource) {
   this.name = dataSource.getName();
   this.collectionInterval = dataSource.getCollectionInterval();
 }