TableCoecoclass.java [src/soils/db/tables] Revision: default  Date:
package soils.db.tables;

import java.sql.Connection;
import java.util.ArrayList;
import java.util.Arrays;

/**
 *
 * @author <a href="mailto:shaun.case@colostate.edu">Shaun Case</a>
 */
public class TableCoecoclass extends Table {

  public static final String TABLE_NAME = "coecoclass";
  public static final String ECOCLASSTYPENAME = "ecoclasstypename";
  public static final String ECOCLASSREF = "ecoclassref";
  public static final String ECOCLASSID = "ecoclassid";
  public static final String ECOCLASSNAME = "ecoclassname";
  public static final String COKEY = "cokey";
  public static final String COECOCLASSKEY = "coecoclasskey";
  public static final String SOURCESDWPRIMARYKEY = "sourcesdwprimarykey";
  public static final String SOURCESDWTABLEPHYSICALNAME = "sourcesdwtablephysicalname";

  static final String[] ECOCLASSTYPENAME_DATA = {ECOCLASSTYPENAME, "The name of a particular ecological classification scheme. An example might be 'West Virginia Grassland Suitability Groups' or 'NRCS Ecological Sites'"};
  static final String[] ECOCLASSREF_DATA = {ECOCLASSREF, "The reference citation for a particular ecological classification scheme, typically a publication."};
  static final String[] ECOCLASSID_DATA = {ECOCLASSID, "The identifier of a particular ecological community. For NRCS ecological sites, it is the concatenated form of ecological site type, ecological "
    + "site MLRA, ecological site LRU, ecological site number and ecological site state FIPS alpha code"};
  static final String[] ECOCLASSNAME_DATA = {ECOCLASSNAME, "The descriptive name of a particular ecological community. For NRCS ecological sites, it is the concatenated form of three or six other "
    + "fields. The actual fields that are concatenated together to form this name differ between range and forest ecological sites"};
  static final String[] COKEY_DATA = {COKEY, "A non-connotative string of characters used to uniquely identify a record in the Component table"};
  static final String[] COECOCLASSKEY_DATA = {COECOCLASSKEY, "A non-connotative string of characters used to uniquely identify a record in the Component Ecological Classification table"};
  static final String[] SOURCESDWPRIMARYKEY_DATA = {SOURCESDWPRIMARYKEY, "Records from more than one table in NASIS are merged into a single table in the SDM DB for SDM DB tables coecoclass and mutext. In "
    + "order to be able to trace back and diagnose errors, of copy of the original SDW source table primary key is retained"};
  static final String[] SOURCESDWTABLEPHYSICALNAME_DATA = {SOURCESDWTABLEPHYSICALNAME, "Records from more than one table in NASIS are merged into a single table in the SDM DB for SDM DB tables coecoclass and mutext. In "
    + "order to be able to trace back and diagnose errors, of copy of the original SDW source table physical name is retained"};
   /**
   * This ArrayList contains a static list of columns for this table that are
   * required regardless of the calling program's preferences. This columns
   * typically identify indexes and foreign keys and other relational aspects of
   * a table that must be maintained for data integrity.
   *
   * @see Table#getMandatoryColumns()
   * @see #getMandatoryColumns()
   */
  static final ArrayList<String> MANDATORY_COLUMNS = new ArrayList<>(Arrays.asList(COKEY, COECOCLASSKEY));

  @Override
  protected ArrayList<String> getMandatoryColumns() {
    return MANDATORY_COLUMNS;
  }

  public TableCoecoclass() {
    addDataColumn(ECOCLASSTYPENAME, new TableColumnString(ECOCLASSTYPENAME_DATA));
    addDataColumn(ECOCLASSREF, new TableColumnString(ECOCLASSREF_DATA));
    addDataColumn(ECOCLASSID, new TableColumnString(ECOCLASSID_DATA));
    addDataColumn(ECOCLASSNAME, new TableColumnString(ECOCLASSNAME_DATA));
    addDataColumn(COKEY, new TableColumnInteger(COKEY_DATA));
    addDataColumn(COECOCLASSKEY, new TableColumnInteger(COECOCLASSKEY_DATA));
    addDataColumn(SOURCESDWPRIMARYKEY, new TableColumnInteger(SOURCESDWPRIMARYKEY_DATA));
    addDataColumn(SOURCESDWTABLEPHYSICALNAME, new TableColumnString(SOURCESDWTABLEPHYSICALNAME_DATA));
  }

  public String ecoclasstypename() {
    return ((String) columns.get(TableCoecoclass.ECOCLASSTYPENAME).getValue());
  }

  public void ecoclasstypename(String value) {
    columns.get(TableCoecoclass.ECOCLASSTYPENAME).setValue(value);
  }

  public String ecoclassref() {
    return ((String) columns.get(TableCoecoclass.ECOCLASSREF).getValue());
  }

  public void ecoclassref(String value) {
    columns.get(TableCoecoclass.ECOCLASSREF).setValue(value);
  }

  public String ecoclassid() {
    return ((String) columns.get(TableCoecoclass.ECOCLASSID).getValue());
  }

  public void ecoclassid(String value) {
    columns.get(TableCoecoclass.ECOCLASSID).setValue(value);
  }

  public String ecoclassname() {
    return ((String) columns.get(TableCoecoclass.ECOCLASSNAME).getValue());
  }

  public void ecoclassname(String value) {
    columns.get(TableCoecoclass.ECOCLASSNAME).setValue(value);
  }

  public int cokey() {
    return ((int) columns.get(TableCoecoclass.COKEY).getValue());
  }

  public void cokey(int value) {
    columns.get(TableCoecoclass.COKEY).setValue(value);
  }

  public int coecoclasskey() {
    return ((int) columns.get(TableCoecoclass.COECOCLASSKEY).getValue());
  }

  public void coecoclasskey(int value) {
    columns.get(TableCoecoclass.COECOCLASSKEY).setValue(value);
  }

  public int sourcesdwprimarykey() {
    return ((int) columns.get(TableCoecoclass.SOURCESDWPRIMARYKEY).getValue());
  }

  public void sourcesdwprimarykey(int value) {
    columns.get(TableCoecoclass.SOURCESDWPRIMARYKEY).setValue(value);
  }

  public String sourcesdwtablephysicalname() {
    return ((String) columns.get(TableCoecoclass.SOURCESDWTABLEPHYSICALNAME).getValue());
  }

  public void sourcesdwtablephysicalname(String value) {
    columns.get(TableCoecoclass.SOURCESDWTABLEPHYSICALNAME).setValue(value);
  }
}