TableMucropyld.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 TableMucropyld 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 MUKEY = "mukey";
public static final String MUCRPYLDKEY = "mucrpyldkey";
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[] MUKEY_DATA = {MUKEY, "<-- Add your details, formats, and units here -->"};
static final String[] MUCRPYLDKEY_DATA = {MUCRPYLDKEY, "<-- 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( MUKEY, MUCRPYLDKEY ));
@Override
protected ArrayList<String> getMandatoryColumns() {
return MANDATORY_COLUMNS;
}
public TableMucropyld() {
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(MUKEY, new TableColumnInteger(MUKEY_DATA));
addDataColumn(MUCRPYLDKEY, new TableColumnInteger(MUCRPYLDKEY_DATA));
}
public String cropname() {
return ((String) columns.get(TableMucropyld.CROPNAME).getValue());
}
public void cropname(String value) {
columns.get(TableMucropyld.CROPNAME).setValue(value);
}
public String yldunits() {
return ((String) columns.get(TableMucropyld.YLDUNITS).getValue());
}
public void yldunits(String value) {
columns.get(TableMucropyld.YLDUNITS).setValue(value);
}
public double nonirryield_l() {
return ((double) columns.get(TableMucropyld.NONIRRYIELD_L).getValue());
}
public void nonirryield_l(double value) {
columns.get(TableMucropyld.NONIRRYIELD_L).setValue(value);
}
public double nonirryield_r() {
return ((double) columns.get(TableMucropyld.NONIRRYIELD_R).getValue());
}
public void nonirryield_r(double value) {
columns.get(TableMucropyld.NONIRRYIELD_R).setValue(value);
}
public double nonirryield_h() {
return ((double) columns.get(TableMucropyld.NONIRRYIELD_H).getValue());
}
public void nonirryield_h(double value) {
columns.get(TableMucropyld.NONIRRYIELD_H).setValue(value);
}
public double irryield_l() {
return ((double) columns.get(TableMucropyld.IRRYIELD_L).getValue());
}
public void irryield_l(double value) {
columns.get(TableMucropyld.IRRYIELD_L).setValue(value);
}
public double irryield_r() {
return ((double) columns.get(TableMucropyld.IRRYIELD_R).getValue());
}
public void irryield_r(double value) {
columns.get(TableMucropyld.IRRYIELD_R).setValue(value);
}
public double irryield_h() {
return ((double) columns.get(TableMucropyld.IRRYIELD_H).getValue());
}
public void irryield_h(double value) {
columns.get(TableMucropyld.IRRYIELD_H).setValue(value);
}
public int mukey() {
return ((int) columns.get(TableMucropyld.MUKEY).getValue());
}
public void mukey(int value) {
columns.get(TableMucropyld.MUKEY).setValue(value);
}
public int mucrpyldkey() {
return ((int) columns.get(TableMucropyld.MUCRPYLDKEY).getValue());
}
public void mucrpyldkey(int value) {
columns.get(TableMucropyld.MUCRPYLDKEY).setValue(value);
}
}