Add field to schema and initializes getter and setter for the field.
438935
function addToSchema(index, properties) {
        this[_privateKey]._schema[index] = normalizeProperties.call(this, properties, index);

        defineGetter.call(this[_privateKey]._getset, index, this[_privateKey]._schema[index]);
        defineSetter.call(this[_privateKey]._getset, index, this[_privateKey]._schema[index]);
    }
318200
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, KEY, 128, null, null);
        field = new FieldInfo(this, VALUE, 255, null, null);
        field = new FieldInfo(this, COMMENT, 255, null, null);
    }
1311190
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, DESCRIPTION, 50, null, null);
        field = new FieldInfo(this, CODE, 30, null, null);
        field = new FieldInfo(this, MESSAGE_CLASS, 127, null, null);
        field = new FieldInfo(this, MESSAGE_PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, MESSAGE_INFO_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, new Integer(1));
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, REVERSE_MESSAGE_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CONTACT_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, REQUEST_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
    }
23516
public void init(BaseField field, BaseField fldTarget, boolean bSetModified)
    {
        super.init(field);
        m_fldTarget = fldTarget;
        m_bSetModified = bSetModified;

        this.setRespondsToMode(DBConstants.INIT_MOVE, false);
        this.setRespondsToMode(DBConstants.READ_MOVE, false);
    }
310908
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, CLASS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_INCLUDES_CLASS, 128, null, null);
    }
723559
function (field) {
            var schemaDefinition = this.schema[field];
            if (!schemaDefinition) {
                throw "Couldn't find '" + field + "' in schema";
            }
            var collection = this.get(field);
            if (!collection) {
                var context = this.getContextForChild(schemaDefinition.type);
                if (context) {
                    collection = context.createCollection(schemaDefinition.type, null);
                    collection.$parent = this;
                    this.set(field, collection);
                } else {
                    throw "Couldn't determine context for " + field;
                }
            }
            return collection;


        }
343067
public function addField(string $name, $value)
    {
        $schema = $this->constant('SCHEMA')->getValue();
        $schema[$name] = $value;
        $this->constant('SCHEMA')->setValue($schema);
    }
181806
public void init(BaseField field, BaseField fldDest, BaseField fldSource)
    {
        super.init(field, fldDest, fldSource, false, false, false);
    }
690814
function initFields () {
    // skip if no model
    if (!this.model) {
        return
    }
    // if not fields list was passed in args then add all model properties
    if (!this.fields.length && this.model.schemaData) {
        // get data properites from schema
        var properties = this.model.schemaData.properties
        // add each property from data schema as form field
        _.each(properties, (schema, property) => {
            this.fields.push(property)
        })
    }
    // iterate over fields building spec based on args and schema
    this.fields = _.map(this.fields, field => {
        // field group
        if (Array.isArray(field)) {
            // build spec for each field in group
            field = _.map(field, field => initField(this, field))
            // set correct width units for fields
            setUnits(this, field)
        }
        // individual field
        else {
            field = initField(this, field)
        }
        // return field specification
        return field
    })
}
285613
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, WEB_SERVICES_SERVER, 128, null, "/ws");
        field = new FieldInfo(this, DEFAULT_VERSION_ID, 20, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, BASE_NAMESPACE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, BASE_SCHEMA_LOCATION, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, WEB_MESSAGE_TRANSPORT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
    }
422253
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, CLASS_INFO_CLASS_NAME, 40, null, null);
        field = new FieldInfo(this, CLASS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_FIELD_CLASS, 60, null, null);
        field = new FieldInfo(this, CLASS_FIELD_SEQUENCE, 10, null, new Integer(0));
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_FIELD_NAME, 40, null, null);
        field = new FieldInfo(this, CLASS_FIELD_DESC, 30, null, null);
        field = new FieldInfo(this, CLASS_FIELD_PROTECT, 30, null, null);
        field = new FieldInfo(this, CLASS_FIELD_INITIAL, 32000, null, null);
        field = new FieldInfo(this, CLASS_FIELD_INITIAL_VALUE, 32000, null, null);
        field = new FieldInfo(this, CLASS_FIELDS_TYPE, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field = new FieldInfo(this, INCLUDE_SCOPE, 10, null, new Integer(0x004));
        field.setDataClass(Integer.class);
    }
