/**
  * Get all builds for a specific project
  * 
  * @param integer $project_id The project ID
  * 
  * @return array
  */
 public static function getByProjectID($project_id)
 {
     if (self::$_project_builds === null) {
         self::$_project_builds = array();
     }
     if (!array_key_exists($project_id, self::$_project_builds)) {
         self::$_project_builds[$project_id] = array();
         if ($res = B2DB::getTable('TBGBuildsTable')->getByProjectID($project_id)) {
             while ($row = $res->getNextRow()) {
                 $build = TBGContext::factory()->TBGBuild($row->get(TBGBuildsTable::ID), $row);
                 self::$_project_builds[$project_id][$build->getID()] = $build;
             }
         }
     }
     return self::$_project_builds[$project_id];
 }