Adds inherited shard key to the subclass mapping.
779333
private function setInheritedShardKey(ClassMetadata $subClass, ClassMetadata $parentClass) : void
    {
        if (! $parentClass->isSharded()) {
            return;
        }

        $subClass->setShardKey(
            $parentClass->shardKey['keys'],
            $parentClass->shardKey['options']
        );
    }
769368
public void setShardingKey(Object shardingKey) throws SQLException {
        if (!changable)
            throw new SQLException(AdapterUtil.getNLSMessage("WS_INTERNAL_ERROR",
                "ConnectionRequestInfo cannot be modified, doing so may result in corruption: shardingKey, cri", shardingKey, this));

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(this, tc, "Setting sharding key on the CRI to: " + shardingKey);

        ivShardingKey = shardingKey;
    }
389855
private function addInheritedFields(ClassMetadata $subClass, ClassMetadata $parentClass) : void
    {
        foreach ($parentClass->fieldMappings as $fieldName => $mapping) {
            if (! isset($mapping['inherited']) && ! $parentClass->isMappedSuperclass) {
                $mapping['inherited'] = $parentClass->name;
            }
            if (! isset($mapping['declared'])) {
                $mapping['declared'] = $parentClass->name;
            }
            $subClass->addInheritedFieldMapping($mapping);
        }
        foreach ($parentClass->reflFields as $name => $field) {
            $subClass->reflFields[$name] = $field;
        }
    }
1102977
private void checkNewlySharded(DBObject dbObj, Map<String, String> currScalarMap) {
        if (!m_tableDef.isSharded()) {
            return;
        }
        String shardingFieldName = m_tableDef.getShardingField().getName();
        if (!currScalarMap.containsKey(shardingFieldName)) {
            m_dbTran.addAllObjectsColumn(m_tableDef, dbObj.getObjectID(), m_tableDef.getShardNumber(dbObj));
        }
    }
862091
def merge_extends(self, target, extends, inherit_key="inherit", inherit=False):
        
        if isinstance(target, dict):
            if inherit and inherit_key in target and not to_boolean(target[inherit_key]):
                return
            if not isinstance(extends, dict):
                raise ValueError("Unable to merge: Dictionnary expected")
            for key in extends:
                if key not in target:
                    target[str(key)] = extends[key]
                else:
                    self.merge_extends(target[key], extends[key], inherit_key, True)
        elif isinstance(target, list):
            if not isinstance(extends, list):
                raise ValueError("Unable to merge: List expected")
            target += extends
782039
void addNewKey(Object key)
    {
        ensureRoom(buildKeyPosition + 1);
        buildKeys[buildKeyPosition++] = updateFunction.apply(key);
    }
1044613
public void setInheritedObjectType(final byte[] inheritedObjectType) {
        this.inheritedObjectType = inheritedObjectType == null || inheritedObjectType.length == 0
                ? null
                : Arrays.copyOf(inheritedObjectType, inheritedObjectType.length);
    }
377635
private int addContentHash(final PropertyKey key, final int contentHash) {

		final Object value = getProperty(key);
		if (value != null) {

			return contentHash ^ value.hashCode();
		}

		return contentHash;
	}
1078851
function addSharedMembers(terria, initSources) {
  const catalogForSharing = flattenCatalog(
    terria.catalog.serializeToJson({
      itemFilter: combineFilters([CatalogMember.itemFilters.noLocalData]),
      propertyFilter: combineFilters([
        CatalogMember.propertyFilters.sharedOnly,
        function(property) {
          return property !== "name";
        }
      ])
    })
  )
    .filter(function(item) {
      return item.isEnabled || item.isOpen;
    })
    .reduce(function(soFar, item) {
      soFar[item.id] = item;
      item.id = undefined;
      return soFar;
    }, {});

  // Eliminate open groups without all ancestors open
  Object.keys(catalogForSharing).forEach(key => {
    const item = catalogForSharing[key];
    const isGroupWithClosedParent =
      item.isOpen &&
      item.parents.some(parentId => !catalogForSharing[parentId]);

    if (isGroupWithClosedParent) {
      catalogForSharing[key] = undefined;
    }
  });

  if (Object.keys(catalogForSharing).length > 0) {
    initSources.push({
      sharedCatalogMembers: catalogForSharing
    });
  }
}
690658
private void unmarshalKeyAndParentKey() throws Throwable {
    KeyMetadata keyMetadata = entityMetadata.getKeyMetadata();
    if (keyMetadata != null) {
      MethodHandle writeMethod = keyMetadata.getWriteMethod();
      Key entityKey = (Key) nativeEntity.getKey();
      writeMethod.invoke(entity, new DefaultDatastoreKey(entityKey));
    }

    ParentKeyMetadata parentKeyMetadata = entityMetadata.getParentKeyMetadata();
    if (parentKeyMetadata != null) {
      MethodHandle writeMethod = parentKeyMetadata.getWriteMethod();
      Key parentKey = nativeEntity.getKey().getParent();
      if (parentKey != null) {
        writeMethod.invoke(entity, new DefaultDatastoreKey(parentKey));
      }
    }
  }
