Add this field in the Record's field sequence.
519684
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == kID)
        //  field = new CounterField(this, "ID", Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
        {
            field = super.setupField(iFieldSeq);
            if (field == null) if (iFieldSeq < kControlRecordLastField)
                field = new EmptyField(this);
        }
        return field;
    }
1273938
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new StringField(this, NAME, 30, null, null);
        if (iFieldSeq == 4)
            field = new StringField(this, DESCRIPTION, 30, null, null);
        if (iFieldSeq == 5)
            field = new StringField(this, VERSION, 20, null, null);
        if (iFieldSeq == 6)
            field = new IntegerField(this, START_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 7)
            field = new IntegerField(this, END_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 8)
            field = new StringField(this, BASE_DATABASE, 30, null, null);
        if (iFieldSeq == 9)
            field = new PropertiesField(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
316174
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new StringField(this, SCREEN_IN_PROG_NAME, 40, null, null);
        if (iFieldSeq == 4)
            field = new ShortField(this, SCREEN_OUT_NUMBER, 2, null, null);
        if (iFieldSeq == 5)
            field = new ShortField(this, SCREEN_ITEM_NUMBER, 4, null, null);
        if (iFieldSeq == 6)
        {
            field = new StringField(this, SCREEN_FILE_NAME, 40, null, null);
            field.addListener(new InitOnceFieldHandler(null));
        }
        if (iFieldSeq == 7)
            field = new StringField(this, SCREEN_FIELD_NAME, 40, null, null);
        if (iFieldSeq == 8)
            field = new ShortField(this, SCREEN_ROW, 8, null, null);
        if (iFieldSeq == 9)
            field = new ShortField(this, SCREEN_COL, 4, null, null);
        if (iFieldSeq == 10)
            field = new StringField(this, SCREEN_GROUP, 4, null, null);
        if (iFieldSeq == 11)
            field = new ShortField(this, SCREEN_PHYSICAL_NUM, 4, null, null);
        if (iFieldSeq == 12)
            field = new ScreenLocField(this, SCREEN_LOCATION, 20, null, null);
        if (iFieldSeq == 13)
            field = new FieldDescField(this, SCREEN_FIELD_DESC, 30, null, null);
        if (iFieldSeq == 14)
            field = new MemoField(this, SCREEN_TEXT, 9999, null, null);
        if (iFieldSeq == 15)
            field = new ScreenAnchorField(this, SCREEN_ANCHOR, 20, null, null);
        if (iFieldSeq == 16)
            field = new ControlTypeField(this, SCREEN_CONTROL_TYPE, 20, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
1059005
def add_field(field, func, dict_sequence):
    
    for item in dict_sequence:
        if field not in item:
            item[field] = func(item)
        yield item
491407
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        if (iFieldSeq == 0)
        {
            field = new CounterField(this, ID, 8, null, null);
            field.setHidden(true);
        }
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new StringField(this, CODE, 16, null, null);
        if (iFieldSeq == 4)
            field = new StringField(this, NAME, 30, null, null);
        if (iFieldSeq == 5)
            field = new StringField(this, ADDRESS_LINE_1, 40, null, null);
        if (iFieldSeq == 6)
            field = new StringField(this, ADDRESS_LINE_2, 40, null, null);
        if (iFieldSeq == 7)
            field = new StringField(this, CITY_OR_TOWN, 15, null, null);
        if (iFieldSeq == 8)
            field = new StringField(this, STATE_OR_REGION, 15, null, null);
        if (iFieldSeq == 9)
            field = new StringField(this, POSTAL_CODE, 10, null, null);
        if (iFieldSeq == 10)
            field = new StringField(this, COUNTRY, 15, null, null);
        if (iFieldSeq == 11)
            field = new PhoneField(this, TEL, 24, null, null);
        if (iFieldSeq == 12)
            field = new FaxField(this, FAX, 24, null, null);
        if (iFieldSeq == 13)
            field = new EMailField(this, EMAIL, 40, null, null);
        if (iFieldSeq == 14)
            field = new URLField(this, WEB, 60, null, null);
        if (iFieldSeq == 15)
            field = new Person_DateEntered(this, DATE_ENTERED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 16)
            field = new DateField(this, DATE_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 17)
            field = new ReferenceField(this, CHANGED_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 18)
            field = new MemoField(this, COMMENTS, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 19)
            field = new UserField(this, USER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 20)
            field = new StringField(this, PASSWORD, 16, null, null);
        if (iFieldSeq == 21)
            field = new StringField(this, NAME_SORT, 6, null, null);
        if (iFieldSeq == 22)
            field = new StringField(this, POSTAL_CODE_SORT, 5, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
1300903
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new ProjectField(this, PROJECT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 4)
            field = new ProjectVersionField(this, PROJECT_VERSION_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 5)
            field = new IssueTypeField(this, ISSUE_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 6)
            field = new IssueStatusField(this, ISSUE_STATUS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 7)
            field = new IssuePriorityField(this, ISSUE_PRIORITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
633982
public void add(Rec fieldList) throws DBException
    {
        if (this.getBaseRecord() == fieldList)    // If so, set the correct record for write
            fieldList = this.moveToCurrentRecord((Record)fieldList);   // Hopefully, they supplied a default record type and this will switch it.
        if (fieldList == null)
            throw new DBException("Unknown shared record type");
        if (fieldList == this.getBaseRecord())
            super.add(fieldList);
        else
        {
            this.getBaseRecord().matchListeners((Record)fieldList, false, true, true, true, true);      // Clone the listeners that are not there already.
            fieldList.getTable().add(fieldList);
        }
    }
1227521
public void setupSFields()
    {
        Record query = this.getMainRecord();
        for (int fieldSeq = query.getFieldSeq(FileHdr.FILE_NAME); fieldSeq < query.getFieldSeq(FileHdr.FILE_NOTES); fieldSeq++)
            query.getField(fieldSeq).setupFieldView(this);  // Add this view to the list
        for (int fieldSeq = query.getFieldSeq(FileHdr.FILE_NOTES)+1; fieldSeq < query.getFieldCount(); fieldSeq++)
            query.getField(fieldSeq).setupFieldView(this);  // Add this view to the list
        query.getField(FileHdr.FILE_NOTES).setupFieldView(this);    // Add this view to the list
    }
15304
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
        {
            field = new CalendarEntryTypeField(this, CALENDAR_ENTRY_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
            field.setHidden(true);
        }
        if (iFieldSeq == 4)
            field = new DateTimeField(this, START_DATE_TIME, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 5)
            field = new DateTimeField(this, END_DATE_TIME, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 6)
            field = new StringField(this, DESCRIPTION, 60, null, null);
        if (iFieldSeq == 7)
        {
            field = new CalendarCategoryField(this, CALENDAR_CATEGORY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
            field.addListener(new InitOnceFieldHandler(null));
        }
        if (iFieldSeq == 8)
            field = new BooleanField(this, HIDDEN, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        if (iFieldSeq == 9)
            field = new PropertiesField(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 10)
            field = new AnnivMasterField(this, ANNIV_MASTER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
1315482
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new StringField(this, DESCRIPTION, 30, null, null);
        if (iFieldSeq == 4)
            field = new StringField(this, CODE, 20, null, null);
        if (iFieldSeq == 5)
            field = new StringField(this, NAMESPACE, 128, null, null);
        if (iFieldSeq == 6)
            field = new StringField(this, SCHEMA_LOCATION, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 7)
            field = new StringField(this, NUMERIC_VERSION, 20, null, null);
        if (iFieldSeq == 8)
            field = new StringField(this, VERSION_ID, 20, null, null);
        if (iFieldSeq == 9)
            field = new PropertiesField(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
129412
def add_str(self, seq, name=None, description=""):
        """"""
        self.add_seq(SeqRecord(Seq(seq), id=name, description=description))
877354
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new ImageField(this, START_ICON, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 4)
            field = new ImageField(this, END_ICON, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 5)
            field = new ImageField(this, START_PARENT_ICON, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 6)
            field = new ImageField(this, END_PARENT_ICON, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 7)
            field = new ColorField(this, TASK_COLOR, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 8)
            field = new ColorField(this, TASK_SELECT_COLOR, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 9)
            field = new ColorField(this, PARENT_TASK_COLOR, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 10)
            field = new ColorField(this, PARENT_TASK_SELECT_COLOR, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
953550
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 3)
        //  field = new StringField(this, NAME, 40, null, null);
        if (iFieldSeq == 4)
            field = new PackagesField(this, PARENT_FOLDER_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //if (iFieldSeq == 5)
        //  field = new ShortField(this, SEQUENCE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //if (iFieldSeq == 6)
        //  field = new MemoField(this, COMMENT, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //if (iFieldSeq == 7)
        //  field = new StringField(this, CODE, 30, null, null);
        if (iFieldSeq == 8)
            field = new ClassProjectField(this, CLASS_PROJECT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 9)
        {
            field = new CodeTypeField(this, CODE_TYPE, Constants.DEFAULT_FIELD_LENGTH, null, "BASE");
            field.addListener(new InitOnceFieldHandler(null));
        }
        if (iFieldSeq == 10)
            field = new PartField(this, PART_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 11)
            field = new BooleanField(this, RECURSIVE, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        if (iFieldSeq == 12)
            field = new BooleanField(this, EXCLUDE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 13)
            field = new BooleanField(this, MANUAL, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        if (iFieldSeq == 14)
            field = new DateTimeField(this, LAST_UPDATED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
670206
public BaseField setupField(int iFieldSeq)
    {
        BaseField field = null;
        //if (iFieldSeq == 0)
        //{
        //  field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 1)
        //{
        //  field = new RecordChangedField(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        //  field.setHidden(true);
        //}
        //if (iFieldSeq == 2)
        //{
        //  field = new BooleanField(this, DELETED, Constants.DEFAULT_FIELD_LENGTH, null, new Boolean(false));
        //  field.setHidden(true);
        //}
        if (iFieldSeq == 3)
            field = new StringField(this, DESCRIPTION, 30, null, null);
        if (iFieldSeq == 4)
            field = new StringField(this, CODE, 10, null, null);
        if (iFieldSeq == 5)
            field = new PasswordPropertiesField(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (iFieldSeq == 6)
            field = new MessageTransportTypeField(this, MESSAGE_TRANSPORT_TYPE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        if (field == null)
            field = super.setupField(iFieldSeq);
        return field;
    }
821780
@Override
	public void addField(final SchemaField field) {

		if (field instanceof FieldDefinition) {
			addField((FieldDefinition) field);
		} else if (field instanceof CopyFieldDefinition) {
			addCopyField((CopyFieldDefinition) field);
		}
	}
301081
public void init(Record record, int iFieldSeq, String fieldName, int iSecondaryFieldSeq, String secondaryFieldName)
    {
        Converter converter = null;
        m_recMerge = record;
        m_iFieldSeq = iFieldSeq;
        m_iSecondaryFieldSeq = iSecondaryFieldSeq;
        this.fieldName = fieldName;
        this.secondaryFieldName = secondaryFieldName;
        if (record != null)
            converter = this.getTargetField(null);
        super.init(converter, null);
        if (record != null)
            record.addListener(new RemoveConverterOnCloseHandler(this));    // Because this is a converter (not a fieldConverter)
        if (m_recMerge != null)
            if (m_recMerge.getTable() instanceof MultiTable)
        {   // Add all the fields in the sub-records
            MultiTable multiTable = (MultiTable)m_recMerge.getTable();
            Iterator<BaseTable> iterator = multiTable.getTables();
            while (iterator.hasNext())
            {
                BaseTable table = (BaseTable)iterator.next();
                Converter field = this.getTargetField(table.getRecord());
                this.addConverterToPass(field);     // Add it, and
            }
        }
    }
28615
def add_record(self, record):
        
        record.setdefault('_oai', {}).setdefault('sets', [])

        assert not self.has_record(record)

        record['_oai']['sets'].append(self.spec)