1080671
public void addDocument(String... fields){
        for (int i = 0; i < fields.length; i++) {
            final DataType type = schema.getType(i);
            String field = fields[i];
            final Map<String, Set<Integer>> stringSetMap = this.fields.get(i);
            if(type == DataType.DateYear){ // reformat field value for date year
                 field = field.split("-")[0];
            }
            Set<Integer> integers = stringSetMap.get(field);
            if(integers == null){
                integers = new TreeSet<>();
            }
            integers.add(docPosition);
            stringSetMap.put(field, integers);
        }
        docPosition++;
    }
1231666
function () {

                if (this.factory.schema) {
                    this.schema = this.factory.schema;
                    return;
                }
                var base = this.base;

                while (base.factory.classof(Entity)) {
                    var baseSchema = base.schema;
                    for (var type in baseSchema) {
                        if (baseSchema.hasOwnProperty(type) && !this.schema.hasOwnProperty(type)) {
                            this.schema[type] = baseSchema[type];
                        }
                    }
                    base = base.base;
                }

                var schemaDefaults = {
                    required: true,
                    includeInIndex: false,
                    serverOnly: false,
                    _rewritten: true,
                    // if true, sub models get composed and not just linked
                    compose: false
                }, schemaObject;

                // add id schema
                if (this.idField && !this.schema.hasOwnProperty(this.idField)) {
                    this.schema[this.idField] = {
                        type: String,
                        required: false,
                        serverOnly: false,
                        includeInIndex: true,
                        generated: true
                    };
                }

                if (this.updatedField && !this.schema.hasOwnProperty(this.updatedField)) {
                    this.schema[this.updatedField] = {
                        type: Date,
                        required: false,
                        serverOnly: false,
                        includeInIndex: true,
                        generated: true
                    };
                }

                if (this.createdField && !this.schema.hasOwnProperty(this.createdField)) {
                    this.schema[this.createdField] = {
                        type: Date,
                        required: false,
                        includeInIndex: true,
                        serverOnly: false,
                        generated: true
                    };
                }

                // rewrite schema
                for (var key in this.schema) {
                    if (this.schema.hasOwnProperty(key)) {
                        schemaObject = this.schema[key];
                        if (_.isString(schemaObject) || schemaObject instanceof Array || schemaObject instanceof Function) {
                            schemaObject = {
                                type: schemaObject
                            };
                            this.schema[key] = schemaObject;
                        }
                        if (_.isString(schemaObject.type)) {
                            schemaObject.type = require(schemaObject.type.replace(/\./g, "/"));
                        }
                        _.defaults(schemaObject, schemaDefaults);
                        schemaObject._key = key;
                    }
                }
                this.factory.schema = this.schema;
            }
1027053
def add_field(self, field, **kwargs):
        """"""
        getattr(self, self._private_fields_name).append(field)
        self._expire_cache(reverse=True)
        self._expire_cache(reverse=False)
317889
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, CLASS_NAME, 40, null, null);
        field = new FieldInfo(this, SEQUENCE_NO, 4, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, KEY_NAME, 40, null, null);
        field = new FieldInfo(this, VALUE_NAME, 255, null, null);
    }
773144
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, KEY_FILENAME, 40, null, null);
        field = new FieldInfo(this, KEY_NUMBER, 2, null, null);
        field.setDataClass(Short.class);
        field = new FieldInfo(this, KEY_FIELD_1, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_2, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_3, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_4, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_5, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_6, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_7, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_8, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_9, 40, null, null);
        field = new FieldInfo(this, KEY_NAME, 40, null, null);
        field = new FieldInfo(this, KEY_TYPE, 1, null, null);
        field = new FieldInfo(this, INCLUDE_SCOPE, 10, null, new Integer(0x004));
        field.setDataClass(Integer.class);
    }
612392
public void setupSFields()
    {
        Record record = this.getMainRecord();
        BaseField field = record.getField(DBConstants.MAIN_FIELD);
        if (field == record.getCounterField())
            this.addColumn(field);
        super.setupSFields();
    }