package com.oguerreiro.resilient.domain;

import java.math.BigDecimal;

/**
 * DashboardComponentDetailValue
 */
public class DashboardComponentDetailValue {

  private DashboardComponentDetail dashboardComponentDetail;
  private DashboardComponent targetDashboardComponent;
  private Organization owner;
  private BigDecimal value;

  public DashboardComponentDetailValue(DashboardComponentDetail dashboardComponentDetail,
      DashboardComponent targetDashboardComponent, Organization owner, BigDecimal value) {
    super();
    this.dashboardComponentDetail = dashboardComponentDetail;
    this.targetDashboardComponent = targetDashboardComponent;
    this.owner = owner;
    this.value = value;
  }

  public DashboardComponentDetailValue(DashboardComponentDetail dashboardComponentDetail, String owner,
      BigDecimal value) {
    super();
    this.dashboardComponentDetail = dashboardComponentDetail;
    //this.owner = owner;
    this.value = value;
  }

  public DashboardComponentDetail getDashboardComponentDetail() {
    return dashboardComponentDetail;
  }

  public void setDashboardComponentDetail(DashboardComponentDetail dashboardComponentDetail) {
    this.dashboardComponentDetail = dashboardComponentDetail;
  }

  public Organization getOwner() {
    return owner;
  }

  public void setOwner(Organization owner) {
    this.owner = owner;
  }

  public BigDecimal getValue() {
    return value;
  }

  public void setValue(BigDecimal value) {
    this.value = value;
  }

  public DashboardComponent getTargetDashboardComponent() {
    return targetDashboardComponent;
  }

  public void setTargetDashboardComponent(DashboardComponent targetDashboardComponent) {
    this.targetDashboardComponent = targetDashboardComponent;
  }

  //@formatter:off
  @Override
  public String toString() {
    return "DashboardComponentDetail{" + 
            "dashboardComponentDetail.id=" + getDashboardComponentDetail().getId() + 
            ", owner.code='" + getOwner().getCode() + "'" +  
            ", value=" + getValue() + 
          "}";
  }
//@formatter:on
}
