If the primary key is not null, return the hashcode of the
primary key. Otherwise, return the hash code of the object.

@return int Hashcode
541959
public function hashCode()
    {
        $validPk = null !== $this->getPartId() &&
            null !== $this->getCompositeId();

        $validPrimaryKeyFKs = 2;
        $primaryKeyFKs = [];

        //relation skill_part_fk_part to table kk_trixionary_skill
        if ($this->aSkillRelatedByPartId && $hash = spl_object_hash($this->aSkillRelatedByPartId)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        //relation skill_part_fk_composite to table kk_trixionary_skill
        if ($this->aSkillRelatedByCompositeId && $hash = spl_object_hash($this->aSkillRelatedByCompositeId)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        if ($validPk) {
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
        } elseif ($validPrimaryKeyFKs) {
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
        }

        return spl_object_hash($this);
    }
117962
protected function getHash()
    {
        $query  = $this->getSQL();
        $hints  = $this->getHints();
        $params = array_map(function(Parameter $parameter) {
            // Small optimization
            // Does not invoke processParameterValue for scalar values
            if (is_scalar($value = $parameter->getValue())) {
                return $value;
            }

            return $this->processParameterValue($value);
        }, $this->parameters->getValues());

        ksort($hints);

        return sha1($query . '-' . serialize($params) . '-' . serialize($hints));
    }
1166508
public static function getPrimaryKey()
    {
        $attribute = 'primary-key';

        // retrieve value from class setting definition
        if (!static::hasClassAttribute($attribute)) {
            $key = null;
            $schema = static::getSchema();

            foreach ($schema as $field => $aspects) {
                if ($aspects['Key'] == 'PRI') {
                    $key = $field;
                    break;
                }
            }

            static::setClassAttribute($attribute, $key);
        }

        return static::getClassAttribute($attribute);
    }
886465
public function getHashCode()
    {
        if ($this->isSupervisor) {
            return $this->getSharedComponent()->getHashCode();
        }
        return md5(
            $this->argb .
            __CLASS__
        );
    }
432598
public function getPrimaryKeyValue()
    {
        //
        $key = static::getPrimaryKey();

        //
        return $key
            && isset($this->{$key})
            ? $this->{$key}
            : null;
    }
384051
public function hashCode()
    {
        $validPk = null !== $this->getSkillId() &&
            null !== $this->getReferenceId();

        $validPrimaryKeyFKs = 2;
        $primaryKeyFKs = [];

        //relation skill_reference_fk_skill to table kk_trixionary_skill
        if ($this->aSkill && $hash = spl_object_hash($this->aSkill)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        //relation skill_reference_fk_reference to table kk_trixionary_reference
        if ($this->aReference && $hash = spl_object_hash($this->aReference)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        if ($validPk) {
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
        } elseif ($validPrimaryKeyFKs) {
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
        }

        return spl_object_hash($this);
    }
1127819
public function key()
    {
        if (!$this->valid()) {
            return null;
        }

        if (null === $this->keyMapper) {
            return parent::key();
        }

        $map = $this->keyMapper;
        return $map(parent::key(), parent::current());
    }
993041
public function key()
    {
        if (isset($this->keys[$this->pos])) {
            return $this->keys[$this->pos];
        }
        return null;
    }
1204400
public function getId()
    {
        if (is_null($this->_id) && isset($this->object)) {
            $this->_id = $this->object->primaryKey;
        }

        return $this->_id;
    }
805660
public function key() {
		if ($this->_key !== null) {
			return $this->_key;
		}
		$this->_key = sha1(microtime());
		if (!$this->_key) {
			throw new RuntimeException('Invalid key generated');
		}

		return $this->_key;
	}
584240
public function getHashCode()
    {
        if ($this->isSupervisor) {
            return $this->getSharedComponent()->getHashCode();
        }
        return md5(
            $this->formatCode .
            $this->builtInFormatCode .
            __CLASS__
        );
    }
878809
public function getHashCode() {
        if ($this->_dirty) {
            $this->_hash = md5( $this->_title .
                                $this->_autoFilter .
                                ($this->_protection->isProtectionEnabled() ? 't' : 'f') .
                                __CLASS__
                              );
            $this->_dirty = false;
        }
        return $this->_hash;
    }
1158950
public function getHashCode() {
		if ($this->_isSupervisor) {
			return $this->getSharedComponent()->getHashCode();
		}
    	return md5(
    		  $this->_locked
    		. $this->_hidden
    		. __CLASS__
    	);
    }
160913
public function hashCode()
    {
        $validPk = null !== $this->getCategoryId() &&
            null !== $this->getPageId();

        $validPrimaryKeyFKs = 2;
        $primaryKeyFKs = [];

        //relation c2p_fk_904832 to table category
        if ($this->aCategory && $hash = spl_object_hash($this->aCategory)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        //relation c2p_fk_c9a38a to table page
        if ($this->aPage && $hash = spl_object_hash($this->aPage)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        if ($validPk) {
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
        } elseif ($validPrimaryKeyFKs) {
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
        }

        return spl_object_hash($this);
    }
903561
public function getPrimaryKeyName()
    {
        if ($this->primaryKey == null) {
            $model = $this->getModel();
            $this->primaryKey = $model->getPrimaryKeyName();
        }
        return $this->primaryKey;
    }
829399
public function getHashCode()
    {
        return md5(
            $this->renderingFunction .
            $this->mimeType .
            $this->uniqueName .
            parent::getHashCode() .
            __CLASS__
        );
    }
729302
public function getPrimaryKey() {
        if ($this->primaryKey === null) {
            $schema = $this->getSchema();

            $pk = [];
            foreach ($schema->getSchemaArray()['properties'] as $column => $property) {
                if (!empty($property['primary'])) {
                    $pk[] = $column;
                }
            }
            $this->primaryKey = $pk;
        }
        return $this->primaryKey;
    }