/**
  * Fills an array with the names of all bound variables in the constraints
  *
  * @param array &$boundVariables
  * @return void
  */
 public function collectBoundVariableNames(&$boundVariables)
 {
     $this->constraint1->collectBoundVariableNames($boundVariables);
     $this->constraint2->collectBoundVariableNames($boundVariables);
 }
 /**
  * Transforms a constraint into SQL and parameter arrays
  *
  * @param Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint The constraint
  * @param Tx_Extbase_Persistence_QOM_SourceInterface $source The source
  * @param array &$sql The query parts
  * @param array &$parameters The parameters that will replace the markers
  * @param array $boundVariableValues The bound variables in the query (key) and their values (value)
  * @return void
  */
 protected function parseConstraint(Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint = NULL, Tx_Extbase_Persistence_QOM_SourceInterface $source, array &$sql, array &$parameters)
 {
     if ($constraint instanceof Tx_Extbase_Persistence_QOM_AndInterface) {
         $sql['where'][] = '(';
         $this->parseConstraint($constraint->getConstraint1(), $source, $sql, $parameters);
         $sql['where'][] = ' AND ';
         $this->parseConstraint($constraint->getConstraint2(), $source, $sql, $parameters);
         $sql['where'][] = ')';
     } elseif ($constraint instanceof Tx_Extbase_Persistence_QOM_OrInterface) {
         $sql['where'][] = '(';
         $this->parseConstraint($constraint->getConstraint1(), $source, $sql, $parameters);
         $sql['where'][] = ' OR ';
         $this->parseConstraint($constraint->getConstraint2(), $source, $sql, $parameters);
         $sql['where'][] = ')';
     } elseif ($constraint instanceof Tx_Extbase_Persistence_QOM_NotInterface) {
         $sql['where'][] = 'NOT (';
         $this->parseConstraint($constraint->getConstraint(), $source, $sql, $parameters);
         $sql['where'][] = ')';
     } elseif ($constraint instanceof Tx_Extbase_Persistence_QOM_ComparisonInterface) {
         $this->parseComparison($constraint, $source, $sql, $parameters);
     }
 }