TableSaTabularVer.java [src/soils/db/tables] Revision: default Date:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package soils.db.tables;
import java.util.ArrayList;
import java.util.Arrays;
/**
*
* @author scase
*/
public class TableSaTabularVer extends Table {
public static final String TABLE_NAME = "satabularver";
//Column Names
public static final String AREASYMBOL_NAME = "areasymbol";
public static final String TABULAR_VERSION = "tabularversion";
public static final String TABULAR_VERSION_EST = "tabularverest";
private static final String[] AREASYMBOL = {AREASYMBOL_NAME, "A symbol that uniquely identifies a single occurrence of a particular type of area (e.g. Lancaster Co., Nebraska is NE109)"};
private static final String[] TABULAR_VERSION_DATA = {TABULAR_VERSION, "A sequential integer number used to denote the serial version of the tabular data for a soil survey area."};
private static final String[] TABULAR_VERSION_EST_DATA = {TABULAR_VERSION_EST, "The date and time that a particular version of tabular data for the soil survey area was established."};
/**
* 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()
*/
protected static ArrayList<String> MANDATORY_COLUMNS = new ArrayList<String>(Arrays.asList(TABULAR_VERSION, TABULAR_VERSION_EST));
/**
* Constructor
*/
public TableSaTabularVer() {
tableName = TABLE_NAME;
addDataColumn(AREASYMBOL_NAME, new TableColumnString(AREASYMBOL));
addDataColumn(TABULAR_VERSION, new TableColumnInteger(TABULAR_VERSION_DATA));
addDataColumn(TABULAR_VERSION_EST, new TableColumnString(TABULAR_VERSION_EST_DATA));
}
@Override
protected ArrayList<String> getMandatoryColumns() {
return MANDATORY_COLUMNS;
}
public String areasymbol() {
return ((String) columns.get(AREASYMBOL_NAME).getValue());
}
/**
*
* @param value
*/
public void areasymbol(String value) {
columns.get(AREASYMBOL_NAME).setValue(value);
}
public int tabularversion() {
return ((int) columns.get(TABULAR_VERSION).getValue());
}
/**
*
* @param value
*/
public void tabularversion(int value) {
columns.get(TABULAR_VERSION).setValue(value);
}
public String tabularverest() {
return ((String) columns.get(TABULAR_VERSION_EST).getValue());
}
/**
*
* @param value
*/
public void tabularverest(String value) {
columns.get(TABULAR_VERSION_EST).setValue(value);
}
}