public function addConstraints($constraints) {
        if (is_array($constraints)) {
            $this->constraints = array_merge($this->constraints, $constraints);
        } else {
            $this->constraints[] = (string)$constraints;
        }
    }