Ejemplo n.º 1
0
  public AbstractDataSet(SpagoBiDataSet dataSet) {
    super();
    setId(dataSet.getDsId());
    setName(dataSet.getName());
    setLabel(dataSet.getLabel());
    setDescription(dataSet.getDescription());
    setLabel(dataSet.getLabel());
    setConfiguration(dataSet.getConfiguration());
    setCategoryId(dataSet.getCategoryId());
    setParameters(dataSet.getParameters());

    setTransformerId(dataSet.getTransformerId());
    setPivotColumnName(dataSet.getPivotColumnName());
    setPivotRowName(dataSet.getPivotRowName());
    setPivotColumnValue(dataSet.getPivotColumnValue());
    setNumRows(dataSet.isNumRows());
    setDsMetadata(dataSet.getDsMetadata());
    setPersisted(dataSet.isPersisted());
    setPersistTableName(dataSet.getPersistTableName());

    setPublic(dataSet.is_public());

    if (this.getPivotColumnName() != null
        && this.getPivotColumnValue() != null
        && this.getPivotRowName() != null) {
      setDataStoreTransformer(
          new PivotDataSetTransformer(
              getPivotColumnName(), getPivotColumnValue(), getPivotRowName(), isNumRows()));
    }

    behaviours = new HashMap();
  }
Ejemplo n.º 2
0
  public SpagoBiDataSet toSpagoBiDataSet() {
    SpagoBiDataSet sbd = new SpagoBiDataSet();

    sbd.setDsId(getId());
    sbd.setLabel(getLabel());
    sbd.setName(getName());
    sbd.setParameters(getParameters());
    sbd.setDescription(getDescription());
    sbd.setCategoryId(getCategoryId());
    sbd.setDsMetadata(getDsMetadata());
    sbd.setConfiguration(getConfiguration());

    sbd.setTransformerId(getTransformerId());
    sbd.setPivotColumnName(getPivotColumnName());
    sbd.setPivotRowName(getPivotRowName());
    sbd.setPivotColumnValue(getPivotColumnValue());
    sbd.setNumRows(isNumRows());
    sbd.setPersisted(isPersisted());
    sbd.setPersistTableName(getPersistTableName());
    sbd.set_public(isPublic());

    return sbd;
  }