Add this key area description to the Record.
181863
public KeyArea setupKey(int iKeyArea)
    {
        KeyArea keyArea = null;
        if (iKeyArea == 0)
        {
            keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);
            keyArea.addKeyField(ID, DBConstants.ASCENDING);
        }
        if (iKeyArea == 1)
        {
            keyArea = this.makeIndex(DBConstants.UNIQUE, METHOD_CLASS_NAME_KEY);
            keyArea.addKeyField(METHOD_CLASS_NAME, DBConstants.ASCENDING);
            keyArea.addKeyField(METHOD_NAME, DBConstants.ASCENDING);
        }
        if (iKeyArea == 2)
        {
            keyArea = this.makeIndex(DBConstants.NOT_UNIQUE, SEQUENCE_KEY);
            keyArea.addKeyField(METHOD_CLASS_NAME, DBConstants.ASCENDING);
            keyArea.addKeyField(SEQUENCE, DBConstants.ASCENDING);
            keyArea.addKeyField(METHOD_NAME, DBConstants.ASCENDING);
        }
        if (keyArea == null)
            keyArea = super.setupKey(iKeyArea);     
        return keyArea;
    }
653433
def _add_details(self, info):
        
        for (key, val) in six.iteritems(info):
            if isinstance(key, six.text_type) and six.PY2:
                key = key.encode(pyrax.get_encoding())
            elif isinstance(key, bytes):
                key = key.decode("utf-8")
            setattr(self, key, val)
902674
public KeyArea setupKey(int iKeyArea)
    {
        KeyArea keyArea = null;
        if (iKeyArea == 0)
        {
            keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);
            keyArea.addKeyField(ID, DBConstants.ASCENDING);
        }
        if (iKeyArea == 1)
        {
            keyArea = this.makeIndex(DBConstants.UNIQUE, FILE_NAME_KEY);
            keyArea.addKeyField(FILE_NAME, DBConstants.ASCENDING);
        }
        if (keyArea == null)
            keyArea = super.setupKey(iKeyArea);     
        return keyArea;
    }
630525
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, MESSAGE_PROCESS_INFO_ID_KEY);
        keyArea.addKeyField(MESSAGE_PROCESS_INFO_ID, Constants.ASCENDING);
        keyArea.addKeyField(MESSAGE_TRANSPORT_ID, Constants.ASCENDING);
        keyArea.addKeyField(MESSAGE_VERSION_ID, Constants.ASCENDING);
    }
557312
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, OBJECT_ID_KEY);
        keyArea.addKeyField(SYSTEM_ID, Constants.ASCENDING);
        keyArea.addKeyField(OBJECT_ID, Constants.ASCENDING);
    }
573447
def add(self, key, item):
        """"""
        mmkeys = self.mmkeys
        if mmkeys is not None and not (key in self.data):
            # add abbreviations as short as minkeylength
            # always add at least one entry (even for key="")
            lenkey = len(key)
            start = min(self.minkeylength,lenkey)
            # cache references to speed up loop a bit
            mmkeysGet = mmkeys.setdefault
            for i in range(start,lenkey+1):
                mmkeysGet(key[0:i],[]).append(key)
        self.data[key] = item
731041
public KeyArea setupKey(int iKeyArea)
    {
        KeyArea keyArea = null;
        if (iKeyArea == 0)
        {
            keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);
            keyArea.addKeyField(ID, DBConstants.ASCENDING);
        }
        if (iKeyArea == 1)
        {
            keyArea = this.makeIndex(DBConstants.NOT_UNIQUE, CLASS_INFO_CLASS_NAME_KEY);
            keyArea.addKeyField(CLASS_INFO_CLASS_NAME, DBConstants.ASCENDING);
            keyArea.addKeyField(CLASS_FIELD_SEQUENCE, DBConstants.ASCENDING);
            keyArea.addKeyField(CLASS_FIELD_NAME, DBConstants.ASCENDING);
        }
        if (keyArea == null)
            keyArea = super.setupKey(iKeyArea);     
        return keyArea;
    }
1278262
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, START_DATE_TIME_KEY);
        keyArea.addKeyField(START_DATE_TIME, Constants.ASCENDING);
    }
375171
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, PARENT_FOLDER_ID_KEY);
        keyArea.addKeyField(PARENT_FOLDER_ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, NAME_KEY);
        keyArea.addKeyField(NAME, Constants.ASCENDING);
    }
