private void LoadPrefixMap(Cursor dataTableCursor) { // Find the Schema Naming Context by its objectCategory dataTableCursor.CurrentIndex = this.FindIndexName(CommonDirectoryAttributes.ObjectCategory); int schemaObjectCategoryId = this.FindClassId(CommonDirectoryClasses.Schema); bool schemaFound = dataTableCursor.GotoKey(Key.Compose(schemaObjectCategoryId)); // Load the prefix map from this object var prefixMapColId = this.FindColumnId(CommonDirectoryAttributes.PrefixMap); byte[] binaryPrefixMap = dataTableCursor.RetrieveColumnAsByteArray(prefixMapColId); this.PrefixMapper = new PrefixMap(binaryPrefixMap); foreach(var attribute in this.attributesByName.Values) { if (attribute.Id.HasValue) { attribute.Oid = this.PrefixMapper.Translate((uint)attribute.Id.Value); } } }
private Columnid LoadColumnIdByAttributeName(Cursor cursor, string attributeName) { Columnid attributeIdCol = this.attributesByInternalId[CommonDirectoryAttributes.AttributeIdId].ColumnID; // Assume that attributeNameIndex is set as the current index cursor.GotoKey(Key.Compose(attributeName)); int attributeId = cursor.RetrieveColumnAsInt(attributeIdCol).Value; return this.attributesByInternalId[attributeId].ColumnID; }