Exemplo n.º 1
0
  @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;
  }
Exemplo n.º 2
0
 public void copy(DataSource dataSource) {
   this.name = dataSource.getName();
   this.collectionInterval = dataSource.getCollectionInterval();
 }