public static function getStatusForName($name)
 {
     if ($name == BillingStatus::PAID) {
         return BillingStatus::paidStatus();
     } else {
         if ($name == BillingStatus::UNPAID) {
             return BillingStatus::unpaidStatus();
         } else {
             return BillingStatus::unknownStatus();
         }
     }
 }
 private static function populateInsertionOrder($row)
 {
     $adRep;
     if (isset($row['AdRepId'])) {
         $adRep = AdRepDao::getAdRepByID($row['AdRepId']);
     } else {
         $adRep = AdRep::unassignedAdRep();
     }
     $client = ClientDao::getClientByID($row['ClientID']);
     $status = InsertStatusDao::getByID($row['StatusID']);
     if (isset($row['DesignStatusID'])) {
         $designStatus = DesignStatusDao::getByID($row['DesignStatusID']);
     } else {
         $designStatus = DesignStatus::emptyDesignStatus();
     }
     $billingStatus = BillingStatus::getStatusForName($row['BillingStatus']);
     return new InsertionOrder($row['InsertID'], $adRep, $client, $status, $designStatus, $billingStatus, $row['CreatedDate'], $row['UpdatedDate'], $row['InsertDate'], $row['Columns'], $row['Height'], $row['NumPlacements'], $row['Design'], $row['Color'], $row['NumInserts'], $row['Image']);
 }