679414
protected void addAttributes(final boolean _inherited,
                                 final Attribute... _attributes)
        throws CacheReloadException
    {
        for (final Attribute attribute : _attributes) {
            if (!this.attributes.containsKey(attribute.getName())) {
                Type.LOG.trace("adding Attribute:'{}' to type: '{}'", attribute.getName(), getName());
                // evaluate for type attribute
                if (attribute.getAttributeType().getClassRepr().equals(TypeType.class)) {
                    this.typeAttributeName = attribute.getName();
                } else if (attribute.getAttributeType().getClassRepr().equals(StatusType.class) && !_inherited) {
                    // evaluate for status, an inherited attribute will not
                    // overwrite the original attribute
                    this.statusAttributeName = attribute.getName();
                } else if (attribute.getAttributeType().getClassRepr().equals(CompanyLinkType.class)
                                || attribute.getAttributeType().getClassRepr().equals(ConsortiumLinkType.class)) {
                    // evaluate for company
                    this.companyAttributeName = attribute.getName();
                } else if (attribute.getAttributeType().getClassRepr().equals(GroupLinkType.class)) {
                    // evaluate for group
                    this.groupAttributeName = attribute.getName();
                }
                this.attributes.put(attribute.getName(), attribute);
                if (attribute.getTable() != null) {
                    this.tables.add(attribute.getTable());
                    attribute.getTable().addType(getId());
                    if (getMainTable() == null) {
                        setMainTable(attribute.getTable());
                    }
                }
                setDirty();
            }
        }
    }
491882
private CacheTopology addPartitioner(CacheTopology cacheTopology) {
      ConsistentHash currentCH = cacheTopology.getCurrentCH();
      currentCH = new PartitionerConsistentHash(currentCH, keyPartitioner);
      ConsistentHash pendingCH = cacheTopology.getPendingCH();
      if (pendingCH != null) {
         pendingCH = new PartitionerConsistentHash(pendingCH, keyPartitioner);
      }
      ConsistentHash unionCH = cacheTopology.getUnionCH();
      if (unionCH != null) {
         unionCH = new PartitionerConsistentHash(unionCH, keyPartitioner);
      }
      return new CacheTopology(cacheTopology.getTopologyId(), cacheTopology.getRebalanceId(), currentCH, pendingCH,
            unionCH, cacheTopology.getPhase(), cacheTopology.getActualMembers(), cacheTopology.getMembersPersistentUUIDs());
   }
1149585
public BatchResult addBatch(ApplicationDefinition appDef, String shardName, OlapBatch batch) {
        Utils.require(shardName.equals(MONO_SHARD_NAME), "Shard name must be: " + MONO_SHARD_NAME);
        return OLAPService.instance().addBatch(appDef, shardName, batch);
    }
1337979
def _BuildKeyHierarchy(self, subkeys, values):
    
    if subkeys:
      for registry_key in subkeys:
        name = registry_key.name.upper()
        if name in self._subkeys:
          continue
        self._subkeys[name] = registry_key

        # pylint: disable=protected-access
        registry_key._key_path = key_paths.JoinKeyPath([
            self._key_path, registry_key.name])

    if values:
      for registry_value in values:
        name = registry_value.name.upper()
        if name in self._values:
          continue
        self._values[name] = registry_value
1013619
function (map) {
            var key;
            for (key in map) {
                if (map.hasOwnProperty(key)) {
                    this.addInstance(key, map[key]);
                }
            }
            return this;
        }
851731
def _add_base_class(mcs, cls):
        
        # Do all magic only if subclass had defined required attributes
        if getattr(mcs, '_base_classes_hash', None) is not None:
            meta = getattr(cls, 'Meta', None)
            _hash = getattr(meta, mcs._hashattr, None)
            if _hash is None and cls not in mcs._get_base_classes():
                mcs._base_classes.insert(0, cls)
                mcs._generated_class = {}  # Cleanup all caches
            elif _hash is not None and cls not in mcs._get_base_classes(_hash):
                mcs._base_classes_hash[_hash].insert(0, cls)
                mcs._generated_class[_hash] = None
290563
private static void inheritOwnerAndGroupIfEmpty(MutableInode<?> newInode,
      InodeDirectoryView ancestorInode) {
    if (ServerConfiguration.getBoolean(PropertyKey.MASTER_METASTORE_INODE_INHERIT_OWNER_AND_GROUP)
        && newInode.getOwner().isEmpty() && newInode.getGroup().isEmpty()) {
      // Inherit owner / group if empty
      newInode.setOwner(ancestorInode.getOwner());
      newInode.setGroup(ancestorInode.getGroup());
    }
  }