package kfs.kfsDbiStd;

import kfs.kfsDbi.*;

/**
 *
 * @author pavedrim
 */
public class kfsOneStringTable extends kfsDbObject {

    private final kfsString data;

    public kfsOneStringTable(kfsDbServerType st, String tableName, String colName, int maxLen) {
        super(st, tableName);
        int pos = 0;
        data = new kfsString(colName, colName, maxLen, pos++);
        super.setColumns(data);
    }

    @Override
    public String getCreateTable() {
        if (getName() == null) {
            return null;
        } else {
            return super.getCreateTable();
        }
    }

    @Override
    public pjOneString getPojo(kfsRowData rd) {
        return new pjOneString(rd);
    }

    public class pjOneString extends kfsPojoObj<kfsOneStringTable> {

        public pjOneString(kfsRowData row) {
            super(kfsOneStringTable.this, row);
        }

        public String getData() {
            return inx.data.getData(rd);
        }

        public void setData(String newVal) {
            inx.data.setData(newVal, rd);
        }
    }
    
    public class pjOneStringList extends kfsPojoArrayList<kfsOneStringTable, pjOneString> {

        public pjOneStringList() {
            super(kfsOneStringTable.this);
        }
    }    
}

@@ -1053,24 +1053,112 @@
 ;%0A        %7D%0A
+%0A        @Override%0A        public String toString() %7B%0A            return getData();%0A    
     %7D%0A    %0A 
@@ -1155,16 +1155,18 @@
   %7D%0A    
+%7D%0A
 %0A    pub
@@ -1344,15 +1344,11 @@
  %7D%0A    %7D
-    
 %0A%7D%0A

add toString