BaseCcFilesPeer.php 83 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006
  1. <?php
  2. /**
  3. * Base static class for performing query and update operations on the 'cc_files' table.
  4. *
  5. *
  6. *
  7. * @package propel.generator.airtime.om
  8. */
  9. abstract class BaseCcFilesPeer {
  10. /** the default database name for this class */
  11. const DATABASE_NAME = 'airtime';
  12. /** the table name for this class */
  13. const TABLE_NAME = 'cc_files';
  14. /** the related Propel class for this table */
  15. const OM_CLASS = 'CcFiles';
  16. /** A class that can be returned by this peer. */
  17. const CLASS_DEFAULT = 'airtime.CcFiles';
  18. /** the related TableMap class for this table */
  19. const TM_CLASS = 'CcFilesTableMap';
  20. /** The total number of columns. */
  21. const NUM_COLUMNS = 70;
  22. /** The number of lazy-loaded columns. */
  23. const NUM_LAZY_LOAD_COLUMNS = 0;
  24. /** the column name for the ID field */
  25. const ID = 'cc_files.ID';
  26. /** the column name for the NAME field */
  27. const NAME = 'cc_files.NAME';
  28. /** the column name for the MIME field */
  29. const MIME = 'cc_files.MIME';
  30. /** the column name for the FTYPE field */
  31. const FTYPE = 'cc_files.FTYPE';
  32. /** the column name for the DIRECTORY field */
  33. const DIRECTORY = 'cc_files.DIRECTORY';
  34. /** the column name for the FILEPATH field */
  35. const FILEPATH = 'cc_files.FILEPATH';
  36. /** the column name for the STATE field */
  37. const STATE = 'cc_files.STATE';
  38. /** the column name for the CURRENTLYACCESSING field */
  39. const CURRENTLYACCESSING = 'cc_files.CURRENTLYACCESSING';
  40. /** the column name for the EDITEDBY field */
  41. const EDITEDBY = 'cc_files.EDITEDBY';
  42. /** the column name for the MTIME field */
  43. const MTIME = 'cc_files.MTIME';
  44. /** the column name for the UTIME field */
  45. const UTIME = 'cc_files.UTIME';
  46. /** the column name for the LPTIME field */
  47. const LPTIME = 'cc_files.LPTIME';
  48. /** the column name for the MD5 field */
  49. const MD5 = 'cc_files.MD5';
  50. /** the column name for the TRACK_TITLE field */
  51. const TRACK_TITLE = 'cc_files.TRACK_TITLE';
  52. /** the column name for the ARTIST_NAME field */
  53. const ARTIST_NAME = 'cc_files.ARTIST_NAME';
  54. /** the column name for the BIT_RATE field */
  55. const BIT_RATE = 'cc_files.BIT_RATE';
  56. /** the column name for the SAMPLE_RATE field */
  57. const SAMPLE_RATE = 'cc_files.SAMPLE_RATE';
  58. /** the column name for the FORMAT field */
  59. const FORMAT = 'cc_files.FORMAT';
  60. /** the column name for the LENGTH field */
  61. const LENGTH = 'cc_files.LENGTH';
  62. /** the column name for the ALBUM_TITLE field */
  63. const ALBUM_TITLE = 'cc_files.ALBUM_TITLE';
  64. /** the column name for the GENRE field */
  65. const GENRE = 'cc_files.GENRE';
  66. /** the column name for the COMMENTS field */
  67. const COMMENTS = 'cc_files.COMMENTS';
  68. /** the column name for the YEAR field */
  69. const YEAR = 'cc_files.YEAR';
  70. /** the column name for the TRACK_NUMBER field */
  71. const TRACK_NUMBER = 'cc_files.TRACK_NUMBER';
  72. /** the column name for the CHANNELS field */
  73. const CHANNELS = 'cc_files.CHANNELS';
  74. /** the column name for the URL field */
  75. const URL = 'cc_files.URL';
  76. /** the column name for the BPM field */
  77. const BPM = 'cc_files.BPM';
  78. /** the column name for the RATING field */
  79. const RATING = 'cc_files.RATING';
  80. /** the column name for the ENCODED_BY field */
  81. const ENCODED_BY = 'cc_files.ENCODED_BY';
  82. /** the column name for the DISC_NUMBER field */
  83. const DISC_NUMBER = 'cc_files.DISC_NUMBER';
  84. /** the column name for the MOOD field */
  85. const MOOD = 'cc_files.MOOD';
  86. /** the column name for the LABEL field */
  87. const LABEL = 'cc_files.LABEL';
  88. /** the column name for the COMPOSER field */
  89. const COMPOSER = 'cc_files.COMPOSER';
  90. /** the column name for the ENCODER field */
  91. const ENCODER = 'cc_files.ENCODER';
  92. /** the column name for the CHECKSUM field */
  93. const CHECKSUM = 'cc_files.CHECKSUM';
  94. /** the column name for the LYRICS field */
  95. const LYRICS = 'cc_files.LYRICS';
  96. /** the column name for the ORCHESTRA field */
  97. const ORCHESTRA = 'cc_files.ORCHESTRA';
  98. /** the column name for the CONDUCTOR field */
  99. const CONDUCTOR = 'cc_files.CONDUCTOR';
  100. /** the column name for the LYRICIST field */
  101. const LYRICIST = 'cc_files.LYRICIST';
  102. /** the column name for the ORIGINAL_LYRICIST field */
  103. const ORIGINAL_LYRICIST = 'cc_files.ORIGINAL_LYRICIST';
  104. /** the column name for the RADIO_STATION_NAME field */
  105. const RADIO_STATION_NAME = 'cc_files.RADIO_STATION_NAME';
  106. /** the column name for the INFO_URL field */
  107. const INFO_URL = 'cc_files.INFO_URL';
  108. /** the column name for the ARTIST_URL field */
  109. const ARTIST_URL = 'cc_files.ARTIST_URL';
  110. /** the column name for the AUDIO_SOURCE_URL field */
  111. const AUDIO_SOURCE_URL = 'cc_files.AUDIO_SOURCE_URL';
  112. /** the column name for the RADIO_STATION_URL field */
  113. const RADIO_STATION_URL = 'cc_files.RADIO_STATION_URL';
  114. /** the column name for the BUY_THIS_URL field */
  115. const BUY_THIS_URL = 'cc_files.BUY_THIS_URL';
  116. /** the column name for the ISRC_NUMBER field */
  117. const ISRC_NUMBER = 'cc_files.ISRC_NUMBER';
  118. /** the column name for the CATALOG_NUMBER field */
  119. const CATALOG_NUMBER = 'cc_files.CATALOG_NUMBER';
  120. /** the column name for the ORIGINAL_ARTIST field */
  121. const ORIGINAL_ARTIST = 'cc_files.ORIGINAL_ARTIST';
  122. /** the column name for the COPYRIGHT field */
  123. const COPYRIGHT = 'cc_files.COPYRIGHT';
  124. /** the column name for the REPORT_DATETIME field */
  125. const REPORT_DATETIME = 'cc_files.REPORT_DATETIME';
  126. /** the column name for the REPORT_LOCATION field */
  127. const REPORT_LOCATION = 'cc_files.REPORT_LOCATION';
  128. /** the column name for the REPORT_ORGANIZATION field */
  129. const REPORT_ORGANIZATION = 'cc_files.REPORT_ORGANIZATION';
  130. /** the column name for the SUBJECT field */
  131. const SUBJECT = 'cc_files.SUBJECT';
  132. /** the column name for the CONTRIBUTOR field */
  133. const CONTRIBUTOR = 'cc_files.CONTRIBUTOR';
  134. /** the column name for the LANGUAGE field */
  135. const LANGUAGE = 'cc_files.LANGUAGE';
  136. /** the column name for the FILE_EXISTS field */
  137. const FILE_EXISTS = 'cc_files.FILE_EXISTS';
  138. /** the column name for the SOUNDCLOUD_ID field */
  139. const SOUNDCLOUD_ID = 'cc_files.SOUNDCLOUD_ID';
  140. /** the column name for the SOUNDCLOUD_ERROR_CODE field */
  141. const SOUNDCLOUD_ERROR_CODE = 'cc_files.SOUNDCLOUD_ERROR_CODE';
  142. /** the column name for the SOUNDCLOUD_ERROR_MSG field */
  143. const SOUNDCLOUD_ERROR_MSG = 'cc_files.SOUNDCLOUD_ERROR_MSG';
  144. /** the column name for the SOUNDCLOUD_LINK_TO_FILE field */
  145. const SOUNDCLOUD_LINK_TO_FILE = 'cc_files.SOUNDCLOUD_LINK_TO_FILE';
  146. /** the column name for the SOUNDCLOUD_UPLOAD_TIME field */
  147. const SOUNDCLOUD_UPLOAD_TIME = 'cc_files.SOUNDCLOUD_UPLOAD_TIME';
  148. /** the column name for the REPLAY_GAIN field */
  149. const REPLAY_GAIN = 'cc_files.REPLAY_GAIN';
  150. /** the column name for the OWNER_ID field */
  151. const OWNER_ID = 'cc_files.OWNER_ID';
  152. /** the column name for the CUEIN field */
  153. const CUEIN = 'cc_files.CUEIN';
  154. /** the column name for the CUEOUT field */
  155. const CUEOUT = 'cc_files.CUEOUT';
  156. /** the column name for the SILAN_CHECK field */
  157. const SILAN_CHECK = 'cc_files.SILAN_CHECK';
  158. /** the column name for the HIDDEN field */
  159. const HIDDEN = 'cc_files.HIDDEN';
  160. /** the column name for the IS_SCHEDULED field */
  161. const IS_SCHEDULED = 'cc_files.IS_SCHEDULED';
  162. /** the column name for the IS_PLAYLIST field */
  163. const IS_PLAYLIST = 'cc_files.IS_PLAYLIST';
  164. /**
  165. * An identiy map to hold any loaded instances of CcFiles objects.
  166. * This must be public so that other peer classes can access this when hydrating from JOIN
  167. * queries.
  168. * @var array CcFiles[]
  169. */
  170. public static $instances = array();
  171. /**
  172. * holds an array of fieldnames
  173. *
  174. * first dimension keys are the type constants
  175. * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
  176. */
  177. private static $fieldNames = array (
  178. BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMime', 'DbFtype', 'DbDirectory', 'DbFilepath', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbMd5', 'DbTrackTitle', 'DbArtistName', 'DbBitRate', 'DbSampleRate', 'DbFormat', 'DbLength', 'DbAlbumTitle', 'DbGenre', 'DbComments', 'DbYear', 'DbTrackNumber', 'DbChannels', 'DbUrl', 'DbBpm', 'DbRating', 'DbEncodedBy', 'DbDiscNumber', 'DbMood', 'DbLabel', 'DbComposer', 'DbEncoder', 'DbChecksum', 'DbLyrics', 'DbOrchestra', 'DbConductor', 'DbLyricist', 'DbOriginalLyricist', 'DbRadioStationName', 'DbInfoUrl', 'DbArtistUrl', 'DbAudioSourceUrl', 'DbRadioStationUrl', 'DbBuyThisUrl', 'DbIsrcNumber', 'DbCatalogNumber', 'DbOriginalArtist', 'DbCopyright', 'DbReportDatetime', 'DbReportLocation', 'DbReportOrganization', 'DbSubject', 'DbContributor', 'DbLanguage', 'DbFileExists', 'DbSoundcloudId', 'DbSoundcloudErrorCode', 'DbSoundcloudErrorMsg', 'DbSoundcloudLinkToFile', 'DbSoundCloundUploadTime', 'DbReplayGain', 'DbOwnerId', 'DbCuein', 'DbCueout', 'DbSilanCheck', 'DbHidden', 'DbIsScheduled', 'DbIsPlaylist', ),
  179. BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMime', 'dbFtype', 'dbDirectory', 'dbFilepath', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbMd5', 'dbTrackTitle', 'dbArtistName', 'dbBitRate', 'dbSampleRate', 'dbFormat', 'dbLength', 'dbAlbumTitle', 'dbGenre', 'dbComments', 'dbYear', 'dbTrackNumber', 'dbChannels', 'dbUrl', 'dbBpm', 'dbRating', 'dbEncodedBy', 'dbDiscNumber', 'dbMood', 'dbLabel', 'dbComposer', 'dbEncoder', 'dbChecksum', 'dbLyrics', 'dbOrchestra', 'dbConductor', 'dbLyricist', 'dbOriginalLyricist', 'dbRadioStationName', 'dbInfoUrl', 'dbArtistUrl', 'dbAudioSourceUrl', 'dbRadioStationUrl', 'dbBuyThisUrl', 'dbIsrcNumber', 'dbCatalogNumber', 'dbOriginalArtist', 'dbCopyright', 'dbReportDatetime', 'dbReportLocation', 'dbReportOrganization', 'dbSubject', 'dbContributor', 'dbLanguage', 'dbFileExists', 'dbSoundcloudId', 'dbSoundcloudErrorCode', 'dbSoundcloudErrorMsg', 'dbSoundcloudLinkToFile', 'dbSoundCloundUploadTime', 'dbReplayGain', 'dbOwnerId', 'dbCuein', 'dbCueout', 'dbSilanCheck', 'dbHidden', 'dbIsScheduled', 'dbIsPlaylist', ),
  180. BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::MIME, self::FTYPE, self::DIRECTORY, self::FILEPATH, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::MD5, self::TRACK_TITLE, self::ARTIST_NAME, self::BIT_RATE, self::SAMPLE_RATE, self::FORMAT, self::LENGTH, self::ALBUM_TITLE, self::GENRE, self::COMMENTS, self::YEAR, self::TRACK_NUMBER, self::CHANNELS, self::URL, self::BPM, self::RATING, self::ENCODED_BY, self::DISC_NUMBER, self::MOOD, self::LABEL, self::COMPOSER, self::ENCODER, self::CHECKSUM, self::LYRICS, self::ORCHESTRA, self::CONDUCTOR, self::LYRICIST, self::ORIGINAL_LYRICIST, self::RADIO_STATION_NAME, self::INFO_URL, self::ARTIST_URL, self::AUDIO_SOURCE_URL, self::RADIO_STATION_URL, self::BUY_THIS_URL, self::ISRC_NUMBER, self::CATALOG_NUMBER, self::ORIGINAL_ARTIST, self::COPYRIGHT, self::REPORT_DATETIME, self::REPORT_LOCATION, self::REPORT_ORGANIZATION, self::SUBJECT, self::CONTRIBUTOR, self::LANGUAGE, self::FILE_EXISTS, self::SOUNDCLOUD_ID, self::SOUNDCLOUD_ERROR_CODE, self::SOUNDCLOUD_ERROR_MSG, self::SOUNDCLOUD_LINK_TO_FILE, self::SOUNDCLOUD_UPLOAD_TIME, self::REPLAY_GAIN, self::OWNER_ID, self::CUEIN, self::CUEOUT, self::SILAN_CHECK, self::HIDDEN, self::IS_SCHEDULED, self::IS_PLAYLIST, ),
  181. BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MIME', 'FTYPE', 'DIRECTORY', 'FILEPATH', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'MD5', 'TRACK_TITLE', 'ARTIST_NAME', 'BIT_RATE', 'SAMPLE_RATE', 'FORMAT', 'LENGTH', 'ALBUM_TITLE', 'GENRE', 'COMMENTS', 'YEAR', 'TRACK_NUMBER', 'CHANNELS', 'URL', 'BPM', 'RATING', 'ENCODED_BY', 'DISC_NUMBER', 'MOOD', 'LABEL', 'COMPOSER', 'ENCODER', 'CHECKSUM', 'LYRICS', 'ORCHESTRA', 'CONDUCTOR', 'LYRICIST', 'ORIGINAL_LYRICIST', 'RADIO_STATION_NAME', 'INFO_URL', 'ARTIST_URL', 'AUDIO_SOURCE_URL', 'RADIO_STATION_URL', 'BUY_THIS_URL', 'ISRC_NUMBER', 'CATALOG_NUMBER', 'ORIGINAL_ARTIST', 'COPYRIGHT', 'REPORT_DATETIME', 'REPORT_LOCATION', 'REPORT_ORGANIZATION', 'SUBJECT', 'CONTRIBUTOR', 'LANGUAGE', 'FILE_EXISTS', 'SOUNDCLOUD_ID', 'SOUNDCLOUD_ERROR_CODE', 'SOUNDCLOUD_ERROR_MSG', 'SOUNDCLOUD_LINK_TO_FILE', 'SOUNDCLOUD_UPLOAD_TIME', 'REPLAY_GAIN', 'OWNER_ID', 'CUEIN', 'CUEOUT', 'SILAN_CHECK', 'HIDDEN', 'IS_SCHEDULED', 'IS_PLAYLIST', ),
  182. BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mime', 'ftype', 'directory', 'filepath', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'md5', 'track_title', 'artist_name', 'bit_rate', 'sample_rate', 'format', 'length', 'album_title', 'genre', 'comments', 'year', 'track_number', 'channels', 'url', 'bpm', 'rating', 'encoded_by', 'disc_number', 'mood', 'label', 'composer', 'encoder', 'checksum', 'lyrics', 'orchestra', 'conductor', 'lyricist', 'original_lyricist', 'radio_station_name', 'info_url', 'artist_url', 'audio_source_url', 'radio_station_url', 'buy_this_url', 'isrc_number', 'catalog_number', 'original_artist', 'copyright', 'report_datetime', 'report_location', 'report_organization', 'subject', 'contributor', 'language', 'file_exists', 'soundcloud_id', 'soundcloud_error_code', 'soundcloud_error_msg', 'soundcloud_link_to_file', 'soundcloud_upload_time', 'replay_gain', 'owner_id', 'cuein', 'cueout', 'silan_check', 'hidden', 'is_scheduled', 'is_playlist', ),
  183. BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, )
  184. );
  185. /**
  186. * holds an array of keys for quick access to the fieldnames array
  187. *
  188. * first dimension keys are the type constants
  189. * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
  190. */
  191. private static $fieldKeys = array (
  192. BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMime' => 2, 'DbFtype' => 3, 'DbDirectory' => 4, 'DbFilepath' => 5, 'DbState' => 6, 'DbCurrentlyaccessing' => 7, 'DbEditedby' => 8, 'DbMtime' => 9, 'DbUtime' => 10, 'DbLPtime' => 11, 'DbMd5' => 12, 'DbTrackTitle' => 13, 'DbArtistName' => 14, 'DbBitRate' => 15, 'DbSampleRate' => 16, 'DbFormat' => 17, 'DbLength' => 18, 'DbAlbumTitle' => 19, 'DbGenre' => 20, 'DbComments' => 21, 'DbYear' => 22, 'DbTrackNumber' => 23, 'DbChannels' => 24, 'DbUrl' => 25, 'DbBpm' => 26, 'DbRating' => 27, 'DbEncodedBy' => 28, 'DbDiscNumber' => 29, 'DbMood' => 30, 'DbLabel' => 31, 'DbComposer' => 32, 'DbEncoder' => 33, 'DbChecksum' => 34, 'DbLyrics' => 35, 'DbOrchestra' => 36, 'DbConductor' => 37, 'DbLyricist' => 38, 'DbOriginalLyricist' => 39, 'DbRadioStationName' => 40, 'DbInfoUrl' => 41, 'DbArtistUrl' => 42, 'DbAudioSourceUrl' => 43, 'DbRadioStationUrl' => 44, 'DbBuyThisUrl' => 45, 'DbIsrcNumber' => 46, 'DbCatalogNumber' => 47, 'DbOriginalArtist' => 48, 'DbCopyright' => 49, 'DbReportDatetime' => 50, 'DbReportLocation' => 51, 'DbReportOrganization' => 52, 'DbSubject' => 53, 'DbContributor' => 54, 'DbLanguage' => 55, 'DbFileExists' => 56, 'DbSoundcloudId' => 57, 'DbSoundcloudErrorCode' => 58, 'DbSoundcloudErrorMsg' => 59, 'DbSoundcloudLinkToFile' => 60, 'DbSoundCloundUploadTime' => 61, 'DbReplayGain' => 62, 'DbOwnerId' => 63, 'DbCuein' => 64, 'DbCueout' => 65, 'DbSilanCheck' => 66, 'DbHidden' => 67, 'DbIsScheduled' => 68, 'DbIsPlaylist' => 69, ),
  193. BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMime' => 2, 'dbFtype' => 3, 'dbDirectory' => 4, 'dbFilepath' => 5, 'dbState' => 6, 'dbCurrentlyaccessing' => 7, 'dbEditedby' => 8, 'dbMtime' => 9, 'dbUtime' => 10, 'dbLPtime' => 11, 'dbMd5' => 12, 'dbTrackTitle' => 13, 'dbArtistName' => 14, 'dbBitRate' => 15, 'dbSampleRate' => 16, 'dbFormat' => 17, 'dbLength' => 18, 'dbAlbumTitle' => 19, 'dbGenre' => 20, 'dbComments' => 21, 'dbYear' => 22, 'dbTrackNumber' => 23, 'dbChannels' => 24, 'dbUrl' => 25, 'dbBpm' => 26, 'dbRating' => 27, 'dbEncodedBy' => 28, 'dbDiscNumber' => 29, 'dbMood' => 30, 'dbLabel' => 31, 'dbComposer' => 32, 'dbEncoder' => 33, 'dbChecksum' => 34, 'dbLyrics' => 35, 'dbOrchestra' => 36, 'dbConductor' => 37, 'dbLyricist' => 38, 'dbOriginalLyricist' => 39, 'dbRadioStationName' => 40, 'dbInfoUrl' => 41, 'dbArtistUrl' => 42, 'dbAudioSourceUrl' => 43, 'dbRadioStationUrl' => 44, 'dbBuyThisUrl' => 45, 'dbIsrcNumber' => 46, 'dbCatalogNumber' => 47, 'dbOriginalArtist' => 48, 'dbCopyright' => 49, 'dbReportDatetime' => 50, 'dbReportLocation' => 51, 'dbReportOrganization' => 52, 'dbSubject' => 53, 'dbContributor' => 54, 'dbLanguage' => 55, 'dbFileExists' => 56, 'dbSoundcloudId' => 57, 'dbSoundcloudErrorCode' => 58, 'dbSoundcloudErrorMsg' => 59, 'dbSoundcloudLinkToFile' => 60, 'dbSoundCloundUploadTime' => 61, 'dbReplayGain' => 62, 'dbOwnerId' => 63, 'dbCuein' => 64, 'dbCueout' => 65, 'dbSilanCheck' => 66, 'dbHidden' => 67, 'dbIsScheduled' => 68, 'dbIsPlaylist' => 69, ),
  194. BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::MIME => 2, self::FTYPE => 3, self::DIRECTORY => 4, self::FILEPATH => 5, self::STATE => 6, self::CURRENTLYACCESSING => 7, self::EDITEDBY => 8, self::MTIME => 9, self::UTIME => 10, self::LPTIME => 11, self::MD5 => 12, self::TRACK_TITLE => 13, self::ARTIST_NAME => 14, self::BIT_RATE => 15, self::SAMPLE_RATE => 16, self::FORMAT => 17, self::LENGTH => 18, self::ALBUM_TITLE => 19, self::GENRE => 20, self::COMMENTS => 21, self::YEAR => 22, self::TRACK_NUMBER => 23, self::CHANNELS => 24, self::URL => 25, self::BPM => 26, self::RATING => 27, self::ENCODED_BY => 28, self::DISC_NUMBER => 29, self::MOOD => 30, self::LABEL => 31, self::COMPOSER => 32, self::ENCODER => 33, self::CHECKSUM => 34, self::LYRICS => 35, self::ORCHESTRA => 36, self::CONDUCTOR => 37, self::LYRICIST => 38, self::ORIGINAL_LYRICIST => 39, self::RADIO_STATION_NAME => 40, self::INFO_URL => 41, self::ARTIST_URL => 42, self::AUDIO_SOURCE_URL => 43, self::RADIO_STATION_URL => 44, self::BUY_THIS_URL => 45, self::ISRC_NUMBER => 46, self::CATALOG_NUMBER => 47, self::ORIGINAL_ARTIST => 48, self::COPYRIGHT => 49, self::REPORT_DATETIME => 50, self::REPORT_LOCATION => 51, self::REPORT_ORGANIZATION => 52, self::SUBJECT => 53, self::CONTRIBUTOR => 54, self::LANGUAGE => 55, self::FILE_EXISTS => 56, self::SOUNDCLOUD_ID => 57, self::SOUNDCLOUD_ERROR_CODE => 58, self::SOUNDCLOUD_ERROR_MSG => 59, self::SOUNDCLOUD_LINK_TO_FILE => 60, self::SOUNDCLOUD_UPLOAD_TIME => 61, self::REPLAY_GAIN => 62, self::OWNER_ID => 63, self::CUEIN => 64, self::CUEOUT => 65, self::SILAN_CHECK => 66, self::HIDDEN => 67, self::IS_SCHEDULED => 68, self::IS_PLAYLIST => 69, ),
  195. BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MIME' => 2, 'FTYPE' => 3, 'DIRECTORY' => 4, 'FILEPATH' => 5, 'STATE' => 6, 'CURRENTLYACCESSING' => 7, 'EDITEDBY' => 8, 'MTIME' => 9, 'UTIME' => 10, 'LPTIME' => 11, 'MD5' => 12, 'TRACK_TITLE' => 13, 'ARTIST_NAME' => 14, 'BIT_RATE' => 15, 'SAMPLE_RATE' => 16, 'FORMAT' => 17, 'LENGTH' => 18, 'ALBUM_TITLE' => 19, 'GENRE' => 20, 'COMMENTS' => 21, 'YEAR' => 22, 'TRACK_NUMBER' => 23, 'CHANNELS' => 24, 'URL' => 25, 'BPM' => 26, 'RATING' => 27, 'ENCODED_BY' => 28, 'DISC_NUMBER' => 29, 'MOOD' => 30, 'LABEL' => 31, 'COMPOSER' => 32, 'ENCODER' => 33, 'CHECKSUM' => 34, 'LYRICS' => 35, 'ORCHESTRA' => 36, 'CONDUCTOR' => 37, 'LYRICIST' => 38, 'ORIGINAL_LYRICIST' => 39, 'RADIO_STATION_NAME' => 40, 'INFO_URL' => 41, 'ARTIST_URL' => 42, 'AUDIO_SOURCE_URL' => 43, 'RADIO_STATION_URL' => 44, 'BUY_THIS_URL' => 45, 'ISRC_NUMBER' => 46, 'CATALOG_NUMBER' => 47, 'ORIGINAL_ARTIST' => 48, 'COPYRIGHT' => 49, 'REPORT_DATETIME' => 50, 'REPORT_LOCATION' => 51, 'REPORT_ORGANIZATION' => 52, 'SUBJECT' => 53, 'CONTRIBUTOR' => 54, 'LANGUAGE' => 55, 'FILE_EXISTS' => 56, 'SOUNDCLOUD_ID' => 57, 'SOUNDCLOUD_ERROR_CODE' => 58, 'SOUNDCLOUD_ERROR_MSG' => 59, 'SOUNDCLOUD_LINK_TO_FILE' => 60, 'SOUNDCLOUD_UPLOAD_TIME' => 61, 'REPLAY_GAIN' => 62, 'OWNER_ID' => 63, 'CUEIN' => 64, 'CUEOUT' => 65, 'SILAN_CHECK' => 66, 'HIDDEN' => 67, 'IS_SCHEDULED' => 68, 'IS_PLAYLIST' => 69, ),
  196. BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mime' => 2, 'ftype' => 3, 'directory' => 4, 'filepath' => 5, 'state' => 6, 'currentlyaccessing' => 7, 'editedby' => 8, 'mtime' => 9, 'utime' => 10, 'lptime' => 11, 'md5' => 12, 'track_title' => 13, 'artist_name' => 14, 'bit_rate' => 15, 'sample_rate' => 16, 'format' => 17, 'length' => 18, 'album_title' => 19, 'genre' => 20, 'comments' => 21, 'year' => 22, 'track_number' => 23, 'channels' => 24, 'url' => 25, 'bpm' => 26, 'rating' => 27, 'encoded_by' => 28, 'disc_number' => 29, 'mood' => 30, 'label' => 31, 'composer' => 32, 'encoder' => 33, 'checksum' => 34, 'lyrics' => 35, 'orchestra' => 36, 'conductor' => 37, 'lyricist' => 38, 'original_lyricist' => 39, 'radio_station_name' => 40, 'info_url' => 41, 'artist_url' => 42, 'audio_source_url' => 43, 'radio_station_url' => 44, 'buy_this_url' => 45, 'isrc_number' => 46, 'catalog_number' => 47, 'original_artist' => 48, 'copyright' => 49, 'report_datetime' => 50, 'report_location' => 51, 'report_organization' => 52, 'subject' => 53, 'contributor' => 54, 'language' => 55, 'file_exists' => 56, 'soundcloud_id' => 57, 'soundcloud_error_code' => 58, 'soundcloud_error_msg' => 59, 'soundcloud_link_to_file' => 60, 'soundcloud_upload_time' => 61, 'replay_gain' => 62, 'owner_id' => 63, 'cuein' => 64, 'cueout' => 65, 'silan_check' => 66, 'hidden' => 67, 'is_scheduled' => 68, 'is_playlist' => 69, ),
  197. BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, )
  198. );
  199. /**
  200. * Translates a fieldname to another type
  201. *
  202. * @param string $name field name
  203. * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  204. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  205. * @param string $toType One of the class type constants
  206. * @return string translated name of the field.
  207. * @throws PropelException - if the specified name could not be found in the fieldname mappings.
  208. */
  209. static public function translateFieldName($name, $fromType, $toType)
  210. {
  211. $toNames = self::getFieldNames($toType);
  212. $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
  213. if ($key === null) {
  214. throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
  215. }
  216. return $toNames[$key];
  217. }
  218. /**
  219. * Returns an array of field names.
  220. *
  221. * @param string $type The type of fieldnames to return:
  222. * One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  223. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  224. * @return array A list of field names
  225. */
  226. static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
  227. {
  228. if (!array_key_exists($type, self::$fieldNames)) {
  229. throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.');
  230. }
  231. return self::$fieldNames[$type];
  232. }
  233. /**
  234. * Convenience method which changes table.column to alias.column.
  235. *
  236. * Using this method you can maintain SQL abstraction while using column aliases.
  237. * <code>
  238. * $c->addAlias("alias1", TablePeer::TABLE_NAME);
  239. * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
  240. * </code>
  241. * @param string $alias The alias for the current table.
  242. * @param string $column The column name for current table. (i.e. CcFilesPeer::COLUMN_NAME).
  243. * @return string
  244. */
  245. public static function alias($alias, $column)
  246. {
  247. return str_replace(CcFilesPeer::TABLE_NAME.'.', $alias.'.', $column);
  248. }
  249. /**
  250. * Add all the columns needed to create a new object.
  251. *
  252. * Note: any columns that were marked with lazyLoad="true" in the
  253. * XML schema will not be added to the select list and only loaded
  254. * on demand.
  255. *
  256. * @param Criteria $criteria object containing the columns to add.
  257. * @param string $alias optional table alias
  258. * @throws PropelException Any exceptions caught during processing will be
  259. * rethrown wrapped into a PropelException.
  260. */
  261. public static function addSelectColumns(Criteria $criteria, $alias = null)
  262. {
  263. if (null === $alias) {
  264. $criteria->addSelectColumn(CcFilesPeer::ID);
  265. $criteria->addSelectColumn(CcFilesPeer::NAME);
  266. $criteria->addSelectColumn(CcFilesPeer::MIME);
  267. $criteria->addSelectColumn(CcFilesPeer::FTYPE);
  268. $criteria->addSelectColumn(CcFilesPeer::DIRECTORY);
  269. $criteria->addSelectColumn(CcFilesPeer::FILEPATH);
  270. $criteria->addSelectColumn(CcFilesPeer::STATE);
  271. $criteria->addSelectColumn(CcFilesPeer::CURRENTLYACCESSING);
  272. $criteria->addSelectColumn(CcFilesPeer::EDITEDBY);
  273. $criteria->addSelectColumn(CcFilesPeer::MTIME);
  274. $criteria->addSelectColumn(CcFilesPeer::UTIME);
  275. $criteria->addSelectColumn(CcFilesPeer::LPTIME);
  276. $criteria->addSelectColumn(CcFilesPeer::MD5);
  277. $criteria->addSelectColumn(CcFilesPeer::TRACK_TITLE);
  278. $criteria->addSelectColumn(CcFilesPeer::ARTIST_NAME);
  279. $criteria->addSelectColumn(CcFilesPeer::BIT_RATE);
  280. $criteria->addSelectColumn(CcFilesPeer::SAMPLE_RATE);
  281. $criteria->addSelectColumn(CcFilesPeer::FORMAT);
  282. $criteria->addSelectColumn(CcFilesPeer::LENGTH);
  283. $criteria->addSelectColumn(CcFilesPeer::ALBUM_TITLE);
  284. $criteria->addSelectColumn(CcFilesPeer::GENRE);
  285. $criteria->addSelectColumn(CcFilesPeer::COMMENTS);
  286. $criteria->addSelectColumn(CcFilesPeer::YEAR);
  287. $criteria->addSelectColumn(CcFilesPeer::TRACK_NUMBER);
  288. $criteria->addSelectColumn(CcFilesPeer::CHANNELS);
  289. $criteria->addSelectColumn(CcFilesPeer::URL);
  290. $criteria->addSelectColumn(CcFilesPeer::BPM);
  291. $criteria->addSelectColumn(CcFilesPeer::RATING);
  292. $criteria->addSelectColumn(CcFilesPeer::ENCODED_BY);
  293. $criteria->addSelectColumn(CcFilesPeer::DISC_NUMBER);
  294. $criteria->addSelectColumn(CcFilesPeer::MOOD);
  295. $criteria->addSelectColumn(CcFilesPeer::LABEL);
  296. $criteria->addSelectColumn(CcFilesPeer::COMPOSER);
  297. $criteria->addSelectColumn(CcFilesPeer::ENCODER);
  298. $criteria->addSelectColumn(CcFilesPeer::CHECKSUM);
  299. $criteria->addSelectColumn(CcFilesPeer::LYRICS);
  300. $criteria->addSelectColumn(CcFilesPeer::ORCHESTRA);
  301. $criteria->addSelectColumn(CcFilesPeer::CONDUCTOR);
  302. $criteria->addSelectColumn(CcFilesPeer::LYRICIST);
  303. $criteria->addSelectColumn(CcFilesPeer::ORIGINAL_LYRICIST);
  304. $criteria->addSelectColumn(CcFilesPeer::RADIO_STATION_NAME);
  305. $criteria->addSelectColumn(CcFilesPeer::INFO_URL);
  306. $criteria->addSelectColumn(CcFilesPeer::ARTIST_URL);
  307. $criteria->addSelectColumn(CcFilesPeer::AUDIO_SOURCE_URL);
  308. $criteria->addSelectColumn(CcFilesPeer::RADIO_STATION_URL);
  309. $criteria->addSelectColumn(CcFilesPeer::BUY_THIS_URL);
  310. $criteria->addSelectColumn(CcFilesPeer::ISRC_NUMBER);
  311. $criteria->addSelectColumn(CcFilesPeer::CATALOG_NUMBER);
  312. $criteria->addSelectColumn(CcFilesPeer::ORIGINAL_ARTIST);
  313. $criteria->addSelectColumn(CcFilesPeer::COPYRIGHT);
  314. $criteria->addSelectColumn(CcFilesPeer::REPORT_DATETIME);
  315. $criteria->addSelectColumn(CcFilesPeer::REPORT_LOCATION);
  316. $criteria->addSelectColumn(CcFilesPeer::REPORT_ORGANIZATION);
  317. $criteria->addSelectColumn(CcFilesPeer::SUBJECT);
  318. $criteria->addSelectColumn(CcFilesPeer::CONTRIBUTOR);
  319. $criteria->addSelectColumn(CcFilesPeer::LANGUAGE);
  320. $criteria->addSelectColumn(CcFilesPeer::FILE_EXISTS);
  321. $criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ID);
  322. $criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ERROR_CODE);
  323. $criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_ERROR_MSG);
  324. $criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE);
  325. $criteria->addSelectColumn(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME);
  326. $criteria->addSelectColumn(CcFilesPeer::REPLAY_GAIN);
  327. $criteria->addSelectColumn(CcFilesPeer::OWNER_ID);
  328. $criteria->addSelectColumn(CcFilesPeer::CUEIN);
  329. $criteria->addSelectColumn(CcFilesPeer::CUEOUT);
  330. $criteria->addSelectColumn(CcFilesPeer::SILAN_CHECK);
  331. $criteria->addSelectColumn(CcFilesPeer::HIDDEN);
  332. $criteria->addSelectColumn(CcFilesPeer::IS_SCHEDULED);
  333. $criteria->addSelectColumn(CcFilesPeer::IS_PLAYLIST);
  334. } else {
  335. $criteria->addSelectColumn($alias . '.ID');
  336. $criteria->addSelectColumn($alias . '.NAME');
  337. $criteria->addSelectColumn($alias . '.MIME');
  338. $criteria->addSelectColumn($alias . '.FTYPE');
  339. $criteria->addSelectColumn($alias . '.DIRECTORY');
  340. $criteria->addSelectColumn($alias . '.FILEPATH');
  341. $criteria->addSelectColumn($alias . '.STATE');
  342. $criteria->addSelectColumn($alias . '.CURRENTLYACCESSING');
  343. $criteria->addSelectColumn($alias . '.EDITEDBY');
  344. $criteria->addSelectColumn($alias . '.MTIME');
  345. $criteria->addSelectColumn($alias . '.UTIME');
  346. $criteria->addSelectColumn($alias . '.LPTIME');
  347. $criteria->addSelectColumn($alias . '.MD5');
  348. $criteria->addSelectColumn($alias . '.TRACK_TITLE');
  349. $criteria->addSelectColumn($alias . '.ARTIST_NAME');
  350. $criteria->addSelectColumn($alias . '.BIT_RATE');
  351. $criteria->addSelectColumn($alias . '.SAMPLE_RATE');
  352. $criteria->addSelectColumn($alias . '.FORMAT');
  353. $criteria->addSelectColumn($alias . '.LENGTH');
  354. $criteria->addSelectColumn($alias . '.ALBUM_TITLE');
  355. $criteria->addSelectColumn($alias . '.GENRE');
  356. $criteria->addSelectColumn($alias . '.COMMENTS');
  357. $criteria->addSelectColumn($alias . '.YEAR');
  358. $criteria->addSelectColumn($alias . '.TRACK_NUMBER');
  359. $criteria->addSelectColumn($alias . '.CHANNELS');
  360. $criteria->addSelectColumn($alias . '.URL');
  361. $criteria->addSelectColumn($alias . '.BPM');
  362. $criteria->addSelectColumn($alias . '.RATING');
  363. $criteria->addSelectColumn($alias . '.ENCODED_BY');
  364. $criteria->addSelectColumn($alias . '.DISC_NUMBER');
  365. $criteria->addSelectColumn($alias . '.MOOD');
  366. $criteria->addSelectColumn($alias . '.LABEL');
  367. $criteria->addSelectColumn($alias . '.COMPOSER');
  368. $criteria->addSelectColumn($alias . '.ENCODER');
  369. $criteria->addSelectColumn($alias . '.CHECKSUM');
  370. $criteria->addSelectColumn($alias . '.LYRICS');
  371. $criteria->addSelectColumn($alias . '.ORCHESTRA');
  372. $criteria->addSelectColumn($alias . '.CONDUCTOR');
  373. $criteria->addSelectColumn($alias . '.LYRICIST');
  374. $criteria->addSelectColumn($alias . '.ORIGINAL_LYRICIST');
  375. $criteria->addSelectColumn($alias . '.RADIO_STATION_NAME');
  376. $criteria->addSelectColumn($alias . '.INFO_URL');
  377. $criteria->addSelectColumn($alias . '.ARTIST_URL');
  378. $criteria->addSelectColumn($alias . '.AUDIO_SOURCE_URL');
  379. $criteria->addSelectColumn($alias . '.RADIO_STATION_URL');
  380. $criteria->addSelectColumn($alias . '.BUY_THIS_URL');
  381. $criteria->addSelectColumn($alias . '.ISRC_NUMBER');
  382. $criteria->addSelectColumn($alias . '.CATALOG_NUMBER');
  383. $criteria->addSelectColumn($alias . '.ORIGINAL_ARTIST');
  384. $criteria->addSelectColumn($alias . '.COPYRIGHT');
  385. $criteria->addSelectColumn($alias . '.REPORT_DATETIME');
  386. $criteria->addSelectColumn($alias . '.REPORT_LOCATION');
  387. $criteria->addSelectColumn($alias . '.REPORT_ORGANIZATION');
  388. $criteria->addSelectColumn($alias . '.SUBJECT');
  389. $criteria->addSelectColumn($alias . '.CONTRIBUTOR');
  390. $criteria->addSelectColumn($alias . '.LANGUAGE');
  391. $criteria->addSelectColumn($alias . '.FILE_EXISTS');
  392. $criteria->addSelectColumn($alias . '.SOUNDCLOUD_ID');
  393. $criteria->addSelectColumn($alias . '.SOUNDCLOUD_ERROR_CODE');
  394. $criteria->addSelectColumn($alias . '.SOUNDCLOUD_ERROR_MSG');
  395. $criteria->addSelectColumn($alias . '.SOUNDCLOUD_LINK_TO_FILE');
  396. $criteria->addSelectColumn($alias . '.SOUNDCLOUD_UPLOAD_TIME');
  397. $criteria->addSelectColumn($alias . '.REPLAY_GAIN');
  398. $criteria->addSelectColumn($alias . '.OWNER_ID');
  399. $criteria->addSelectColumn($alias . '.CUEIN');
  400. $criteria->addSelectColumn($alias . '.CUEOUT');
  401. $criteria->addSelectColumn($alias . '.SILAN_CHECK');
  402. $criteria->addSelectColumn($alias . '.HIDDEN');
  403. $criteria->addSelectColumn($alias . '.IS_SCHEDULED');
  404. $criteria->addSelectColumn($alias . '.IS_PLAYLIST');
  405. }
  406. }
  407. /**
  408. * Returns the number of rows matching criteria.
  409. *
  410. * @param Criteria $criteria
  411. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  412. * @param PropelPDO $con
  413. * @return int Number of matching rows.
  414. */
  415. public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null)
  416. {
  417. // we may modify criteria, so copy it first
  418. $criteria = clone $criteria;
  419. // We need to set the primary table name, since in the case that there are no WHERE columns
  420. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  421. // tables go into the FROM clause.
  422. $criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
  423. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  424. $criteria->setDistinct();
  425. }
  426. if (!$criteria->hasSelectClause()) {
  427. CcFilesPeer::addSelectColumns($criteria);
  428. }
  429. $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
  430. $criteria->setDbName(self::DATABASE_NAME); // Set the correct dbName
  431. if ($con === null) {
  432. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  433. }
  434. // BasePeer returns a PDOStatement
  435. $stmt = BasePeer::doCount($criteria, $con);
  436. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  437. $count = (int) $row[0];
  438. } else {
  439. $count = 0; // no rows returned; we infer that means 0 matches.
  440. }
  441. $stmt->closeCursor();
  442. return $count;
  443. }
  444. /**
  445. * Method to select one object from the DB.
  446. *
  447. * @param Criteria $criteria object used to create the SELECT statement.
  448. * @param PropelPDO $con
  449. * @return CcFiles
  450. * @throws PropelException Any exceptions caught during processing will be
  451. * rethrown wrapped into a PropelException.
  452. */
  453. public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
  454. {
  455. $critcopy = clone $criteria;
  456. $critcopy->setLimit(1);
  457. $objects = CcFilesPeer::doSelect($critcopy, $con);
  458. if ($objects) {
  459. return $objects[0];
  460. }
  461. return null;
  462. }
  463. /**
  464. * Method to do selects.
  465. *
  466. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
  467. * @param PropelPDO $con
  468. * @return array Array of selected Objects
  469. * @throws PropelException Any exceptions caught during processing will be
  470. * rethrown wrapped into a PropelException.
  471. */
  472. public static function doSelect(Criteria $criteria, PropelPDO $con = null)
  473. {
  474. return CcFilesPeer::populateObjects(CcFilesPeer::doSelectStmt($criteria, $con));
  475. }
  476. /**
  477. * Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
  478. *
  479. * Use this method directly if you want to work with an executed statement durirectly (for example
  480. * to perform your own object hydration).
  481. *
  482. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
  483. * @param PropelPDO $con The connection to use
  484. * @throws PropelException Any exceptions caught during processing will be
  485. * rethrown wrapped into a PropelException.
  486. * @return PDOStatement The executed PDOStatement object.
  487. * @see BasePeer::doSelect()
  488. */
  489. public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
  490. {
  491. if ($con === null) {
  492. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  493. }
  494. if (!$criteria->hasSelectClause()) {
  495. $criteria = clone $criteria;
  496. CcFilesPeer::addSelectColumns($criteria);
  497. }
  498. // Set the correct dbName
  499. $criteria->setDbName(self::DATABASE_NAME);
  500. // BasePeer returns a PDOStatement
  501. return BasePeer::doSelect($criteria, $con);
  502. }
  503. /**
  504. * Adds an object to the instance pool.
  505. *
  506. * Propel keeps cached copies of objects in an instance pool when they are retrieved
  507. * from the database. In some cases -- especially when you override doSelect*()
  508. * methods in your stub classes -- you may need to explicitly add objects
  509. * to the cache in order to ensure that the same objects are always returned by doSelect*()
  510. * and retrieveByPK*() calls.
  511. *
  512. * @param CcFiles $value A CcFiles object.
  513. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  514. */
  515. public static function addInstanceToPool(CcFiles $obj, $key = null)
  516. {
  517. if (Propel::isInstancePoolingEnabled()) {
  518. if ($key === null) {
  519. $key = (string) $obj->getDbId();
  520. } // if key === null
  521. self::$instances[$key] = $obj;
  522. }
  523. }
  524. /**
  525. * Removes an object from the instance pool.
  526. *
  527. * Propel keeps cached copies of objects in an instance pool when they are retrieved
  528. * from the database. In some cases -- especially when you override doDelete
  529. * methods in your stub classes -- you may need to explicitly remove objects
  530. * from the cache in order to prevent returning objects that no longer exist.
  531. *
  532. * @param mixed $value A CcFiles object or a primary key value.
  533. */
  534. public static function removeInstanceFromPool($value)
  535. {
  536. if (Propel::isInstancePoolingEnabled() && $value !== null) {
  537. if (is_object($value) && $value instanceof CcFiles) {
  538. $key = (string) $value->getDbId();
  539. } elseif (is_scalar($value)) {
  540. // assume we've been passed a primary key
  541. $key = (string) $value;
  542. } else {
  543. $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or CcFiles object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));
  544. throw $e;
  545. }
  546. unset(self::$instances[$key]);
  547. }
  548. } // removeInstanceFromPool()
  549. /**
  550. * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
  551. *
  552. * For tables with a single-column primary key, that simple pkey value will be returned. For tables with
  553. * a multi-column primary key, a serialize()d version of the primary key will be returned.
  554. *
  555. * @param string $key The key (@see getPrimaryKeyHash()) for this instance.
  556. * @return CcFiles Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
  557. * @see getPrimaryKeyHash()
  558. */
  559. public static function getInstanceFromPool($key)
  560. {
  561. if (Propel::isInstancePoolingEnabled()) {
  562. if (isset(self::$instances[$key])) {
  563. return self::$instances[$key];
  564. }
  565. }
  566. return null; // just to be explicit
  567. }
  568. /**
  569. * Clear the instance pool.
  570. *
  571. * @return void
  572. */
  573. public static function clearInstancePool()
  574. {
  575. self::$instances = array();
  576. }
  577. /**
  578. * Method to invalidate the instance pool of all tables related to cc_files
  579. * by a foreign key with ON DELETE CASCADE
  580. */
  581. public static function clearRelatedInstancePool()
  582. {
  583. // Invalidate objects in CcShowInstancesPeer instance pool,
  584. // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
  585. CcShowInstancesPeer::clearInstancePool();
  586. // Invalidate objects in CcPlaylistcontentsPeer instance pool,
  587. // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
  588. CcPlaylistcontentsPeer::clearInstancePool();
  589. // Invalidate objects in CcBlockcontentsPeer instance pool,
  590. // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
  591. CcBlockcontentsPeer::clearInstancePool();
  592. // Invalidate objects in CcSchedulePeer instance pool,
  593. // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
  594. CcSchedulePeer::clearInstancePool();
  595. // Invalidate objects in CcPlayoutHistoryPeer instance pool,
  596. // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
  597. CcPlayoutHistoryPeer::clearInstancePool();
  598. }
  599. /**
  600. * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
  601. *
  602. * For tables with a single-column primary key, that simple pkey value will be returned. For tables with
  603. * a multi-column primary key, a serialize()d version of the primary key will be returned.
  604. *
  605. * @param array $row PropelPDO resultset row.
  606. * @param int $startcol The 0-based offset for reading from the resultset row.
  607. * @return string A string version of PK or NULL if the components of primary key in result array are all null.
  608. */
  609. public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
  610. {
  611. // If the PK cannot be derived from the row, return NULL.
  612. if ($row[$startcol] === null) {
  613. return null;
  614. }
  615. return (string) $row[$startcol];
  616. }
  617. /**
  618. * Retrieves the primary key from the DB resultset row
  619. * For tables with a single-column primary key, that simple pkey value will be returned. For tables with
  620. * a multi-column primary key, an array of the primary key columns will be returned.
  621. *
  622. * @param array $row PropelPDO resultset row.
  623. * @param int $startcol The 0-based offset for reading from the resultset row.
  624. * @return mixed The primary key of the row
  625. */
  626. public static function getPrimaryKeyFromRow($row, $startcol = 0)
  627. {
  628. return (int) $row[$startcol];
  629. }
  630. /**
  631. * The returned array will contain objects of the default type or
  632. * objects that inherit from the default.
  633. *
  634. * @throws PropelException Any exceptions caught during processing will be
  635. * rethrown wrapped into a PropelException.
  636. */
  637. public static function populateObjects(PDOStatement $stmt)
  638. {
  639. $results = array();
  640. // set the class once to avoid overhead in the loop
  641. $cls = CcFilesPeer::getOMClass(false);
  642. // populate the object(s)
  643. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  644. $key = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
  645. if (null !== ($obj = CcFilesPeer::getInstanceFromPool($key))) {
  646. // We no longer rehydrate the object, since this can cause data loss.
  647. // See http://www.propelorm.org/ticket/509
  648. // $obj->hydrate($row, 0, true); // rehydrate
  649. $results[] = $obj;
  650. } else {
  651. $obj = new $cls();
  652. $obj->hydrate($row);
  653. $results[] = $obj;
  654. CcFilesPeer::addInstanceToPool($obj, $key);
  655. } // if key exists
  656. }
  657. $stmt->closeCursor();
  658. return $results;
  659. }
  660. /**
  661. * Populates an object of the default type or an object that inherit from the default.
  662. *
  663. * @param array $row PropelPDO resultset row.
  664. * @param int $startcol The 0-based offset for reading from the resultset row.
  665. * @throws PropelException Any exceptions caught during processing will be
  666. * rethrown wrapped into a PropelException.
  667. * @return array (CcFiles object, last column rank)
  668. */
  669. public static function populateObject($row, $startcol = 0)
  670. {
  671. $key = CcFilesPeer::getPrimaryKeyHashFromRow($row, $startcol);
  672. if (null !== ($obj = CcFilesPeer::getInstanceFromPool($key))) {
  673. // We no longer rehydrate the object, since this can cause data loss.
  674. // See http://www.propelorm.org/ticket/509
  675. // $obj->hydrate($row, $startcol, true); // rehydrate
  676. $col = $startcol + CcFilesPeer::NUM_COLUMNS;
  677. } else {
  678. $cls = CcFilesPeer::OM_CLASS;
  679. $obj = new $cls();
  680. $col = $obj->hydrate($row, $startcol);
  681. CcFilesPeer::addInstanceToPool($obj, $key);
  682. }
  683. return array($obj, $col);
  684. }
  685. /**
  686. * Returns the number of rows matching criteria, joining the related FkOwner table
  687. *
  688. * @param Criteria $criteria
  689. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  690. * @param PropelPDO $con
  691. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  692. * @return int Number of matching rows.
  693. */
  694. public static function doCountJoinFkOwner(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  695. {
  696. // we're going to modify criteria, so copy it first
  697. $criteria = clone $criteria;
  698. // We need to set the primary table name, since in the case that there are no WHERE columns
  699. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  700. // tables go into the FROM clause.
  701. $criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
  702. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  703. $criteria->setDistinct();
  704. }
  705. if (!$criteria->hasSelectClause()) {
  706. CcFilesPeer::addSelectColumns($criteria);
  707. }
  708. $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
  709. // Set the correct dbName
  710. $criteria->setDbName(self::DATABASE_NAME);
  711. if ($con === null) {
  712. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  713. }
  714. $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
  715. $stmt = BasePeer::doCount($criteria, $con);
  716. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  717. $count = (int) $row[0];
  718. } else {
  719. $count = 0; // no rows returned; we infer that means 0 matches.
  720. }
  721. $stmt->closeCursor();
  722. return $count;
  723. }
  724. /**
  725. * Returns the number of rows matching criteria, joining the related CcSubjsRelatedByDbEditedby table
  726. *
  727. * @param Criteria $criteria
  728. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  729. * @param PropelPDO $con
  730. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  731. * @return int Number of matching rows.
  732. */
  733. public static function doCountJoinCcSubjsRelatedByDbEditedby(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  734. {
  735. // we're going to modify criteria, so copy it first
  736. $criteria = clone $criteria;
  737. // We need to set the primary table name, since in the case that there are no WHERE columns
  738. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  739. // tables go into the FROM clause.
  740. $criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
  741. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  742. $criteria->setDistinct();
  743. }
  744. if (!$criteria->hasSelectClause()) {
  745. CcFilesPeer::addSelectColumns($criteria);
  746. }
  747. $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
  748. // Set the correct dbName
  749. $criteria->setDbName(self::DATABASE_NAME);
  750. if ($con === null) {
  751. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  752. }
  753. $criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
  754. $stmt = BasePeer::doCount($criteria, $con);
  755. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  756. $count = (int) $row[0];
  757. } else {
  758. $count = 0; // no rows returned; we infer that means 0 matches.
  759. }
  760. $stmt->closeCursor();
  761. return $count;
  762. }
  763. /**
  764. * Returns the number of rows matching criteria, joining the related CcMusicDirs table
  765. *
  766. * @param Criteria $criteria
  767. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  768. * @param PropelPDO $con
  769. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  770. * @return int Number of matching rows.
  771. */
  772. public static function doCountJoinCcMusicDirs(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  773. {
  774. // we're going to modify criteria, so copy it first
  775. $criteria = clone $criteria;
  776. // We need to set the primary table name, since in the case that there are no WHERE columns
  777. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  778. // tables go into the FROM clause.
  779. $criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
  780. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  781. $criteria->setDistinct();
  782. }
  783. if (!$criteria->hasSelectClause()) {
  784. CcFilesPeer::addSelectColumns($criteria);
  785. }
  786. $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
  787. // Set the correct dbName
  788. $criteria->setDbName(self::DATABASE_NAME);
  789. if ($con === null) {
  790. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  791. }
  792. $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
  793. $stmt = BasePeer::doCount($criteria, $con);
  794. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  795. $count = (int) $row[0];
  796. } else {
  797. $count = 0; // no rows returned; we infer that means 0 matches.
  798. }
  799. $stmt->closeCursor();
  800. return $count;
  801. }
  802. /**
  803. * Selects a collection of CcFiles objects pre-filled with their CcSubjs objects.
  804. * @param Criteria $criteria
  805. * @param PropelPDO $con
  806. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  807. * @return array Array of CcFiles objects.
  808. * @throws PropelException Any exceptions caught during processing will be
  809. * rethrown wrapped into a PropelException.
  810. */
  811. public static function doSelectJoinFkOwner(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  812. {
  813. $criteria = clone $criteria;
  814. // Set the correct dbName if it has not been overridden
  815. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  816. $criteria->setDbName(self::DATABASE_NAME);
  817. }
  818. CcFilesPeer::addSelectColumns($criteria);
  819. $startcol = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
  820. CcSubjsPeer::addSelectColumns($criteria);
  821. $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
  822. $stmt = BasePeer::doSelect($criteria, $con);
  823. $results = array();
  824. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  825. $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
  826. if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
  827. // We no longer rehydrate the object, since this can cause data loss.
  828. // See http://www.propelorm.org/ticket/509
  829. // $obj1->hydrate($row, 0, true); // rehydrate
  830. } else {
  831. $cls = CcFilesPeer::getOMClass(false);
  832. $obj1 = new $cls();
  833. $obj1->hydrate($row);
  834. CcFilesPeer::addInstanceToPool($obj1, $key1);
  835. } // if $obj1 already loaded
  836. $key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol);
  837. if ($key2 !== null) {
  838. $obj2 = CcSubjsPeer::getInstanceFromPool($key2);
  839. if (!$obj2) {
  840. $cls = CcSubjsPeer::getOMClass(false);
  841. $obj2 = new $cls();
  842. $obj2->hydrate($row, $startcol);
  843. CcSubjsPeer::addInstanceToPool($obj2, $key2);
  844. } // if obj2 already loaded
  845. // Add the $obj1 (CcFiles) to $obj2 (CcSubjs)
  846. $obj2->addCcFilesRelatedByDbOwnerId($obj1);
  847. } // if joined row was not null
  848. $results[] = $obj1;
  849. }
  850. $stmt->closeCursor();
  851. return $results;
  852. }
  853. /**
  854. * Selects a collection of CcFiles objects pre-filled with their CcSubjs objects.
  855. * @param Criteria $criteria
  856. * @param PropelPDO $con
  857. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  858. * @return array Array of CcFiles objects.
  859. * @throws PropelException Any exceptions caught during processing will be
  860. * rethrown wrapped into a PropelException.
  861. */
  862. public static function doSelectJoinCcSubjsRelatedByDbEditedby(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  863. {
  864. $criteria = clone $criteria;
  865. // Set the correct dbName if it has not been overridden
  866. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  867. $criteria->setDbName(self::DATABASE_NAME);
  868. }
  869. CcFilesPeer::addSelectColumns($criteria);
  870. $startcol = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
  871. CcSubjsPeer::addSelectColumns($criteria);
  872. $criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
  873. $stmt = BasePeer::doSelect($criteria, $con);
  874. $results = array();
  875. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  876. $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
  877. if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
  878. // We no longer rehydrate the object, since this can cause data loss.
  879. // See http://www.propelorm.org/ticket/509
  880. // $obj1->hydrate($row, 0, true); // rehydrate
  881. } else {
  882. $cls = CcFilesPeer::getOMClass(false);
  883. $obj1 = new $cls();
  884. $obj1->hydrate($row);
  885. CcFilesPeer::addInstanceToPool($obj1, $key1);
  886. } // if $obj1 already loaded
  887. $key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol);
  888. if ($key2 !== null) {
  889. $obj2 = CcSubjsPeer::getInstanceFromPool($key2);
  890. if (!$obj2) {
  891. $cls = CcSubjsPeer::getOMClass(false);
  892. $obj2 = new $cls();
  893. $obj2->hydrate($row, $startcol);
  894. CcSubjsPeer::addInstanceToPool($obj2, $key2);
  895. } // if obj2 already loaded
  896. // Add the $obj1 (CcFiles) to $obj2 (CcSubjs)
  897. $obj2->addCcFilesRelatedByDbEditedby($obj1);
  898. } // if joined row was not null
  899. $results[] = $obj1;
  900. }
  901. $stmt->closeCursor();
  902. return $results;
  903. }
  904. /**
  905. * Selects a collection of CcFiles objects pre-filled with their CcMusicDirs objects.
  906. * @param Criteria $criteria
  907. * @param PropelPDO $con
  908. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  909. * @return array Array of CcFiles objects.
  910. * @throws PropelException Any exceptions caught during processing will be
  911. * rethrown wrapped into a PropelException.
  912. */
  913. public static function doSelectJoinCcMusicDirs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  914. {
  915. $criteria = clone $criteria;
  916. // Set the correct dbName if it has not been overridden
  917. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  918. $criteria->setDbName(self::DATABASE_NAME);
  919. }
  920. CcFilesPeer::addSelectColumns($criteria);
  921. $startcol = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
  922. CcMusicDirsPeer::addSelectColumns($criteria);
  923. $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
  924. $stmt = BasePeer::doSelect($criteria, $con);
  925. $results = array();
  926. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  927. $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
  928. if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
  929. // We no longer rehydrate the object, since this can cause data loss.
  930. // See http://www.propelorm.org/ticket/509
  931. // $obj1->hydrate($row, 0, true); // rehydrate
  932. } else {
  933. $cls = CcFilesPeer::getOMClass(false);
  934. $obj1 = new $cls();
  935. $obj1->hydrate($row);
  936. CcFilesPeer::addInstanceToPool($obj1, $key1);
  937. } // if $obj1 already loaded
  938. $key2 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol);
  939. if ($key2 !== null) {
  940. $obj2 = CcMusicDirsPeer::getInstanceFromPool($key2);
  941. if (!$obj2) {
  942. $cls = CcMusicDirsPeer::getOMClass(false);
  943. $obj2 = new $cls();
  944. $obj2->hydrate($row, $startcol);
  945. CcMusicDirsPeer::addInstanceToPool($obj2, $key2);
  946. } // if obj2 already loaded
  947. // Add the $obj1 (CcFiles) to $obj2 (CcMusicDirs)
  948. $obj2->addCcFiles($obj1);
  949. } // if joined row was not null
  950. $results[] = $obj1;
  951. }
  952. $stmt->closeCursor();
  953. return $results;
  954. }
  955. /**
  956. * Returns the number of rows matching criteria, joining all related tables
  957. *
  958. * @param Criteria $criteria
  959. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  960. * @param PropelPDO $con
  961. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  962. * @return int Number of matching rows.
  963. */
  964. public static function doCountJoinAll(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  965. {
  966. // we're going to modify criteria, so copy it first
  967. $criteria = clone $criteria;
  968. // We need to set the primary table name, since in the case that there are no WHERE columns
  969. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  970. // tables go into the FROM clause.
  971. $criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
  972. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  973. $criteria->setDistinct();
  974. }
  975. if (!$criteria->hasSelectClause()) {
  976. CcFilesPeer::addSelectColumns($criteria);
  977. }
  978. $criteria->clearOrderByColumns(); // ORDER BY won't ever affect the count
  979. // Set the correct dbName
  980. $criteria->setDbName(self::DATABASE_NAME);
  981. if ($con === null) {
  982. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  983. }
  984. $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
  985. $criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
  986. $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
  987. $stmt = BasePeer::doCount($criteria, $con);
  988. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  989. $count = (int) $row[0];
  990. } else {
  991. $count = 0; // no rows returned; we infer that means 0 matches.
  992. }
  993. $stmt->closeCursor();
  994. return $count;
  995. }
  996. /**
  997. * Selects a collection of CcFiles objects pre-filled with all related objects.
  998. *
  999. * @param Criteria $criteria
  1000. * @param PropelPDO $con
  1001. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  1002. * @return array Array of CcFiles objects.
  1003. * @throws PropelException Any exceptions caught during processing will be
  1004. * rethrown wrapped into a PropelException.
  1005. */
  1006. public static function doSelectJoinAll(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  1007. {
  1008. $criteria = clone $criteria;
  1009. // Set the correct dbName if it has not been overridden
  1010. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  1011. $criteria->setDbName(self::DATABASE_NAME);
  1012. }
  1013. CcFilesPeer::addSelectColumns($criteria);
  1014. $startcol2 = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
  1015. CcSubjsPeer::addSelectColumns($criteria);
  1016. $startcol3 = $startcol2 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
  1017. CcSubjsPeer::addSelectColumns($criteria);
  1018. $startcol4 = $startcol3 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
  1019. CcMusicDirsPeer::addSelectColumns($criteria);
  1020. $startcol5 = $startcol4 + (CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS);
  1021. $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
  1022. $criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
  1023. $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
  1024. $stmt = BasePeer::doSelect($criteria, $con);
  1025. $results = array();
  1026. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  1027. $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
  1028. if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
  1029. // We no longer rehydrate the object, since this can cause data loss.
  1030. // See http://www.propelorm.org/ticket/509
  1031. // $obj1->hydrate($row, 0, true); // rehydrate
  1032. } else {
  1033. $cls = CcFilesPeer::getOMClass(false);
  1034. $obj1 = new $cls();
  1035. $obj1->hydrate($row);
  1036. CcFilesPeer::addInstanceToPool($obj1, $key1);
  1037. } // if obj1 already loaded
  1038. // Add objects for joined CcSubjs rows
  1039. $key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol2);
  1040. if ($key2 !== null) {
  1041. $obj2 = CcSubjsPeer::getInstanceFromPool($key2);
  1042. if (!$obj2) {
  1043. $cls = CcSubjsPeer::getOMClass(false);
  1044. $obj2 = new $cls();
  1045. $obj2->hydrate($row, $startcol2);
  1046. CcSubjsPeer::addInstanceToPool($obj2, $key2);
  1047. } // if obj2 loaded
  1048. // Add the $obj1 (CcFiles) to the collection in $obj2 (CcSubjs)
  1049. $obj2->addCcFilesRelatedByDbOwnerId($obj1);
  1050. } // if joined row not null
  1051. // Add objects for joined CcSubjs rows
  1052. $key3 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol3);
  1053. if ($key3 !== null) {
  1054. $obj3 = CcSubjsPeer::getInstanceFromPool($key3);
  1055. if (!$obj3) {
  1056. $cls = CcSubjsPeer::getOMClass(false);
  1057. $obj3 = new $cls();
  1058. $obj3->hydrate($row, $startcol3);
  1059. CcSubjsPeer::addInstanceToPool($obj3, $key3);
  1060. } // if obj3 loaded
  1061. // Add the $obj1 (CcFiles) to the collection in $obj3 (CcSubjs)
  1062. $obj3->addCcFilesRelatedByDbEditedby($obj1);
  1063. } // if joined row not null
  1064. // Add objects for joined CcMusicDirs rows
  1065. $key4 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol4);
  1066. if ($key4 !== null) {
  1067. $obj4 = CcMusicDirsPeer::getInstanceFromPool($key4);
  1068. if (!$obj4) {
  1069. $cls = CcMusicDirsPeer::getOMClass(false);
  1070. $obj4 = new $cls();
  1071. $obj4->hydrate($row, $startcol4);
  1072. CcMusicDirsPeer::addInstanceToPool($obj4, $key4);
  1073. } // if obj4 loaded
  1074. // Add the $obj1 (CcFiles) to the collection in $obj4 (CcMusicDirs)
  1075. $obj4->addCcFiles($obj1);
  1076. } // if joined row not null
  1077. $results[] = $obj1;
  1078. }
  1079. $stmt->closeCursor();
  1080. return $results;
  1081. }
  1082. /**
  1083. * Returns the number of rows matching criteria, joining the related FkOwner table
  1084. *
  1085. * @param Criteria $criteria
  1086. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  1087. * @param PropelPDO $con
  1088. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  1089. * @return int Number of matching rows.
  1090. */
  1091. public static function doCountJoinAllExceptFkOwner(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  1092. {
  1093. // we're going to modify criteria, so copy it first
  1094. $criteria = clone $criteria;
  1095. // We need to set the primary table name, since in the case that there are no WHERE columns
  1096. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  1097. // tables go into the FROM clause.
  1098. $criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
  1099. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  1100. $criteria->setDistinct();
  1101. }
  1102. if (!$criteria->hasSelectClause()) {
  1103. CcFilesPeer::addSelectColumns($criteria);
  1104. }
  1105. $criteria->clearOrderByColumns(); // ORDER BY should not affect count
  1106. // Set the correct dbName
  1107. $criteria->setDbName(self::DATABASE_NAME);
  1108. if ($con === null) {
  1109. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  1110. }
  1111. $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
  1112. $stmt = BasePeer::doCount($criteria, $con);
  1113. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  1114. $count = (int) $row[0];
  1115. } else {
  1116. $count = 0; // no rows returned; we infer that means 0 matches.
  1117. }
  1118. $stmt->closeCursor();
  1119. return $count;
  1120. }
  1121. /**
  1122. * Returns the number of rows matching criteria, joining the related CcSubjsRelatedByDbEditedby table
  1123. *
  1124. * @param Criteria $criteria
  1125. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  1126. * @param PropelPDO $con
  1127. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  1128. * @return int Number of matching rows.
  1129. */
  1130. public static function doCountJoinAllExceptCcSubjsRelatedByDbEditedby(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  1131. {
  1132. // we're going to modify criteria, so copy it first
  1133. $criteria = clone $criteria;
  1134. // We need to set the primary table name, since in the case that there are no WHERE columns
  1135. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  1136. // tables go into the FROM clause.
  1137. $criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
  1138. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  1139. $criteria->setDistinct();
  1140. }
  1141. if (!$criteria->hasSelectClause()) {
  1142. CcFilesPeer::addSelectColumns($criteria);
  1143. }
  1144. $criteria->clearOrderByColumns(); // ORDER BY should not affect count
  1145. // Set the correct dbName
  1146. $criteria->setDbName(self::DATABASE_NAME);
  1147. if ($con === null) {
  1148. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  1149. }
  1150. $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
  1151. $stmt = BasePeer::doCount($criteria, $con);
  1152. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  1153. $count = (int) $row[0];
  1154. } else {
  1155. $count = 0; // no rows returned; we infer that means 0 matches.
  1156. }
  1157. $stmt->closeCursor();
  1158. return $count;
  1159. }
  1160. /**
  1161. * Returns the number of rows matching criteria, joining the related CcMusicDirs table
  1162. *
  1163. * @param Criteria $criteria
  1164. * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
  1165. * @param PropelPDO $con
  1166. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  1167. * @return int Number of matching rows.
  1168. */
  1169. public static function doCountJoinAllExceptCcMusicDirs(Criteria $criteria, $distinct = false, PropelPDO $con = null, $join_behavior = Criteria::LEFT_JOIN)
  1170. {
  1171. // we're going to modify criteria, so copy it first
  1172. $criteria = clone $criteria;
  1173. // We need to set the primary table name, since in the case that there are no WHERE columns
  1174. // it will be impossible for the BasePeer::createSelectSql() method to determine which
  1175. // tables go into the FROM clause.
  1176. $criteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
  1177. if ($distinct && !in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  1178. $criteria->setDistinct();
  1179. }
  1180. if (!$criteria->hasSelectClause()) {
  1181. CcFilesPeer::addSelectColumns($criteria);
  1182. }
  1183. $criteria->clearOrderByColumns(); // ORDER BY should not affect count
  1184. // Set the correct dbName
  1185. $criteria->setDbName(self::DATABASE_NAME);
  1186. if ($con === null) {
  1187. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  1188. }
  1189. $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
  1190. $criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
  1191. $stmt = BasePeer::doCount($criteria, $con);
  1192. if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  1193. $count = (int) $row[0];
  1194. } else {
  1195. $count = 0; // no rows returned; we infer that means 0 matches.
  1196. }
  1197. $stmt->closeCursor();
  1198. return $count;
  1199. }
  1200. /**
  1201. * Selects a collection of CcFiles objects pre-filled with all related objects except FkOwner.
  1202. *
  1203. * @param Criteria $criteria
  1204. * @param PropelPDO $con
  1205. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  1206. * @return array Array of CcFiles objects.
  1207. * @throws PropelException Any exceptions caught during processing will be
  1208. * rethrown wrapped into a PropelException.
  1209. */
  1210. public static function doSelectJoinAllExceptFkOwner(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  1211. {
  1212. $criteria = clone $criteria;
  1213. // Set the correct dbName if it has not been overridden
  1214. // $criteria->getDbName() will return the same object if not set to another value
  1215. // so == check is okay and faster
  1216. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  1217. $criteria->setDbName(self::DATABASE_NAME);
  1218. }
  1219. CcFilesPeer::addSelectColumns($criteria);
  1220. $startcol2 = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
  1221. CcMusicDirsPeer::addSelectColumns($criteria);
  1222. $startcol3 = $startcol2 + (CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS);
  1223. $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
  1224. $stmt = BasePeer::doSelect($criteria, $con);
  1225. $results = array();
  1226. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  1227. $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
  1228. if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
  1229. // We no longer rehydrate the object, since this can cause data loss.
  1230. // See http://www.propelorm.org/ticket/509
  1231. // $obj1->hydrate($row, 0, true); // rehydrate
  1232. } else {
  1233. $cls = CcFilesPeer::getOMClass(false);
  1234. $obj1 = new $cls();
  1235. $obj1->hydrate($row);
  1236. CcFilesPeer::addInstanceToPool($obj1, $key1);
  1237. } // if obj1 already loaded
  1238. // Add objects for joined CcMusicDirs rows
  1239. $key2 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol2);
  1240. if ($key2 !== null) {
  1241. $obj2 = CcMusicDirsPeer::getInstanceFromPool($key2);
  1242. if (!$obj2) {
  1243. $cls = CcMusicDirsPeer::getOMClass(false);
  1244. $obj2 = new $cls();
  1245. $obj2->hydrate($row, $startcol2);
  1246. CcMusicDirsPeer::addInstanceToPool($obj2, $key2);
  1247. } // if $obj2 already loaded
  1248. // Add the $obj1 (CcFiles) to the collection in $obj2 (CcMusicDirs)
  1249. $obj2->addCcFiles($obj1);
  1250. } // if joined row is not null
  1251. $results[] = $obj1;
  1252. }
  1253. $stmt->closeCursor();
  1254. return $results;
  1255. }
  1256. /**
  1257. * Selects a collection of CcFiles objects pre-filled with all related objects except CcSubjsRelatedByDbEditedby.
  1258. *
  1259. * @param Criteria $criteria
  1260. * @param PropelPDO $con
  1261. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  1262. * @return array Array of CcFiles objects.
  1263. * @throws PropelException Any exceptions caught during processing will be
  1264. * rethrown wrapped into a PropelException.
  1265. */
  1266. public static function doSelectJoinAllExceptCcSubjsRelatedByDbEditedby(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  1267. {
  1268. $criteria = clone $criteria;
  1269. // Set the correct dbName if it has not been overridden
  1270. // $criteria->getDbName() will return the same object if not set to another value
  1271. // so == check is okay and faster
  1272. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  1273. $criteria->setDbName(self::DATABASE_NAME);
  1274. }
  1275. CcFilesPeer::addSelectColumns($criteria);
  1276. $startcol2 = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
  1277. CcMusicDirsPeer::addSelectColumns($criteria);
  1278. $startcol3 = $startcol2 + (CcMusicDirsPeer::NUM_COLUMNS - CcMusicDirsPeer::NUM_LAZY_LOAD_COLUMNS);
  1279. $criteria->addJoin(CcFilesPeer::DIRECTORY, CcMusicDirsPeer::ID, $join_behavior);
  1280. $stmt = BasePeer::doSelect($criteria, $con);
  1281. $results = array();
  1282. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  1283. $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
  1284. if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
  1285. // We no longer rehydrate the object, since this can cause data loss.
  1286. // See http://www.propelorm.org/ticket/509
  1287. // $obj1->hydrate($row, 0, true); // rehydrate
  1288. } else {
  1289. $cls = CcFilesPeer::getOMClass(false);
  1290. $obj1 = new $cls();
  1291. $obj1->hydrate($row);
  1292. CcFilesPeer::addInstanceToPool($obj1, $key1);
  1293. } // if obj1 already loaded
  1294. // Add objects for joined CcMusicDirs rows
  1295. $key2 = CcMusicDirsPeer::getPrimaryKeyHashFromRow($row, $startcol2);
  1296. if ($key2 !== null) {
  1297. $obj2 = CcMusicDirsPeer::getInstanceFromPool($key2);
  1298. if (!$obj2) {
  1299. $cls = CcMusicDirsPeer::getOMClass(false);
  1300. $obj2 = new $cls();
  1301. $obj2->hydrate($row, $startcol2);
  1302. CcMusicDirsPeer::addInstanceToPool($obj2, $key2);
  1303. } // if $obj2 already loaded
  1304. // Add the $obj1 (CcFiles) to the collection in $obj2 (CcMusicDirs)
  1305. $obj2->addCcFiles($obj1);
  1306. } // if joined row is not null
  1307. $results[] = $obj1;
  1308. }
  1309. $stmt->closeCursor();
  1310. return $results;
  1311. }
  1312. /**
  1313. * Selects a collection of CcFiles objects pre-filled with all related objects except CcMusicDirs.
  1314. *
  1315. * @param Criteria $criteria
  1316. * @param PropelPDO $con
  1317. * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN
  1318. * @return array Array of CcFiles objects.
  1319. * @throws PropelException Any exceptions caught during processing will be
  1320. * rethrown wrapped into a PropelException.
  1321. */
  1322. public static function doSelectJoinAllExceptCcMusicDirs(Criteria $criteria, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  1323. {
  1324. $criteria = clone $criteria;
  1325. // Set the correct dbName if it has not been overridden
  1326. // $criteria->getDbName() will return the same object if not set to another value
  1327. // so == check is okay and faster
  1328. if ($criteria->getDbName() == Propel::getDefaultDB()) {
  1329. $criteria->setDbName(self::DATABASE_NAME);
  1330. }
  1331. CcFilesPeer::addSelectColumns($criteria);
  1332. $startcol2 = (CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS);
  1333. CcSubjsPeer::addSelectColumns($criteria);
  1334. $startcol3 = $startcol2 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
  1335. CcSubjsPeer::addSelectColumns($criteria);
  1336. $startcol4 = $startcol3 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
  1337. $criteria->addJoin(CcFilesPeer::OWNER_ID, CcSubjsPeer::ID, $join_behavior);
  1338. $criteria->addJoin(CcFilesPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
  1339. $stmt = BasePeer::doSelect($criteria, $con);
  1340. $results = array();
  1341. while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
  1342. $key1 = CcFilesPeer::getPrimaryKeyHashFromRow($row, 0);
  1343. if (null !== ($obj1 = CcFilesPeer::getInstanceFromPool($key1))) {
  1344. // We no longer rehydrate the object, since this can cause data loss.
  1345. // See http://www.propelorm.org/ticket/509
  1346. // $obj1->hydrate($row, 0, true); // rehydrate
  1347. } else {
  1348. $cls = CcFilesPeer::getOMClass(false);
  1349. $obj1 = new $cls();
  1350. $obj1->hydrate($row);
  1351. CcFilesPeer::addInstanceToPool($obj1, $key1);
  1352. } // if obj1 already loaded
  1353. // Add objects for joined CcSubjs rows
  1354. $key2 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol2);
  1355. if ($key2 !== null) {
  1356. $obj2 = CcSubjsPeer::getInstanceFromPool($key2);
  1357. if (!$obj2) {
  1358. $cls = CcSubjsPeer::getOMClass(false);
  1359. $obj2 = new $cls();
  1360. $obj2->hydrate($row, $startcol2);
  1361. CcSubjsPeer::addInstanceToPool($obj2, $key2);
  1362. } // if $obj2 already loaded
  1363. // Add the $obj1 (CcFiles) to the collection in $obj2 (CcSubjs)
  1364. $obj2->addCcFilesRelatedByDbOwnerId($obj1);
  1365. } // if joined row is not null
  1366. // Add objects for joined CcSubjs rows
  1367. $key3 = CcSubjsPeer::getPrimaryKeyHashFromRow($row, $startcol3);
  1368. if ($key3 !== null) {
  1369. $obj3 = CcSubjsPeer::getInstanceFromPool($key3);
  1370. if (!$obj3) {
  1371. $cls = CcSubjsPeer::getOMClass(false);
  1372. $obj3 = new $cls();
  1373. $obj3->hydrate($row, $startcol3);
  1374. CcSubjsPeer::addInstanceToPool($obj3, $key3);
  1375. } // if $obj3 already loaded
  1376. // Add the $obj1 (CcFiles) to the collection in $obj3 (CcSubjs)
  1377. $obj3->addCcFilesRelatedByDbEditedby($obj1);
  1378. } // if joined row is not null
  1379. $results[] = $obj1;
  1380. }
  1381. $stmt->closeCursor();
  1382. return $results;
  1383. }
  1384. /**
  1385. * Returns the TableMap related to this peer.
  1386. * This method is not needed for general use but a specific application could have a need.
  1387. * @return TableMap
  1388. * @throws PropelException Any exceptions caught during processing will be
  1389. * rethrown wrapped into a PropelException.
  1390. */
  1391. public static function getTableMap()
  1392. {
  1393. return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
  1394. }
  1395. /**
  1396. * Add a TableMap instance to the database for this peer class.
  1397. */
  1398. public static function buildTableMap()
  1399. {
  1400. $dbMap = Propel::getDatabaseMap(BaseCcFilesPeer::DATABASE_NAME);
  1401. if (!$dbMap->hasTable(BaseCcFilesPeer::TABLE_NAME))
  1402. {
  1403. $dbMap->addTableObject(new CcFilesTableMap());
  1404. }
  1405. }
  1406. /**
  1407. * The class that the Peer will make instances of.
  1408. *
  1409. * If $withPrefix is true, the returned path
  1410. * uses a dot-path notation which is tranalted into a path
  1411. * relative to a location on the PHP include_path.
  1412. * (e.g. path.to.MyClass -> 'path/to/MyClass.php')
  1413. *
  1414. * @param boolean $withPrefix Whether or not to return the path with the class name
  1415. * @return string path.to.ClassName
  1416. */
  1417. public static function getOMClass($withPrefix = true)
  1418. {
  1419. return $withPrefix ? CcFilesPeer::CLASS_DEFAULT : CcFilesPeer::OM_CLASS;
  1420. }
  1421. /**
  1422. * Method perform an INSERT on the database, given a CcFiles or Criteria object.
  1423. *
  1424. * @param mixed $values Criteria or CcFiles object containing data that is used to create the INSERT statement.
  1425. * @param PropelPDO $con the PropelPDO connection to use
  1426. * @return mixed The new primary key.
  1427. * @throws PropelException Any exceptions caught during processing will be
  1428. * rethrown wrapped into a PropelException.
  1429. */
  1430. public static function doInsert($values, PropelPDO $con = null)
  1431. {
  1432. if ($con === null) {
  1433. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  1434. }
  1435. if ($values instanceof Criteria) {
  1436. $criteria = clone $values; // rename for clarity
  1437. } else {
  1438. $criteria = $values->buildCriteria(); // build Criteria from CcFiles object
  1439. }
  1440. if ($criteria->containsKey(CcFilesPeer::ID) && $criteria->keyContainsValue(CcFilesPeer::ID) ) {
  1441. throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcFilesPeer::ID.')');
  1442. }
  1443. // Set the correct dbName
  1444. $criteria->setDbName(self::DATABASE_NAME);
  1445. try {
  1446. // use transaction because $criteria could contain info
  1447. // for more than one table (I guess, conceivably)
  1448. $con->beginTransaction();
  1449. $pk = BasePeer::doInsert($criteria, $con);
  1450. $con->commit();
  1451. } catch(PropelException $e) {
  1452. $con->rollBack();
  1453. throw $e;
  1454. }
  1455. return $pk;
  1456. }
  1457. /**
  1458. * Method perform an UPDATE on the database, given a CcFiles or Criteria object.
  1459. *
  1460. * @param mixed $values Criteria or CcFiles object containing data that is used to create the UPDATE statement.
  1461. * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
  1462. * @return int The number of affected rows (if supported by underlying database driver).
  1463. * @throws PropelException Any exceptions caught during processing will be
  1464. * rethrown wrapped into a PropelException.
  1465. */
  1466. public static function doUpdate($values, PropelPDO $con = null)
  1467. {
  1468. if ($con === null) {
  1469. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  1470. }
  1471. $selectCriteria = new Criteria(self::DATABASE_NAME);
  1472. if ($values instanceof Criteria) {
  1473. $criteria = clone $values; // rename for clarity
  1474. $comparison = $criteria->getComparison(CcFilesPeer::ID);
  1475. $value = $criteria->remove(CcFilesPeer::ID);
  1476. if ($value) {
  1477. $selectCriteria->add(CcFilesPeer::ID, $value, $comparison);
  1478. } else {
  1479. $selectCriteria->setPrimaryTableName(CcFilesPeer::TABLE_NAME);
  1480. }
  1481. } else { // $values is CcFiles object
  1482. $criteria = $values->buildCriteria(); // gets full criteria
  1483. $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
  1484. }
  1485. // set the correct dbName
  1486. $criteria->setDbName(self::DATABASE_NAME);
  1487. return BasePeer::doUpdate($selectCriteria, $criteria, $con);
  1488. }
  1489. /**
  1490. * Method to DELETE all rows from the cc_files table.
  1491. *
  1492. * @return int The number of affected rows (if supported by underlying database driver).
  1493. */
  1494. public static function doDeleteAll($con = null)
  1495. {
  1496. if ($con === null) {
  1497. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  1498. }
  1499. $affectedRows = 0; // initialize var to track total num of affected rows
  1500. try {
  1501. // use transaction because $criteria could contain info
  1502. // for more than one table or we could emulating ON DELETE CASCADE, etc.
  1503. $con->beginTransaction();
  1504. $affectedRows += BasePeer::doDeleteAll(CcFilesPeer::TABLE_NAME, $con, CcFilesPeer::DATABASE_NAME);
  1505. // Because this db requires some delete cascade/set null emulation, we have to
  1506. // clear the cached instance *after* the emulation has happened (since
  1507. // instances get re-added by the select statement contained therein).
  1508. CcFilesPeer::clearInstancePool();
  1509. CcFilesPeer::clearRelatedInstancePool();
  1510. $con->commit();
  1511. return $affectedRows;
  1512. } catch (PropelException $e) {
  1513. $con->rollBack();
  1514. throw $e;
  1515. }
  1516. }
  1517. /**
  1518. * Method perform a DELETE on the database, given a CcFiles or Criteria object OR a primary key value.
  1519. *
  1520. * @param mixed $values Criteria or CcFiles object or primary key or array of primary keys
  1521. * which is used to create the DELETE statement
  1522. * @param PropelPDO $con the connection to use
  1523. * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
  1524. * if supported by native driver or if emulated using Propel.
  1525. * @throws PropelException Any exceptions caught during processing will be
  1526. * rethrown wrapped into a PropelException.
  1527. */
  1528. public static function doDelete($values, PropelPDO $con = null)
  1529. {
  1530. if ($con === null) {
  1531. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  1532. }
  1533. if ($values instanceof Criteria) {
  1534. // invalidate the cache for all objects of this type, since we have no
  1535. // way of knowing (without running a query) what objects should be invalidated
  1536. // from the cache based on this Criteria.
  1537. CcFilesPeer::clearInstancePool();
  1538. // rename for clarity
  1539. $criteria = clone $values;
  1540. } elseif ($values instanceof CcFiles) { // it's a model object
  1541. // invalidate the cache for this single object
  1542. CcFilesPeer::removeInstanceFromPool($values);
  1543. // create criteria based on pk values
  1544. $criteria = $values->buildPkeyCriteria();
  1545. } else { // it's a primary key, or an array of pks
  1546. $criteria = new Criteria(self::DATABASE_NAME);
  1547. $criteria->add(CcFilesPeer::ID, (array) $values, Criteria::IN);
  1548. // invalidate the cache for this object(s)
  1549. foreach ((array) $values as $singleval) {
  1550. CcFilesPeer::removeInstanceFromPool($singleval);
  1551. }
  1552. }
  1553. // Set the correct dbName
  1554. $criteria->setDbName(self::DATABASE_NAME);
  1555. $affectedRows = 0; // initialize var to track total num of affected rows
  1556. try {
  1557. // use transaction because $criteria could contain info
  1558. // for more than one table or we could emulating ON DELETE CASCADE, etc.
  1559. $con->beginTransaction();
  1560. $affectedRows += BasePeer::doDelete($criteria, $con);
  1561. CcFilesPeer::clearRelatedInstancePool();
  1562. $con->commit();
  1563. return $affectedRows;
  1564. } catch (PropelException $e) {
  1565. $con->rollBack();
  1566. throw $e;
  1567. }
  1568. }
  1569. /**
  1570. * Validates all modified columns of given CcFiles object.
  1571. * If parameter $columns is either a single column name or an array of column names
  1572. * than only those columns are validated.
  1573. *
  1574. * NOTICE: This does not apply to primary or foreign keys for now.
  1575. *
  1576. * @param CcFiles $obj The object to validate.
  1577. * @param mixed $cols Column name or array of column names.
  1578. *
  1579. * @return mixed TRUE if all columns are valid or the error message of the first invalid column.
  1580. */
  1581. public static function doValidate(CcFiles $obj, $cols = null)
  1582. {
  1583. $columns = array();
  1584. if ($cols) {
  1585. $dbMap = Propel::getDatabaseMap(CcFilesPeer::DATABASE_NAME);
  1586. $tableMap = $dbMap->getTable(CcFilesPeer::TABLE_NAME);
  1587. if (! is_array($cols)) {
  1588. $cols = array($cols);
  1589. }
  1590. foreach ($cols as $colName) {
  1591. if ($tableMap->containsColumn($colName)) {
  1592. $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
  1593. $columns[$colName] = $obj->$get();
  1594. }
  1595. }
  1596. } else {
  1597. }
  1598. return BasePeer::doValidate(CcFilesPeer::DATABASE_NAME, CcFilesPeer::TABLE_NAME, $columns);
  1599. }
  1600. /**
  1601. * Retrieve a single object by pkey.
  1602. *
  1603. * @param int $pk the primary key.
  1604. * @param PropelPDO $con the connection to use
  1605. * @return CcFiles
  1606. */
  1607. public static function retrieveByPK($pk, PropelPDO $con = null)
  1608. {
  1609. if (null !== ($obj = CcFilesPeer::getInstanceFromPool((string) $pk))) {
  1610. return $obj;
  1611. }
  1612. if ($con === null) {
  1613. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  1614. }
  1615. $criteria = new Criteria(CcFilesPeer::DATABASE_NAME);
  1616. $criteria->add(CcFilesPeer::ID, $pk);
  1617. $v = CcFilesPeer::doSelect($criteria, $con);
  1618. return !empty($v) > 0 ? $v[0] : null;
  1619. }
  1620. /**
  1621. * Retrieve multiple objects by pkey.
  1622. *
  1623. * @param array $pks List of primary keys
  1624. * @param PropelPDO $con the connection to use
  1625. * @throws PropelException Any exceptions caught during processing will be
  1626. * rethrown wrapped into a PropelException.
  1627. */
  1628. public static function retrieveByPKs($pks, PropelPDO $con = null)
  1629. {
  1630. if ($con === null) {
  1631. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  1632. }
  1633. $objs = null;
  1634. if (empty($pks)) {
  1635. $objs = array();
  1636. } else {
  1637. $criteria = new Criteria(CcFilesPeer::DATABASE_NAME);
  1638. $criteria->add(CcFilesPeer::ID, $pks, Criteria::IN);
  1639. $objs = CcFilesPeer::doSelect($criteria, $con);
  1640. }
  1641. return $objs;
  1642. }
  1643. } // BaseCcFilesPeer
  1644. // This is the static code needed to register the TableMap for this table with the main Propel class.
  1645. //
  1646. BaseCcFilesPeer::buildTableMap();