1286875
public void addRecord(String key,
                          long l) throws TarMalformatException, IOException {
        addRecord(key, Long.toString(l));
    }
1060194
public KeyArea setupKey(int iKeyArea)
    {
        KeyArea keyArea = null;
        if (iKeyArea == 0)
        {
            keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY);
            keyArea.addKeyField(ID, DBConstants.ASCENDING);
        }
        if (iKeyArea == 1)
        {
            keyArea = this.makeIndex(DBConstants.NOT_UNIQUE, PARENT_FOLDER_ID_KEY);
            keyArea.addKeyField(PARENT_FOLDER_ID, DBConstants.ASCENDING);
            keyArea.addKeyField(SEQUENCE, DBConstants.ASCENDING);
            keyArea.addKeyField(NAME, DBConstants.ASCENDING);
        }
        if (iKeyArea == 2)
        {
            keyArea = this.makeIndex(DBConstants.NOT_UNIQUE, CODE_KEY);
            keyArea.addKeyField(CODE, DBConstants.ASCENDING);
        }
        if (keyArea == null)
            keyArea = super.setupKey(iKeyArea);     
        return keyArea;
    }
822535
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, REFERENCE_ID_KEY);
        keyArea.addKeyField(REFERENCE_ID, Constants.ASCENDING);
        keyArea.addKeyField(MESSAGE_TIME, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, CONTACT_TYPE_ID_KEY);
        keyArea.addKeyField(CONTACT_TYPE_ID, Constants.ASCENDING);
        keyArea.addKeyField(CONTACT_ID, Constants.ASCENDING);
        keyArea.addKeyField(MESSAGE_TIME, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, MESSAGE_TIME_KEY);
        keyArea.addKeyField(MESSAGE_TIME, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, TIMEOUT_KEY);
        keyArea.addKeyField(MESSAGE_STATUS_ID, Constants.ASCENDING);
        keyArea.addKeyField(TIMEOUT_TIME, Constants.ASCENDING);
    }
88965
def add_record(self, record):
        """"""
        rec = self.get_record(record._record_type, record.host)
        if rec:
            rec = record
            for i,r in enumerate(self._entries):
                if r._record_type == record._record_type \
                        and r.host == record.host:
                            self._entries[i] = record
        else:
            self._entries.append(record)
        self.sort()
        return True
247504
def add2set(self, pid, key, value):
    """"""
    prop = self.property_entries[pid]

    current = prop.objects.get(key, None)
    current_local_key = prop.references.get(key, None)

    if current and current is not value:
        current.detach()

    if current_local_key is None:
        prop.references[key] = prop.next_free_key
        prop.next_free_key += 1

    prop.objects[key] = value

    if prop.parent.dir:
        ref = prop.index_ref_name(key)
        dir_entry = prop.parent.dir.get(ref)
        if dir_entry is None:
            dir_entry = prop.parent.dir.makedir(ref)
        if value.dir != dir_entry:
            value.attach(dir_entry)
        prop.mark_modified()
1180388
def add(self, entry, local_file):
        """"""
        row = self.rowClass()

        for key, val in entry.items():
            if key in self.columns:
                setattr(row, key, val)

        row.local_filename = os.path.join('.', os.path.relpath(local_file))

        self.rows.append(row)
938809
public void addAdditionalDetail(String key, String detail) {
        if (detail == null || detail.trim().isEmpty())
            return;

        if (this.additionalDetails == null) {
            this.additionalDetails = new HashMap<String, String>();
        }

        String additionalContent = this.additionalDetails.get(key);
        if (additionalContent != null && !additionalContent.trim().isEmpty())
            detail = additionalContent + "-" + detail;
        if (!detail.isEmpty())
            additionalDetails.put(key, detail);
    }
83565
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.SECONDARY_KEY, CODE_KEY);
        keyArea.addKeyField(CODE, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, DESCRIPTION_KEY);
        keyArea.addKeyField(DESCRIPTION, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.NOT_UNIQUE, CLASS_PROJECT_ID_KEY);
        keyArea.addKeyField(CLASS_PROJECT_ID, Constants.ASCENDING);
        keyArea.addKeyField(DESCRIPTION, Constants.ASCENDING);
    }