
/**
 *
 * @author f.palumbo
 */
public class MyField {
// name of the field
    String sName,
// table owner of the field
            sTableName;
// type of field : p = has parameter , c = constant
    char cType = 'p';
// index of the field
    int iInd;
// comes from a select
    boolean bSelect, 
// belongs to base (inserting) table
            bBase,
// represents selection or insertion of all fields
            bAllFields = false,
// comes from a select and in included in the result set
            bFromField;

    public MyField(int inInd, boolean inSelect, boolean inBase, boolean inFromField) {
        iInd = inInd;
        bSelect = inSelect;
        bBase = inBase;
        bFromField = inFromField;
    }

    public int getColId() {
        return iInd;
    }

    public String getTableName() {
        return sTableName;
    }

    public boolean isSelect() {
        return bSelect;
    }

    public boolean isFromField() {
        return bFromField;
    }

    public void setType(char inType) {
        cType = inType;
    }

    public void setName(String inName) {
        sName = inName;
    }

    public void setAllFields(boolean inAllFields) {
        bAllFields = inAllFields;
    }

    public void setTableName(String inTableName) {
        sTableName = inTableName;
    }

    public void setBaseTable(boolean inBaseTable) {
        bBase = inBaseTable;
    }

    public String toString() {
        return "col=" + sName + "= ind=" + iInd + "= typ=" + cType +
                "= tab=" + sTableName + "= select=" + bSelect + "= baseTable=" +
                bBase + "= allFields =" + bAllFields + "= FromField=" +bFromField +"=";
    }
}
