/**
  * @param PDO $dbConn
  * @param int $episodeId
  * @param Episode $episodeObject
  */
 public static function getEpisodeAttributesFromDatabase($dbConn, $episodeId, $episodeObject)
 {
     $databaseResults = readFromDatabase::readFilteredColumnFromTable($dbConn, array(self::PROGRAM_COLUMN_NAME, self::PLAYLIST_COLUMN_NAME, self::PROGRAMMER_COLUMN_NAME, self::START_TIME_COLUMN_NAME, self::END_TIME_COLUMN_NAME), self::TABLE_NAME, array(self::ID_COLUMN_NAME), array($episodeId));
     $programId = $databaseResults[0][self::PROGRAM_COLUMN_NAME];
     $playlistId = $databaseResults[0][self::PLAYLIST_COLUMN_NAME];
     $programmerId = $databaseResults[0][self::PROGRAMMER_COLUMN_NAME];
     $episodeObject->setProgram(new Program($dbConn, $programId));
     $episodeObject->setPlaylist(new Playlist($dbConn, $playlistId));
     $episodeObject->setProgrammer(new Programmer($dbConn, $programmerId));
     $startTimeString = $databaseResults[0][self::START_TIME_COLUMN_NAME];
     $startDateTime = formatDateStringFromDatabase($startTimeString);
     $endTimeString = $databaseResults[0][self::END_TIME_COLUMN_NAME];
     $endDateTime = formatDateStringFromDatabase($endTimeString);
     $episodeObject->setStartTime($startDateTime);
     $episodeObject->setEndTime($endDateTime);
 }
 /**
  * @param PDO $dbConn
  *
  * @param int $segmentId
  *
  * @param Segment $segmentObject
  *
  */
 public static function getSegmentAttributesFromDatabase($dbConn, $segmentId, $segmentObject)
 {
     $databaseResult = readFromDatabase::readFilteredColumnFromTable($dbConn, null, self::TABLE_NAME, array(self::ID_COLUMN_NAME), array($segmentId));
     $segmentName = $databaseResult[0][self::SEGMENT_NAME_COLUMN_NAME];
     $segmentObject->setName($segmentName);
     $segmentAlbum = $databaseResult[0][self::ALBUM_COLUMN_NAME];
     $segmentObject->setAlbum($segmentAlbum);
     $segmentAuthor = $databaseResult[0][self::AUTHOR_COLUMN_NAME];
     $segmentObject->setAuthor($segmentAuthor);
     $segmentCategory = $databaseResult[0][self::CATEGORY_COLUMN_NAME];
     $segmentObject->setCategory($segmentCategory);
     $segmentDuration = $databaseResult[0][self::DURATION_COLUMN_NAME];
     $segmentObject->setDuration($segmentDuration);
     $segmentCanCon = $databaseResult[0][self::CAN_CON_COLUMN_NAME];
     $segmentObject->setIsCanCon($segmentCanCon);
     $segmentNewRelease = $databaseResult[0][self::NEW_RELEASE_COLUMN_NAME];
     $segmentObject->setIsNewRelease($segmentNewRelease);
     $segmentFrenchVocalMusic = $databaseResult[0][self::FRENCH_VOCAL_MUSIC_COLUMN_NAME];
     $segmentObject->setIsFrenchVocalMusic($segmentFrenchVocalMusic);
     $dbStartTimeString = $databaseResult[0][self::START_TIME_COLUMN_NAME];
     $startDateTime = formatDateStringFromDatabase($dbStartTimeString);
     $segmentObject->setStartTime($startDateTime);
 }