protected function query(QueryInterface $query)
    {
        $metadata = $this->getClassMetadata();

        foreach ($metadata->getFieldMappings() as $field) {
            $fieldtype = $this->getFieldManager()->get($field['fieldtype'], $field);
            if ($fieldtype instanceof FieldTypeInterface) {
                $fieldtype->query($query, $metadata);
            }
        }
    }
protected function query(QueryInterface $query)
    {
        $metadata = $this->getClassMetadata();

        foreach ($metadata->getFieldMappings() as $field) {
            $fieldtype = $this->getFieldManager()->get($field['fieldtype'], $field);
            if ($fieldtype instanceof FieldTypeInterface) {
                $fieldtype->query($query, $metadata);
            }
        }
    }
protected function query ( QueryInterface $ query ) { $ metadata = $ this -> getClassMetadata ( ) ; foreach ( $ metadata -> getFieldMappings ( ) as $ field ) { $ fieldtype = $ this -> getFieldManager ( ) -> get ( $ field [ 'fieldtype' ] , $ field ) ; if ( $ fieldtype instanceof FieldTypeInterface ) { $ fieldtype -> query ( $ query , $ metadata ) ; } } }
Internal method to run query method on each field for the managed entity.

Takes a QueryInterface instance as input

@param QueryInterface $query
Internal method to run query method on each field for the managed entity .