TableCocropyld.java [src/soils/db/tables] Revision: default Date:
package soils.db.tables;
import java.util.ArrayList;
import java.util.Arrays;
/**
*
* @author <a href="mailto:shaun.case@colostate.edu">Shaun Case</a>
*/
public class TableCocropyld extends Table {
public static final String CROPNAME = "cropname";
public static final String YLDUNITS = "yldunits";
public static final String NONIRRYIELD_L = "nonirryield_l";
public static final String NONIRRYIELD_R = "nonirryield_r";
public static final String NONIRRYIELD_H = "nonirryield_h";
public static final String IRRYIELD_L = "irryield_l";
public static final String IRRYIELD_R = "irryield_r";
public static final String IRRYIELD_H = "irryield_h";
public static final String CROPPRODINDEX = "cropprodindex";
public static final String VASOIPRDGRP = "vasoiprdgrp";
public static final String COKEY = "cokey";
public static final String COCROPYLDKEY = "cocropyldkey";
static final String[] CROPNAME_DATA = {CROPNAME, "<-- Add your details, formats, and units here -->"};
static final String[] YLDUNITS_DATA = {YLDUNITS, "<-- Add your details, formats, and units here -->"};
static final String[] NONIRRYIELD_L_DATA = {NONIRRYIELD_L, "<-- Add your details, formats, and units here -->"};
static final String[] NONIRRYIELD_R_DATA = {NONIRRYIELD_R, "<-- Add your details, formats, and units here -->"};
static final String[] NONIRRYIELD_H_DATA = {NONIRRYIELD_H, "<-- Add your details, formats, and units here -->"};
static final String[] IRRYIELD_L_DATA = {IRRYIELD_L, "<-- Add your details, formats, and units here -->"};
static final String[] IRRYIELD_R_DATA = {IRRYIELD_R, "<-- Add your details, formats, and units here -->"};
static final String[] IRRYIELD_H_DATA = {IRRYIELD_H, "<-- Add your details, formats, and units here -->"};
static final String[] CROPPRODINDEX_DATA = {CROPPRODINDEX, "<-- Add your details, formats, and units here -->"};
static final String[] VASOIPRDGRP_DATA = {VASOIPRDGRP, "<-- Add your details, formats, and units here -->"};
static final String[] COKEY_DATA = {COKEY, "<-- Add your details, formats, and units here -->"};
static final String[] COCROPYLDKEY_DATA = {COCROPYLDKEY, "<-- Add your details, formats, and units here -->"};
/**
* 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, COCROPYLDKEY ));
@Override
protected ArrayList<String> getMandatoryColumns() {
return MANDATORY_COLUMNS;
}
public TableCocropyld() {
addDataColumn(CROPNAME, new TableColumnString(CROPNAME_DATA));
addDataColumn(YLDUNITS, new TableColumnString(YLDUNITS_DATA));
addDataColumn(NONIRRYIELD_L, new TableColumnDouble(NONIRRYIELD_L_DATA));
addDataColumn(NONIRRYIELD_R, new TableColumnDouble(NONIRRYIELD_R_DATA));
addDataColumn(NONIRRYIELD_H, new TableColumnDouble(NONIRRYIELD_H_DATA));
addDataColumn(IRRYIELD_L, new TableColumnDouble(IRRYIELD_L_DATA));
addDataColumn(IRRYIELD_R, new TableColumnDouble(IRRYIELD_R_DATA));
addDataColumn(IRRYIELD_H, new TableColumnDouble(IRRYIELD_H_DATA));
addDataColumn(CROPPRODINDEX, new TableColumnInteger(CROPPRODINDEX_DATA));
addDataColumn(VASOIPRDGRP, new TableColumnString(VASOIPRDGRP_DATA));
addDataColumn(COKEY, new TableColumnInteger(COKEY_DATA));
addDataColumn(COCROPYLDKEY, new TableColumnInteger(COCROPYLDKEY_DATA));
}
public String cropname() {
return ((String) columns.get(TableCocropyld.CROPNAME).getValue());
}
public void cropname(String value) {
columns.get(TableCocropyld.CROPNAME).setValue(value);
}
public String yldunits() {
return ((String) columns.get(TableCocropyld.YLDUNITS).getValue());
}
public void yldunits(String value) {
columns.get(TableCocropyld.YLDUNITS).setValue(value);
}
public double nonirryield_l() {
return ((double) columns.get(TableCocropyld.NONIRRYIELD_L).getValue());
}
public void nonirryield_l(double value) {
columns.get(TableCocropyld.NONIRRYIELD_L).setValue(value);
}
public double nonirryield_r() {
return ((double) columns.get(TableCocropyld.NONIRRYIELD_R).getValue());
}
public void nonirryield_r(double value) {
columns.get(TableCocropyld.NONIRRYIELD_R).setValue(value);
}
public double nonirryield_h() {
return ((double) columns.get(TableCocropyld.NONIRRYIELD_H).getValue());
}
public void nonirryield_h(double value) {
columns.get(TableCocropyld.NONIRRYIELD_H).setValue(value);
}
public double irryield_l() {
return ((double) columns.get(TableCocropyld.IRRYIELD_L).getValue());
}
public void irryield_l(double value) {
columns.get(TableCocropyld.IRRYIELD_L).setValue(value);
}
public double irryield_r() {
return ((double) columns.get(TableCocropyld.IRRYIELD_R).getValue());
}
public void irryield_r(double value) {
columns.get(TableCocropyld.IRRYIELD_R).setValue(value);
}
public double irryield_h() {
return ((double) columns.get(TableCocropyld.IRRYIELD_H).getValue());
}
public void irryield_h(double value) {
columns.get(TableCocropyld.IRRYIELD_H).setValue(value);
}
public int cropprodindex() {
return ((int) columns.get(TableCocropyld.CROPPRODINDEX).getValue());
}
public void cropprodindex(int value) {
columns.get(TableCocropyld.CROPPRODINDEX).setValue(value);
}
public String vasoiprdgrp() {
return ((String) columns.get(TableCocropyld.VASOIPRDGRP).getValue());
}
public void vasoiprdgrp(String value) {
columns.get(TableCocropyld.VASOIPRDGRP).setValue(value);
}
public int cokey() {
return ((int) columns.get(TableCocropyld.COKEY).getValue());
}
public void cokey(int value) {
columns.get(TableCocropyld.COKEY).setValue(value);
}
public int cocropyldkey() {
return ((int) columns.get(TableCocropyld.COCROPYLDKEY).getValue());
}
public void cocropyldkey(int value) {
columns.get(TableCocropyld.COCROPYLDKEY).setValue(value);
}
}