public function having($havingOperator = 'AND')
{
if (!isset($this->having)) {
$this->having = QueryFactory::createWhere($this);
}
if (!in_array($havingOperator, array(Where::CONJUNCTION_AND, Where::CONJUNCTION_OR))) {
throw new QueryException("Invalid conjunction specified, must be one of AND or OR, but '" . $havingOperator . "' was found.");
}
$this->havingOperator = $havingOperator;
return $this->having;
}