package ervu_dashboard.model.chart.round;

import java.util.Arrays;
import java.util.List;

import property.grid.Formatter;
import rpc.LoadGraphSource;

import ru.cg.webbpm.modules.database.bean.annotation.GraphSource;
import ru.cg.webbpm.modules.database.bean.entity_graph.EntityColumn;
import ru.cg.webbpm.modules.standard_annotations.validation.NotNull;

/**
 * @author Vitaly Chekushkin
 */
public class RoundStaticData {
  @NotNull
  public String dataLabel;
  @NotNull
  @GraphSource(
      value = LoadGraphSource.class,
      scanMode = GraphSource.ScanMode.CLOSEST_PROPERTY_CONTEXT
  )
  public EntityColumn dataColumn;
  public Formatter<Object, Object> dataColumnFormatter;
  @NotNull
  @GraphSource(
      value = LoadGraphSource.class,
      scanMode = GraphSource.ScanMode.CLOSEST_PROPERTY_CONTEXT
  )
  public EntityColumn labelColumn;
  public Formatter<Object, Object> labelColumnFormatter;

  public List<EntityColumn> columns() {
    return Arrays.asList(this.dataColumn, this.labelColumn);
  }
}
