public function setUserId($userId)
    {
        $userId = (int) $userId;

        if ($this->userId < 0) {
            throw new \UnderflowException('Value of "userId" must be greater than 0');
        }


        if ($this->exists() && $this->userId !== $userId) {
            $this->updated['userId'] = true;
        }

        $this->userId = $userId;

        return $this;
    }
public function setUserId($userId)
    {
        $userId = (int) $userId;

        if ($this->userId < 0) {
            throw new \UnderflowException('Value of "userId" must be greater than 0');
        }


        if ($this->exists() && $this->userId !== $userId) {
            $this->updated['userId'] = true;
        }

        $this->userId = $userId;

        return $this;
    }
public function setUserId ( $ userId ) { $ userId = ( int ) $ userId ; if ( $ this -> userId < 0 ) { throw new \ UnderflowException ( 'Value of "userId" must be greater than 0' ) ; } if ( $ this -> exists ( ) && $ this -> userId !== $ userId ) { $ this -> updated [ 'userId' ] = true ; } $ this -> userId = $ userId ; return $ this ; }
Set value for field "user_id"

@param  int $userId
@return $this
@throws \UnderflowException
Set value for field user_id