BaseCcFiles.php 150 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473
  1. <?php
  2. /**
  3. * Base class that represents a row from the 'cc_files' table.
  4. *
  5. *
  6. *
  7. * @package propel.generator.airtime.om
  8. */
  9. abstract class BaseCcFiles extends BaseObject implements Persistent
  10. {
  11. /**
  12. * Peer class name
  13. */
  14. const PEER = 'CcFilesPeer';
  15. /**
  16. * The Peer class.
  17. * Instance provides a convenient way of calling static methods on a class
  18. * that calling code may not be able to identify.
  19. * @var CcFilesPeer
  20. */
  21. protected static $peer;
  22. /**
  23. * The value for the id field.
  24. * @var int
  25. */
  26. protected $id;
  27. /**
  28. * The value for the name field.
  29. * Note: this column has a database default value of: ''
  30. * @var string
  31. */
  32. protected $name;
  33. /**
  34. * The value for the mime field.
  35. * Note: this column has a database default value of: ''
  36. * @var string
  37. */
  38. protected $mime;
  39. /**
  40. * The value for the ftype field.
  41. * Note: this column has a database default value of: ''
  42. * @var string
  43. */
  44. protected $ftype;
  45. /**
  46. * The value for the directory field.
  47. * @var int
  48. */
  49. protected $directory;
  50. /**
  51. * The value for the filepath field.
  52. * Note: this column has a database default value of: ''
  53. * @var string
  54. */
  55. protected $filepath;
  56. /**
  57. * The value for the state field.
  58. * Note: this column has a database default value of: 'empty'
  59. * @var string
  60. */
  61. protected $state;
  62. /**
  63. * The value for the currentlyaccessing field.
  64. * Note: this column has a database default value of: 0
  65. * @var int
  66. */
  67. protected $currentlyaccessing;
  68. /**
  69. * The value for the editedby field.
  70. * @var int
  71. */
  72. protected $editedby;
  73. /**
  74. * The value for the mtime field.
  75. * @var string
  76. */
  77. protected $mtime;
  78. /**
  79. * The value for the utime field.
  80. * @var string
  81. */
  82. protected $utime;
  83. /**
  84. * The value for the lptime field.
  85. * @var string
  86. */
  87. protected $lptime;
  88. /**
  89. * The value for the md5 field.
  90. * @var string
  91. */
  92. protected $md5;
  93. /**
  94. * The value for the track_title field.
  95. * @var string
  96. */
  97. protected $track_title;
  98. /**
  99. * The value for the artist_name field.
  100. * @var string
  101. */
  102. protected $artist_name;
  103. /**
  104. * The value for the bit_rate field.
  105. * @var int
  106. */
  107. protected $bit_rate;
  108. /**
  109. * The value for the sample_rate field.
  110. * @var int
  111. */
  112. protected $sample_rate;
  113. /**
  114. * The value for the format field.
  115. * @var string
  116. */
  117. protected $format;
  118. /**
  119. * The value for the length field.
  120. * Note: this column has a database default value of: '00:00:00'
  121. * @var string
  122. */
  123. protected $length;
  124. /**
  125. * The value for the album_title field.
  126. * @var string
  127. */
  128. protected $album_title;
  129. /**
  130. * The value for the genre field.
  131. * @var string
  132. */
  133. protected $genre;
  134. /**
  135. * The value for the comments field.
  136. * @var string
  137. */
  138. protected $comments;
  139. /**
  140. * The value for the year field.
  141. * @var string
  142. */
  143. protected $year;
  144. /**
  145. * The value for the track_number field.
  146. * @var int
  147. */
  148. protected $track_number;
  149. /**
  150. * The value for the channels field.
  151. * @var int
  152. */
  153. protected $channels;
  154. /**
  155. * The value for the url field.
  156. * @var string
  157. */
  158. protected $url;
  159. /**
  160. * The value for the bpm field.
  161. * @var int
  162. */
  163. protected $bpm;
  164. /**
  165. * The value for the rating field.
  166. * @var string
  167. */
  168. protected $rating;
  169. /**
  170. * The value for the encoded_by field.
  171. * @var string
  172. */
  173. protected $encoded_by;
  174. /**
  175. * The value for the disc_number field.
  176. * @var string
  177. */
  178. protected $disc_number;
  179. /**
  180. * The value for the mood field.
  181. * @var string
  182. */
  183. protected $mood;
  184. /**
  185. * The value for the label field.
  186. * @var string
  187. */
  188. protected $label;
  189. /**
  190. * The value for the composer field.
  191. * @var string
  192. */
  193. protected $composer;
  194. /**
  195. * The value for the encoder field.
  196. * @var string
  197. */
  198. protected $encoder;
  199. /**
  200. * The value for the checksum field.
  201. * @var string
  202. */
  203. protected $checksum;
  204. /**
  205. * The value for the lyrics field.
  206. * @var string
  207. */
  208. protected $lyrics;
  209. /**
  210. * The value for the orchestra field.
  211. * @var string
  212. */
  213. protected $orchestra;
  214. /**
  215. * The value for the conductor field.
  216. * @var string
  217. */
  218. protected $conductor;
  219. /**
  220. * The value for the lyricist field.
  221. * @var string
  222. */
  223. protected $lyricist;
  224. /**
  225. * The value for the original_lyricist field.
  226. * @var string
  227. */
  228. protected $original_lyricist;
  229. /**
  230. * The value for the radio_station_name field.
  231. * @var string
  232. */
  233. protected $radio_station_name;
  234. /**
  235. * The value for the info_url field.
  236. * @var string
  237. */
  238. protected $info_url;
  239. /**
  240. * The value for the artist_url field.
  241. * @var string
  242. */
  243. protected $artist_url;
  244. /**
  245. * The value for the audio_source_url field.
  246. * @var string
  247. */
  248. protected $audio_source_url;
  249. /**
  250. * The value for the radio_station_url field.
  251. * @var string
  252. */
  253. protected $radio_station_url;
  254. /**
  255. * The value for the buy_this_url field.
  256. * @var string
  257. */
  258. protected $buy_this_url;
  259. /**
  260. * The value for the isrc_number field.
  261. * @var string
  262. */
  263. protected $isrc_number;
  264. /**
  265. * The value for the catalog_number field.
  266. * @var string
  267. */
  268. protected $catalog_number;
  269. /**
  270. * The value for the original_artist field.
  271. * @var string
  272. */
  273. protected $original_artist;
  274. /**
  275. * The value for the copyright field.
  276. * @var string
  277. */
  278. protected $copyright;
  279. /**
  280. * The value for the report_datetime field.
  281. * @var string
  282. */
  283. protected $report_datetime;
  284. /**
  285. * The value for the report_location field.
  286. * @var string
  287. */
  288. protected $report_location;
  289. /**
  290. * The value for the report_organization field.
  291. * @var string
  292. */
  293. protected $report_organization;
  294. /**
  295. * The value for the subject field.
  296. * @var string
  297. */
  298. protected $subject;
  299. /**
  300. * The value for the contributor field.
  301. * @var string
  302. */
  303. protected $contributor;
  304. /**
  305. * The value for the language field.
  306. * @var string
  307. */
  308. protected $language;
  309. /**
  310. * The value for the file_exists field.
  311. * Note: this column has a database default value of: true
  312. * @var boolean
  313. */
  314. protected $file_exists;
  315. /**
  316. * The value for the soundcloud_id field.
  317. * @var int
  318. */
  319. protected $soundcloud_id;
  320. /**
  321. * The value for the soundcloud_error_code field.
  322. * @var int
  323. */
  324. protected $soundcloud_error_code;
  325. /**
  326. * The value for the soundcloud_error_msg field.
  327. * @var string
  328. */
  329. protected $soundcloud_error_msg;
  330. /**
  331. * The value for the soundcloud_link_to_file field.
  332. * @var string
  333. */
  334. protected $soundcloud_link_to_file;
  335. /**
  336. * The value for the soundcloud_upload_time field.
  337. * @var string
  338. */
  339. protected $soundcloud_upload_time;
  340. /**
  341. * The value for the replay_gain field.
  342. * @var string
  343. */
  344. protected $replay_gain;
  345. /**
  346. * The value for the owner_id field.
  347. * @var int
  348. */
  349. protected $owner_id;
  350. /**
  351. * The value for the cuein field.
  352. * Note: this column has a database default value of: '00:00:00'
  353. * @var string
  354. */
  355. protected $cuein;
  356. /**
  357. * The value for the cueout field.
  358. * Note: this column has a database default value of: '00:00:00'
  359. * @var string
  360. */
  361. protected $cueout;
  362. /**
  363. * The value for the silan_check field.
  364. * Note: this column has a database default value of: false
  365. * @var boolean
  366. */
  367. protected $silan_check;
  368. /**
  369. * The value for the hidden field.
  370. * Note: this column has a database default value of: false
  371. * @var boolean
  372. */
  373. protected $hidden;
  374. /**
  375. * The value for the is_scheduled field.
  376. * Note: this column has a database default value of: false
  377. * @var boolean
  378. */
  379. protected $is_scheduled;
  380. /**
  381. * The value for the is_playlist field.
  382. * Note: this column has a database default value of: false
  383. * @var boolean
  384. */
  385. protected $is_playlist;
  386. /**
  387. * @var CcSubjs
  388. */
  389. protected $aFkOwner;
  390. /**
  391. * @var CcSubjs
  392. */
  393. protected $aCcSubjsRelatedByDbEditedby;
  394. /**
  395. * @var CcMusicDirs
  396. */
  397. protected $aCcMusicDirs;
  398. /**
  399. * @var array CcShowInstances[] Collection to store aggregation of CcShowInstances objects.
  400. */
  401. protected $collCcShowInstancess;
  402. /**
  403. * @var array CcPlaylistcontents[] Collection to store aggregation of CcPlaylistcontents objects.
  404. */
  405. protected $collCcPlaylistcontentss;
  406. /**
  407. * @var array CcBlockcontents[] Collection to store aggregation of CcBlockcontents objects.
  408. */
  409. protected $collCcBlockcontentss;
  410. /**
  411. * @var array CcSchedule[] Collection to store aggregation of CcSchedule objects.
  412. */
  413. protected $collCcSchedules;
  414. /**
  415. * @var array CcPlayoutHistory[] Collection to store aggregation of CcPlayoutHistory objects.
  416. */
  417. protected $collCcPlayoutHistorys;
  418. /**
  419. * Flag to prevent endless save loop, if this object is referenced
  420. * by another object which falls in this transaction.
  421. * @var boolean
  422. */
  423. protected $alreadyInSave = false;
  424. /**
  425. * Flag to prevent endless validation loop, if this object is referenced
  426. * by another object which falls in this transaction.
  427. * @var boolean
  428. */
  429. protected $alreadyInValidation = false;
  430. /**
  431. * Applies default values to this object.
  432. * This method should be called from the object's constructor (or
  433. * equivalent initialization method).
  434. * @see __construct()
  435. */
  436. public function applyDefaultValues()
  437. {
  438. $this->name = '';
  439. $this->mime = '';
  440. $this->ftype = '';
  441. $this->filepath = '';
  442. $this->state = 'empty';
  443. $this->currentlyaccessing = 0;
  444. $this->length = '00:00:00';
  445. $this->file_exists = true;
  446. $this->cuein = '00:00:00';
  447. $this->cueout = '00:00:00';
  448. $this->silan_check = false;
  449. $this->hidden = false;
  450. $this->is_scheduled = false;
  451. $this->is_playlist = false;
  452. }
  453. /**
  454. * Initializes internal state of BaseCcFiles object.
  455. * @see applyDefaults()
  456. */
  457. public function __construct()
  458. {
  459. parent::__construct();
  460. $this->applyDefaultValues();
  461. }
  462. /**
  463. * Get the [id] column value.
  464. *
  465. * @return int
  466. */
  467. public function getDbId()
  468. {
  469. return $this->id;
  470. }
  471. /**
  472. * Get the [name] column value.
  473. *
  474. * @return string
  475. */
  476. public function getDbName()
  477. {
  478. return $this->name;
  479. }
  480. /**
  481. * Get the [mime] column value.
  482. *
  483. * @return string
  484. */
  485. public function getDbMime()
  486. {
  487. return $this->mime;
  488. }
  489. /**
  490. * Get the [ftype] column value.
  491. *
  492. * @return string
  493. */
  494. public function getDbFtype()
  495. {
  496. return $this->ftype;
  497. }
  498. /**
  499. * Get the [directory] column value.
  500. *
  501. * @return int
  502. */
  503. public function getDbDirectory()
  504. {
  505. return $this->directory;
  506. }
  507. /**
  508. * Get the [filepath] column value.
  509. *
  510. * @return string
  511. */
  512. public function getDbFilepath()
  513. {
  514. return $this->filepath;
  515. }
  516. /**
  517. * Get the [state] column value.
  518. *
  519. * @return string
  520. */
  521. public function getDbState()
  522. {
  523. return $this->state;
  524. }
  525. /**
  526. * Get the [currentlyaccessing] column value.
  527. *
  528. * @return int
  529. */
  530. public function getDbCurrentlyaccessing()
  531. {
  532. return $this->currentlyaccessing;
  533. }
  534. /**
  535. * Get the [editedby] column value.
  536. *
  537. * @return int
  538. */
  539. public function getDbEditedby()
  540. {
  541. return $this->editedby;
  542. }
  543. /**
  544. * Get the [optionally formatted] temporal [mtime] column value.
  545. *
  546. *
  547. * @param string $format The date/time format string (either date()-style or strftime()-style).
  548. * If format is NULL, then the raw DateTime object will be returned.
  549. * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
  550. * @throws PropelException - if unable to parse/validate the date/time value.
  551. */
  552. public function getDbMtime($format = 'Y-m-d H:i:s')
  553. {
  554. if ($this->mtime === null) {
  555. return null;
  556. }
  557. try {
  558. $dt = new DateTime($this->mtime);
  559. } catch (Exception $x) {
  560. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->mtime, true), $x);
  561. }
  562. if ($format === null) {
  563. // Because propel.useDateTimeClass is TRUE, we return a DateTime object.
  564. return $dt;
  565. } elseif (strpos($format, '%') !== false) {
  566. return strftime($format, $dt->format('U'));
  567. } else {
  568. return $dt->format($format);
  569. }
  570. }
  571. /**
  572. * Get the [optionally formatted] temporal [utime] column value.
  573. *
  574. *
  575. * @param string $format The date/time format string (either date()-style or strftime()-style).
  576. * If format is NULL, then the raw DateTime object will be returned.
  577. * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
  578. * @throws PropelException - if unable to parse/validate the date/time value.
  579. */
  580. public function getDbUtime($format = 'Y-m-d H:i:s')
  581. {
  582. if ($this->utime === null) {
  583. return null;
  584. }
  585. try {
  586. $dt = new DateTime($this->utime);
  587. } catch (Exception $x) {
  588. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->utime, true), $x);
  589. }
  590. if ($format === null) {
  591. // Because propel.useDateTimeClass is TRUE, we return a DateTime object.
  592. return $dt;
  593. } elseif (strpos($format, '%') !== false) {
  594. return strftime($format, $dt->format('U'));
  595. } else {
  596. return $dt->format($format);
  597. }
  598. }
  599. /**
  600. * Get the [optionally formatted] temporal [lptime] column value.
  601. *
  602. *
  603. * @param string $format The date/time format string (either date()-style or strftime()-style).
  604. * If format is NULL, then the raw DateTime object will be returned.
  605. * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
  606. * @throws PropelException - if unable to parse/validate the date/time value.
  607. */
  608. public function getDbLPtime($format = 'Y-m-d H:i:s')
  609. {
  610. if ($this->lptime === null) {
  611. return null;
  612. }
  613. try {
  614. $dt = new DateTime($this->lptime);
  615. } catch (Exception $x) {
  616. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->lptime, true), $x);
  617. }
  618. if ($format === null) {
  619. // Because propel.useDateTimeClass is TRUE, we return a DateTime object.
  620. return $dt;
  621. } elseif (strpos($format, '%') !== false) {
  622. return strftime($format, $dt->format('U'));
  623. } else {
  624. return $dt->format($format);
  625. }
  626. }
  627. /**
  628. * Get the [md5] column value.
  629. *
  630. * @return string
  631. */
  632. public function getDbMd5()
  633. {
  634. return $this->md5;
  635. }
  636. /**
  637. * Get the [track_title] column value.
  638. *
  639. * @return string
  640. */
  641. public function getDbTrackTitle()
  642. {
  643. return $this->track_title;
  644. }
  645. /**
  646. * Get the [artist_name] column value.
  647. *
  648. * @return string
  649. */
  650. public function getDbArtistName()
  651. {
  652. return $this->artist_name;
  653. }
  654. /**
  655. * Get the [bit_rate] column value.
  656. *
  657. * @return int
  658. */
  659. public function getDbBitRate()
  660. {
  661. return $this->bit_rate;
  662. }
  663. /**
  664. * Get the [sample_rate] column value.
  665. *
  666. * @return int
  667. */
  668. public function getDbSampleRate()
  669. {
  670. return $this->sample_rate;
  671. }
  672. /**
  673. * Get the [format] column value.
  674. *
  675. * @return string
  676. */
  677. public function getDbFormat()
  678. {
  679. return $this->format;
  680. }
  681. /**
  682. * Get the [length] column value.
  683. *
  684. * @return string
  685. */
  686. public function getDbLength()
  687. {
  688. return $this->length;
  689. }
  690. /**
  691. * Get the [album_title] column value.
  692. *
  693. * @return string
  694. */
  695. public function getDbAlbumTitle()
  696. {
  697. return $this->album_title;
  698. }
  699. /**
  700. * Get the [genre] column value.
  701. *
  702. * @return string
  703. */
  704. public function getDbGenre()
  705. {
  706. return $this->genre;
  707. }
  708. /**
  709. * Get the [comments] column value.
  710. *
  711. * @return string
  712. */
  713. public function getDbComments()
  714. {
  715. return $this->comments;
  716. }
  717. /**
  718. * Get the [year] column value.
  719. *
  720. * @return string
  721. */
  722. public function getDbYear()
  723. {
  724. return $this->year;
  725. }
  726. /**
  727. * Get the [track_number] column value.
  728. *
  729. * @return int
  730. */
  731. public function getDbTrackNumber()
  732. {
  733. return $this->track_number;
  734. }
  735. /**
  736. * Get the [channels] column value.
  737. *
  738. * @return int
  739. */
  740. public function getDbChannels()
  741. {
  742. return $this->channels;
  743. }
  744. /**
  745. * Get the [url] column value.
  746. *
  747. * @return string
  748. */
  749. public function getDbUrl()
  750. {
  751. return $this->url;
  752. }
  753. /**
  754. * Get the [bpm] column value.
  755. *
  756. * @return int
  757. */
  758. public function getDbBpm()
  759. {
  760. return $this->bpm;
  761. }
  762. /**
  763. * Get the [rating] column value.
  764. *
  765. * @return string
  766. */
  767. public function getDbRating()
  768. {
  769. return $this->rating;
  770. }
  771. /**
  772. * Get the [encoded_by] column value.
  773. *
  774. * @return string
  775. */
  776. public function getDbEncodedBy()
  777. {
  778. return $this->encoded_by;
  779. }
  780. /**
  781. * Get the [disc_number] column value.
  782. *
  783. * @return string
  784. */
  785. public function getDbDiscNumber()
  786. {
  787. return $this->disc_number;
  788. }
  789. /**
  790. * Get the [mood] column value.
  791. *
  792. * @return string
  793. */
  794. public function getDbMood()
  795. {
  796. return $this->mood;
  797. }
  798. /**
  799. * Get the [label] column value.
  800. *
  801. * @return string
  802. */
  803. public function getDbLabel()
  804. {
  805. return $this->label;
  806. }
  807. /**
  808. * Get the [composer] column value.
  809. *
  810. * @return string
  811. */
  812. public function getDbComposer()
  813. {
  814. return $this->composer;
  815. }
  816. /**
  817. * Get the [encoder] column value.
  818. *
  819. * @return string
  820. */
  821. public function getDbEncoder()
  822. {
  823. return $this->encoder;
  824. }
  825. /**
  826. * Get the [checksum] column value.
  827. *
  828. * @return string
  829. */
  830. public function getDbChecksum()
  831. {
  832. return $this->checksum;
  833. }
  834. /**
  835. * Get the [lyrics] column value.
  836. *
  837. * @return string
  838. */
  839. public function getDbLyrics()
  840. {
  841. return $this->lyrics;
  842. }
  843. /**
  844. * Get the [orchestra] column value.
  845. *
  846. * @return string
  847. */
  848. public function getDbOrchestra()
  849. {
  850. return $this->orchestra;
  851. }
  852. /**
  853. * Get the [conductor] column value.
  854. *
  855. * @return string
  856. */
  857. public function getDbConductor()
  858. {
  859. return $this->conductor;
  860. }
  861. /**
  862. * Get the [lyricist] column value.
  863. *
  864. * @return string
  865. */
  866. public function getDbLyricist()
  867. {
  868. return $this->lyricist;
  869. }
  870. /**
  871. * Get the [original_lyricist] column value.
  872. *
  873. * @return string
  874. */
  875. public function getDbOriginalLyricist()
  876. {
  877. return $this->original_lyricist;
  878. }
  879. /**
  880. * Get the [radio_station_name] column value.
  881. *
  882. * @return string
  883. */
  884. public function getDbRadioStationName()
  885. {
  886. return $this->radio_station_name;
  887. }
  888. /**
  889. * Get the [info_url] column value.
  890. *
  891. * @return string
  892. */
  893. public function getDbInfoUrl()
  894. {
  895. return $this->info_url;
  896. }
  897. /**
  898. * Get the [artist_url] column value.
  899. *
  900. * @return string
  901. */
  902. public function getDbArtistUrl()
  903. {
  904. return $this->artist_url;
  905. }
  906. /**
  907. * Get the [audio_source_url] column value.
  908. *
  909. * @return string
  910. */
  911. public function getDbAudioSourceUrl()
  912. {
  913. return $this->audio_source_url;
  914. }
  915. /**
  916. * Get the [radio_station_url] column value.
  917. *
  918. * @return string
  919. */
  920. public function getDbRadioStationUrl()
  921. {
  922. return $this->radio_station_url;
  923. }
  924. /**
  925. * Get the [buy_this_url] column value.
  926. *
  927. * @return string
  928. */
  929. public function getDbBuyThisUrl()
  930. {
  931. return $this->buy_this_url;
  932. }
  933. /**
  934. * Get the [isrc_number] column value.
  935. *
  936. * @return string
  937. */
  938. public function getDbIsrcNumber()
  939. {
  940. return $this->isrc_number;
  941. }
  942. /**
  943. * Get the [catalog_number] column value.
  944. *
  945. * @return string
  946. */
  947. public function getDbCatalogNumber()
  948. {
  949. return $this->catalog_number;
  950. }
  951. /**
  952. * Get the [original_artist] column value.
  953. *
  954. * @return string
  955. */
  956. public function getDbOriginalArtist()
  957. {
  958. return $this->original_artist;
  959. }
  960. /**
  961. * Get the [copyright] column value.
  962. *
  963. * @return string
  964. */
  965. public function getDbCopyright()
  966. {
  967. return $this->copyright;
  968. }
  969. /**
  970. * Get the [report_datetime] column value.
  971. *
  972. * @return string
  973. */
  974. public function getDbReportDatetime()
  975. {
  976. return $this->report_datetime;
  977. }
  978. /**
  979. * Get the [report_location] column value.
  980. *
  981. * @return string
  982. */
  983. public function getDbReportLocation()
  984. {
  985. return $this->report_location;
  986. }
  987. /**
  988. * Get the [report_organization] column value.
  989. *
  990. * @return string
  991. */
  992. public function getDbReportOrganization()
  993. {
  994. return $this->report_organization;
  995. }
  996. /**
  997. * Get the [subject] column value.
  998. *
  999. * @return string
  1000. */
  1001. public function getDbSubject()
  1002. {
  1003. return $this->subject;
  1004. }
  1005. /**
  1006. * Get the [contributor] column value.
  1007. *
  1008. * @return string
  1009. */
  1010. public function getDbContributor()
  1011. {
  1012. return $this->contributor;
  1013. }
  1014. /**
  1015. * Get the [language] column value.
  1016. *
  1017. * @return string
  1018. */
  1019. public function getDbLanguage()
  1020. {
  1021. return $this->language;
  1022. }
  1023. /**
  1024. * Get the [file_exists] column value.
  1025. *
  1026. * @return boolean
  1027. */
  1028. public function getDbFileExists()
  1029. {
  1030. return $this->file_exists;
  1031. }
  1032. /**
  1033. * Get the [soundcloud_id] column value.
  1034. *
  1035. * @return int
  1036. */
  1037. public function getDbSoundcloudId()
  1038. {
  1039. return $this->soundcloud_id;
  1040. }
  1041. /**
  1042. * Get the [soundcloud_error_code] column value.
  1043. *
  1044. * @return int
  1045. */
  1046. public function getDbSoundcloudErrorCode()
  1047. {
  1048. return $this->soundcloud_error_code;
  1049. }
  1050. /**
  1051. * Get the [soundcloud_error_msg] column value.
  1052. *
  1053. * @return string
  1054. */
  1055. public function getDbSoundcloudErrorMsg()
  1056. {
  1057. return $this->soundcloud_error_msg;
  1058. }
  1059. /**
  1060. * Get the [soundcloud_link_to_file] column value.
  1061. *
  1062. * @return string
  1063. */
  1064. public function getDbSoundcloudLinkToFile()
  1065. {
  1066. return $this->soundcloud_link_to_file;
  1067. }
  1068. /**
  1069. * Get the [optionally formatted] temporal [soundcloud_upload_time] column value.
  1070. *
  1071. *
  1072. * @param string $format The date/time format string (either date()-style or strftime()-style).
  1073. * If format is NULL, then the raw DateTime object will be returned.
  1074. * @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
  1075. * @throws PropelException - if unable to parse/validate the date/time value.
  1076. */
  1077. public function getDbSoundCloundUploadTime($format = 'Y-m-d H:i:s')
  1078. {
  1079. if ($this->soundcloud_upload_time === null) {
  1080. return null;
  1081. }
  1082. try {
  1083. $dt = new DateTime($this->soundcloud_upload_time);
  1084. } catch (Exception $x) {
  1085. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->soundcloud_upload_time, true), $x);
  1086. }
  1087. if ($format === null) {
  1088. // Because propel.useDateTimeClass is TRUE, we return a DateTime object.
  1089. return $dt;
  1090. } elseif (strpos($format, '%') !== false) {
  1091. return strftime($format, $dt->format('U'));
  1092. } else {
  1093. return $dt->format($format);
  1094. }
  1095. }
  1096. /**
  1097. * Get the [replay_gain] column value.
  1098. *
  1099. * @return string
  1100. */
  1101. public function getDbReplayGain()
  1102. {
  1103. return $this->replay_gain;
  1104. }
  1105. /**
  1106. * Get the [owner_id] column value.
  1107. *
  1108. * @return int
  1109. */
  1110. public function getDbOwnerId()
  1111. {
  1112. return $this->owner_id;
  1113. }
  1114. /**
  1115. * Get the [cuein] column value.
  1116. *
  1117. * @return string
  1118. */
  1119. public function getDbCuein()
  1120. {
  1121. return $this->cuein;
  1122. }
  1123. /**
  1124. * Get the [cueout] column value.
  1125. *
  1126. * @return string
  1127. */
  1128. public function getDbCueout()
  1129. {
  1130. return $this->cueout;
  1131. }
  1132. /**
  1133. * Get the [silan_check] column value.
  1134. *
  1135. * @return boolean
  1136. */
  1137. public function getDbSilanCheck()
  1138. {
  1139. return $this->silan_check;
  1140. }
  1141. /**
  1142. * Get the [hidden] column value.
  1143. *
  1144. * @return boolean
  1145. */
  1146. public function getDbHidden()
  1147. {
  1148. return $this->hidden;
  1149. }
  1150. /**
  1151. * Get the [is_scheduled] column value.
  1152. *
  1153. * @return boolean
  1154. */
  1155. public function getDbIsScheduled()
  1156. {
  1157. return $this->is_scheduled;
  1158. }
  1159. /**
  1160. * Get the [is_playlist] column value.
  1161. *
  1162. * @return boolean
  1163. */
  1164. public function getDbIsPlaylist()
  1165. {
  1166. return $this->is_playlist;
  1167. }
  1168. /**
  1169. * Set the value of [id] column.
  1170. *
  1171. * @param int $v new value
  1172. * @return CcFiles The current object (for fluent API support)
  1173. */
  1174. public function setDbId($v)
  1175. {
  1176. if ($v !== null) {
  1177. $v = (int) $v;
  1178. }
  1179. if ($this->id !== $v) {
  1180. $this->id = $v;
  1181. $this->modifiedColumns[] = CcFilesPeer::ID;
  1182. }
  1183. return $this;
  1184. } // setDbId()
  1185. /**
  1186. * Set the value of [name] column.
  1187. *
  1188. * @param string $v new value
  1189. * @return CcFiles The current object (for fluent API support)
  1190. */
  1191. public function setDbName($v)
  1192. {
  1193. if ($v !== null) {
  1194. $v = (string) $v;
  1195. }
  1196. if ($this->name !== $v || $this->isNew()) {
  1197. $this->name = $v;
  1198. $this->modifiedColumns[] = CcFilesPeer::NAME;
  1199. }
  1200. return $this;
  1201. } // setDbName()
  1202. /**
  1203. * Set the value of [mime] column.
  1204. *
  1205. * @param string $v new value
  1206. * @return CcFiles The current object (for fluent API support)
  1207. */
  1208. public function setDbMime($v)
  1209. {
  1210. if ($v !== null) {
  1211. $v = (string) $v;
  1212. }
  1213. if ($this->mime !== $v || $this->isNew()) {
  1214. $this->mime = $v;
  1215. $this->modifiedColumns[] = CcFilesPeer::MIME;
  1216. }
  1217. return $this;
  1218. } // setDbMime()
  1219. /**
  1220. * Set the value of [ftype] column.
  1221. *
  1222. * @param string $v new value
  1223. * @return CcFiles The current object (for fluent API support)
  1224. */
  1225. public function setDbFtype($v)
  1226. {
  1227. if ($v !== null) {
  1228. $v = (string) $v;
  1229. }
  1230. if ($this->ftype !== $v || $this->isNew()) {
  1231. $this->ftype = $v;
  1232. $this->modifiedColumns[] = CcFilesPeer::FTYPE;
  1233. }
  1234. return $this;
  1235. } // setDbFtype()
  1236. /**
  1237. * Set the value of [directory] column.
  1238. *
  1239. * @param int $v new value
  1240. * @return CcFiles The current object (for fluent API support)
  1241. */
  1242. public function setDbDirectory($v)
  1243. {
  1244. if ($v !== null) {
  1245. $v = (int) $v;
  1246. }
  1247. if ($this->directory !== $v) {
  1248. $this->directory = $v;
  1249. $this->modifiedColumns[] = CcFilesPeer::DIRECTORY;
  1250. }
  1251. if ($this->aCcMusicDirs !== null && $this->aCcMusicDirs->getId() !== $v) {
  1252. $this->aCcMusicDirs = null;
  1253. }
  1254. return $this;
  1255. } // setDbDirectory()
  1256. /**
  1257. * Set the value of [filepath] column.
  1258. *
  1259. * @param string $v new value
  1260. * @return CcFiles The current object (for fluent API support)
  1261. */
  1262. public function setDbFilepath($v)
  1263. {
  1264. if ($v !== null) {
  1265. $v = (string) $v;
  1266. }
  1267. if ($this->filepath !== $v || $this->isNew()) {
  1268. $this->filepath = $v;
  1269. $this->modifiedColumns[] = CcFilesPeer::FILEPATH;
  1270. }
  1271. return $this;
  1272. } // setDbFilepath()
  1273. /**
  1274. * Set the value of [state] column.
  1275. *
  1276. * @param string $v new value
  1277. * @return CcFiles The current object (for fluent API support)
  1278. */
  1279. public function setDbState($v)
  1280. {
  1281. if ($v !== null) {
  1282. $v = (string) $v;
  1283. }
  1284. if ($this->state !== $v || $this->isNew()) {
  1285. $this->state = $v;
  1286. $this->modifiedColumns[] = CcFilesPeer::STATE;
  1287. }
  1288. return $this;
  1289. } // setDbState()
  1290. /**
  1291. * Set the value of [currentlyaccessing] column.
  1292. *
  1293. * @param int $v new value
  1294. * @return CcFiles The current object (for fluent API support)
  1295. */
  1296. public function setDbCurrentlyaccessing($v)
  1297. {
  1298. if ($v !== null) {
  1299. $v = (int) $v;
  1300. }
  1301. if ($this->currentlyaccessing !== $v || $this->isNew()) {
  1302. $this->currentlyaccessing = $v;
  1303. $this->modifiedColumns[] = CcFilesPeer::CURRENTLYACCESSING;
  1304. }
  1305. return $this;
  1306. } // setDbCurrentlyaccessing()
  1307. /**
  1308. * Set the value of [editedby] column.
  1309. *
  1310. * @param int $v new value
  1311. * @return CcFiles The current object (for fluent API support)
  1312. */
  1313. public function setDbEditedby($v)
  1314. {
  1315. if ($v !== null) {
  1316. $v = (int) $v;
  1317. }
  1318. if ($this->editedby !== $v) {
  1319. $this->editedby = $v;
  1320. $this->modifiedColumns[] = CcFilesPeer::EDITEDBY;
  1321. }
  1322. if ($this->aCcSubjsRelatedByDbEditedby !== null && $this->aCcSubjsRelatedByDbEditedby->getDbId() !== $v) {
  1323. $this->aCcSubjsRelatedByDbEditedby = null;
  1324. }
  1325. return $this;
  1326. } // setDbEditedby()
  1327. /**
  1328. * Sets the value of [mtime] column to a normalized version of the date/time value specified.
  1329. *
  1330. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  1331. * be treated as NULL for temporal objects.
  1332. * @return CcFiles The current object (for fluent API support)
  1333. */
  1334. public function setDbMtime($v)
  1335. {
  1336. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  1337. // -- which is unexpected, to say the least.
  1338. if ($v === null || $v === '') {
  1339. $dt = null;
  1340. } elseif ($v instanceof DateTime) {
  1341. $dt = $v;
  1342. } else {
  1343. // some string/numeric value passed; we normalize that so that we can
  1344. // validate it.
  1345. try {
  1346. if (is_numeric($v)) { // if it's a unix timestamp
  1347. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  1348. // We have to explicitly specify and then change the time zone because of a
  1349. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  1350. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  1351. } else {
  1352. $dt = new DateTime($v);
  1353. }
  1354. } catch (Exception $x) {
  1355. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  1356. }
  1357. }
  1358. if ( $this->mtime !== null || $dt !== null ) {
  1359. // (nested ifs are a little easier to read in this case)
  1360. $currNorm = ($this->mtime !== null && $tmpDt = new DateTime($this->mtime)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null;
  1361. $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null;
  1362. if ( ($currNorm !== $newNorm) // normalized values don't match
  1363. )
  1364. {
  1365. $this->mtime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null);
  1366. $this->modifiedColumns[] = CcFilesPeer::MTIME;
  1367. }
  1368. } // if either are not null
  1369. return $this;
  1370. } // setDbMtime()
  1371. /**
  1372. * Sets the value of [utime] column to a normalized version of the date/time value specified.
  1373. *
  1374. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  1375. * be treated as NULL for temporal objects.
  1376. * @return CcFiles The current object (for fluent API support)
  1377. */
  1378. public function setDbUtime($v)
  1379. {
  1380. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  1381. // -- which is unexpected, to say the least.
  1382. if ($v === null || $v === '') {
  1383. $dt = null;
  1384. } elseif ($v instanceof DateTime) {
  1385. $dt = $v;
  1386. } else {
  1387. // some string/numeric value passed; we normalize that so that we can
  1388. // validate it.
  1389. try {
  1390. if (is_numeric($v)) { // if it's a unix timestamp
  1391. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  1392. // We have to explicitly specify and then change the time zone because of a
  1393. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  1394. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  1395. } else {
  1396. $dt = new DateTime($v);
  1397. }
  1398. } catch (Exception $x) {
  1399. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  1400. }
  1401. }
  1402. if ( $this->utime !== null || $dt !== null ) {
  1403. // (nested ifs are a little easier to read in this case)
  1404. $currNorm = ($this->utime !== null && $tmpDt = new DateTime($this->utime)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null;
  1405. $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null;
  1406. if ( ($currNorm !== $newNorm) // normalized values don't match
  1407. )
  1408. {
  1409. $this->utime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null);
  1410. $this->modifiedColumns[] = CcFilesPeer::UTIME;
  1411. }
  1412. } // if either are not null
  1413. return $this;
  1414. } // setDbUtime()
  1415. /**
  1416. * Sets the value of [lptime] column to a normalized version of the date/time value specified.
  1417. *
  1418. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  1419. * be treated as NULL for temporal objects.
  1420. * @return CcFiles The current object (for fluent API support)
  1421. */
  1422. public function setDbLPtime($v)
  1423. {
  1424. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  1425. // -- which is unexpected, to say the least.
  1426. if ($v === null || $v === '') {
  1427. $dt = null;
  1428. } elseif ($v instanceof DateTime) {
  1429. $dt = $v;
  1430. } else {
  1431. // some string/numeric value passed; we normalize that so that we can
  1432. // validate it.
  1433. try {
  1434. if (is_numeric($v)) { // if it's a unix timestamp
  1435. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  1436. // We have to explicitly specify and then change the time zone because of a
  1437. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  1438. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  1439. } else {
  1440. $dt = new DateTime($v);
  1441. }
  1442. } catch (Exception $x) {
  1443. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  1444. }
  1445. }
  1446. if ( $this->lptime !== null || $dt !== null ) {
  1447. // (nested ifs are a little easier to read in this case)
  1448. $currNorm = ($this->lptime !== null && $tmpDt = new DateTime($this->lptime)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null;
  1449. $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null;
  1450. if ( ($currNorm !== $newNorm) // normalized values don't match
  1451. )
  1452. {
  1453. $this->lptime = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null);
  1454. $this->modifiedColumns[] = CcFilesPeer::LPTIME;
  1455. }
  1456. } // if either are not null
  1457. return $this;
  1458. } // setDbLPtime()
  1459. /**
  1460. * Set the value of [md5] column.
  1461. *
  1462. * @param string $v new value
  1463. * @return CcFiles The current object (for fluent API support)
  1464. */
  1465. public function setDbMd5($v)
  1466. {
  1467. if ($v !== null) {
  1468. $v = (string) $v;
  1469. }
  1470. if ($this->md5 !== $v) {
  1471. $this->md5 = $v;
  1472. $this->modifiedColumns[] = CcFilesPeer::MD5;
  1473. }
  1474. return $this;
  1475. } // setDbMd5()
  1476. /**
  1477. * Set the value of [track_title] column.
  1478. *
  1479. * @param string $v new value
  1480. * @return CcFiles The current object (for fluent API support)
  1481. */
  1482. public function setDbTrackTitle($v)
  1483. {
  1484. if ($v !== null) {
  1485. $v = (string) $v;
  1486. }
  1487. if ($this->track_title !== $v) {
  1488. $this->track_title = $v;
  1489. $this->modifiedColumns[] = CcFilesPeer::TRACK_TITLE;
  1490. }
  1491. return $this;
  1492. } // setDbTrackTitle()
  1493. /**
  1494. * Set the value of [artist_name] column.
  1495. *
  1496. * @param string $v new value
  1497. * @return CcFiles The current object (for fluent API support)
  1498. */
  1499. public function setDbArtistName($v)
  1500. {
  1501. if ($v !== null) {
  1502. $v = (string) $v;
  1503. }
  1504. if ($this->artist_name !== $v) {
  1505. $this->artist_name = $v;
  1506. $this->modifiedColumns[] = CcFilesPeer::ARTIST_NAME;
  1507. }
  1508. return $this;
  1509. } // setDbArtistName()
  1510. /**
  1511. * Set the value of [bit_rate] column.
  1512. *
  1513. * @param int $v new value
  1514. * @return CcFiles The current object (for fluent API support)
  1515. */
  1516. public function setDbBitRate($v)
  1517. {
  1518. if ($v !== null) {
  1519. $v = (int) $v;
  1520. }
  1521. if ($this->bit_rate !== $v) {
  1522. $this->bit_rate = $v;
  1523. $this->modifiedColumns[] = CcFilesPeer::BIT_RATE;
  1524. }
  1525. return $this;
  1526. } // setDbBitRate()
  1527. /**
  1528. * Set the value of [sample_rate] column.
  1529. *
  1530. * @param int $v new value
  1531. * @return CcFiles The current object (for fluent API support)
  1532. */
  1533. public function setDbSampleRate($v)
  1534. {
  1535. if ($v !== null) {
  1536. $v = (int) $v;
  1537. }
  1538. if ($this->sample_rate !== $v) {
  1539. $this->sample_rate = $v;
  1540. $this->modifiedColumns[] = CcFilesPeer::SAMPLE_RATE;
  1541. }
  1542. return $this;
  1543. } // setDbSampleRate()
  1544. /**
  1545. * Set the value of [format] column.
  1546. *
  1547. * @param string $v new value
  1548. * @return CcFiles The current object (for fluent API support)
  1549. */
  1550. public function setDbFormat($v)
  1551. {
  1552. if ($v !== null) {
  1553. $v = (string) $v;
  1554. }
  1555. if ($this->format !== $v) {
  1556. $this->format = $v;
  1557. $this->modifiedColumns[] = CcFilesPeer::FORMAT;
  1558. }
  1559. return $this;
  1560. } // setDbFormat()
  1561. /**
  1562. * Set the value of [length] column.
  1563. *
  1564. * @param string $v new value
  1565. * @return CcFiles The current object (for fluent API support)
  1566. */
  1567. public function setDbLength($v)
  1568. {
  1569. if ($v !== null) {
  1570. $v = (string) $v;
  1571. }
  1572. if ($this->length !== $v || $this->isNew()) {
  1573. $this->length = $v;
  1574. $this->modifiedColumns[] = CcFilesPeer::LENGTH;
  1575. }
  1576. return $this;
  1577. } // setDbLength()
  1578. /**
  1579. * Set the value of [album_title] column.
  1580. *
  1581. * @param string $v new value
  1582. * @return CcFiles The current object (for fluent API support)
  1583. */
  1584. public function setDbAlbumTitle($v)
  1585. {
  1586. if ($v !== null) {
  1587. $v = (string) $v;
  1588. }
  1589. if ($this->album_title !== $v) {
  1590. $this->album_title = $v;
  1591. $this->modifiedColumns[] = CcFilesPeer::ALBUM_TITLE;
  1592. }
  1593. return $this;
  1594. } // setDbAlbumTitle()
  1595. /**
  1596. * Set the value of [genre] column.
  1597. *
  1598. * @param string $v new value
  1599. * @return CcFiles The current object (for fluent API support)
  1600. */
  1601. public function setDbGenre($v)
  1602. {
  1603. if ($v !== null) {
  1604. $v = (string) $v;
  1605. }
  1606. if ($this->genre !== $v) {
  1607. $this->genre = $v;
  1608. $this->modifiedColumns[] = CcFilesPeer::GENRE;
  1609. }
  1610. return $this;
  1611. } // setDbGenre()
  1612. /**
  1613. * Set the value of [comments] column.
  1614. *
  1615. * @param string $v new value
  1616. * @return CcFiles The current object (for fluent API support)
  1617. */
  1618. public function setDbComments($v)
  1619. {
  1620. if ($v !== null) {
  1621. $v = (string) $v;
  1622. }
  1623. if ($this->comments !== $v) {
  1624. $this->comments = $v;
  1625. $this->modifiedColumns[] = CcFilesPeer::COMMENTS;
  1626. }
  1627. return $this;
  1628. } // setDbComments()
  1629. /**
  1630. * Set the value of [year] column.
  1631. *
  1632. * @param string $v new value
  1633. * @return CcFiles The current object (for fluent API support)
  1634. */
  1635. public function setDbYear($v)
  1636. {
  1637. if ($v !== null) {
  1638. $v = (string) $v;
  1639. }
  1640. if ($this->year !== $v) {
  1641. $this->year = $v;
  1642. $this->modifiedColumns[] = CcFilesPeer::YEAR;
  1643. }
  1644. return $this;
  1645. } // setDbYear()
  1646. /**
  1647. * Set the value of [track_number] column.
  1648. *
  1649. * @param int $v new value
  1650. * @return CcFiles The current object (for fluent API support)
  1651. */
  1652. public function setDbTrackNumber($v)
  1653. {
  1654. if ($v !== null) {
  1655. $v = (int) $v;
  1656. }
  1657. if ($this->track_number !== $v) {
  1658. $this->track_number = $v;
  1659. $this->modifiedColumns[] = CcFilesPeer::TRACK_NUMBER;
  1660. }
  1661. return $this;
  1662. } // setDbTrackNumber()
  1663. /**
  1664. * Set the value of [channels] column.
  1665. *
  1666. * @param int $v new value
  1667. * @return CcFiles The current object (for fluent API support)
  1668. */
  1669. public function setDbChannels($v)
  1670. {
  1671. if ($v !== null) {
  1672. $v = (int) $v;
  1673. }
  1674. if ($this->channels !== $v) {
  1675. $this->channels = $v;
  1676. $this->modifiedColumns[] = CcFilesPeer::CHANNELS;
  1677. }
  1678. return $this;
  1679. } // setDbChannels()
  1680. /**
  1681. * Set the value of [url] column.
  1682. *
  1683. * @param string $v new value
  1684. * @return CcFiles The current object (for fluent API support)
  1685. */
  1686. public function setDbUrl($v)
  1687. {
  1688. if ($v !== null) {
  1689. $v = (string) $v;
  1690. }
  1691. if ($this->url !== $v) {
  1692. $this->url = $v;
  1693. $this->modifiedColumns[] = CcFilesPeer::URL;
  1694. }
  1695. return $this;
  1696. } // setDbUrl()
  1697. /**
  1698. * Set the value of [bpm] column.
  1699. *
  1700. * @param int $v new value
  1701. * @return CcFiles The current object (for fluent API support)
  1702. */
  1703. public function setDbBpm($v)
  1704. {
  1705. if ($v !== null) {
  1706. $v = (int) $v;
  1707. }
  1708. if ($this->bpm !== $v) {
  1709. $this->bpm = $v;
  1710. $this->modifiedColumns[] = CcFilesPeer::BPM;
  1711. }
  1712. return $this;
  1713. } // setDbBpm()
  1714. /**
  1715. * Set the value of [rating] column.
  1716. *
  1717. * @param string $v new value
  1718. * @return CcFiles The current object (for fluent API support)
  1719. */
  1720. public function setDbRating($v)
  1721. {
  1722. if ($v !== null) {
  1723. $v = (string) $v;
  1724. }
  1725. if ($this->rating !== $v) {
  1726. $this->rating = $v;
  1727. $this->modifiedColumns[] = CcFilesPeer::RATING;
  1728. }
  1729. return $this;
  1730. } // setDbRating()
  1731. /**
  1732. * Set the value of [encoded_by] column.
  1733. *
  1734. * @param string $v new value
  1735. * @return CcFiles The current object (for fluent API support)
  1736. */
  1737. public function setDbEncodedBy($v)
  1738. {
  1739. if ($v !== null) {
  1740. $v = (string) $v;
  1741. }
  1742. if ($this->encoded_by !== $v) {
  1743. $this->encoded_by = $v;
  1744. $this->modifiedColumns[] = CcFilesPeer::ENCODED_BY;
  1745. }
  1746. return $this;
  1747. } // setDbEncodedBy()
  1748. /**
  1749. * Set the value of [disc_number] column.
  1750. *
  1751. * @param string $v new value
  1752. * @return CcFiles The current object (for fluent API support)
  1753. */
  1754. public function setDbDiscNumber($v)
  1755. {
  1756. if ($v !== null) {
  1757. $v = (string) $v;
  1758. }
  1759. if ($this->disc_number !== $v) {
  1760. $this->disc_number = $v;
  1761. $this->modifiedColumns[] = CcFilesPeer::DISC_NUMBER;
  1762. }
  1763. return $this;
  1764. } // setDbDiscNumber()
  1765. /**
  1766. * Set the value of [mood] column.
  1767. *
  1768. * @param string $v new value
  1769. * @return CcFiles The current object (for fluent API support)
  1770. */
  1771. public function setDbMood($v)
  1772. {
  1773. if ($v !== null) {
  1774. $v = (string) $v;
  1775. }
  1776. if ($this->mood !== $v) {
  1777. $this->mood = $v;
  1778. $this->modifiedColumns[] = CcFilesPeer::MOOD;
  1779. }
  1780. return $this;
  1781. } // setDbMood()
  1782. /**
  1783. * Set the value of [label] column.
  1784. *
  1785. * @param string $v new value
  1786. * @return CcFiles The current object (for fluent API support)
  1787. */
  1788. public function setDbLabel($v)
  1789. {
  1790. if ($v !== null) {
  1791. $v = (string) $v;
  1792. }
  1793. if ($this->label !== $v) {
  1794. $this->label = $v;
  1795. $this->modifiedColumns[] = CcFilesPeer::LABEL;
  1796. }
  1797. return $this;
  1798. } // setDbLabel()
  1799. /**
  1800. * Set the value of [composer] column.
  1801. *
  1802. * @param string $v new value
  1803. * @return CcFiles The current object (for fluent API support)
  1804. */
  1805. public function setDbComposer($v)
  1806. {
  1807. if ($v !== null) {
  1808. $v = (string) $v;
  1809. }
  1810. if ($this->composer !== $v) {
  1811. $this->composer = $v;
  1812. $this->modifiedColumns[] = CcFilesPeer::COMPOSER;
  1813. }
  1814. return $this;
  1815. } // setDbComposer()
  1816. /**
  1817. * Set the value of [encoder] column.
  1818. *
  1819. * @param string $v new value
  1820. * @return CcFiles The current object (for fluent API support)
  1821. */
  1822. public function setDbEncoder($v)
  1823. {
  1824. if ($v !== null) {
  1825. $v = (string) $v;
  1826. }
  1827. if ($this->encoder !== $v) {
  1828. $this->encoder = $v;
  1829. $this->modifiedColumns[] = CcFilesPeer::ENCODER;
  1830. }
  1831. return $this;
  1832. } // setDbEncoder()
  1833. /**
  1834. * Set the value of [checksum] column.
  1835. *
  1836. * @param string $v new value
  1837. * @return CcFiles The current object (for fluent API support)
  1838. */
  1839. public function setDbChecksum($v)
  1840. {
  1841. if ($v !== null) {
  1842. $v = (string) $v;
  1843. }
  1844. if ($this->checksum !== $v) {
  1845. $this->checksum = $v;
  1846. $this->modifiedColumns[] = CcFilesPeer::CHECKSUM;
  1847. }
  1848. return $this;
  1849. } // setDbChecksum()
  1850. /**
  1851. * Set the value of [lyrics] column.
  1852. *
  1853. * @param string $v new value
  1854. * @return CcFiles The current object (for fluent API support)
  1855. */
  1856. public function setDbLyrics($v)
  1857. {
  1858. if ($v !== null) {
  1859. $v = (string) $v;
  1860. }
  1861. if ($this->lyrics !== $v) {
  1862. $this->lyrics = $v;
  1863. $this->modifiedColumns[] = CcFilesPeer::LYRICS;
  1864. }
  1865. return $this;
  1866. } // setDbLyrics()
  1867. /**
  1868. * Set the value of [orchestra] column.
  1869. *
  1870. * @param string $v new value
  1871. * @return CcFiles The current object (for fluent API support)
  1872. */
  1873. public function setDbOrchestra($v)
  1874. {
  1875. if ($v !== null) {
  1876. $v = (string) $v;
  1877. }
  1878. if ($this->orchestra !== $v) {
  1879. $this->orchestra = $v;
  1880. $this->modifiedColumns[] = CcFilesPeer::ORCHESTRA;
  1881. }
  1882. return $this;
  1883. } // setDbOrchestra()
  1884. /**
  1885. * Set the value of [conductor] column.
  1886. *
  1887. * @param string $v new value
  1888. * @return CcFiles The current object (for fluent API support)
  1889. */
  1890. public function setDbConductor($v)
  1891. {
  1892. if ($v !== null) {
  1893. $v = (string) $v;
  1894. }
  1895. if ($this->conductor !== $v) {
  1896. $this->conductor = $v;
  1897. $this->modifiedColumns[] = CcFilesPeer::CONDUCTOR;
  1898. }
  1899. return $this;
  1900. } // setDbConductor()
  1901. /**
  1902. * Set the value of [lyricist] column.
  1903. *
  1904. * @param string $v new value
  1905. * @return CcFiles The current object (for fluent API support)
  1906. */
  1907. public function setDbLyricist($v)
  1908. {
  1909. if ($v !== null) {
  1910. $v = (string) $v;
  1911. }
  1912. if ($this->lyricist !== $v) {
  1913. $this->lyricist = $v;
  1914. $this->modifiedColumns[] = CcFilesPeer::LYRICIST;
  1915. }
  1916. return $this;
  1917. } // setDbLyricist()
  1918. /**
  1919. * Set the value of [original_lyricist] column.
  1920. *
  1921. * @param string $v new value
  1922. * @return CcFiles The current object (for fluent API support)
  1923. */
  1924. public function setDbOriginalLyricist($v)
  1925. {
  1926. if ($v !== null) {
  1927. $v = (string) $v;
  1928. }
  1929. if ($this->original_lyricist !== $v) {
  1930. $this->original_lyricist = $v;
  1931. $this->modifiedColumns[] = CcFilesPeer::ORIGINAL_LYRICIST;
  1932. }
  1933. return $this;
  1934. } // setDbOriginalLyricist()
  1935. /**
  1936. * Set the value of [radio_station_name] column.
  1937. *
  1938. * @param string $v new value
  1939. * @return CcFiles The current object (for fluent API support)
  1940. */
  1941. public function setDbRadioStationName($v)
  1942. {
  1943. if ($v !== null) {
  1944. $v = (string) $v;
  1945. }
  1946. if ($this->radio_station_name !== $v) {
  1947. $this->radio_station_name = $v;
  1948. $this->modifiedColumns[] = CcFilesPeer::RADIO_STATION_NAME;
  1949. }
  1950. return $this;
  1951. } // setDbRadioStationName()
  1952. /**
  1953. * Set the value of [info_url] column.
  1954. *
  1955. * @param string $v new value
  1956. * @return CcFiles The current object (for fluent API support)
  1957. */
  1958. public function setDbInfoUrl($v)
  1959. {
  1960. if ($v !== null) {
  1961. $v = (string) $v;
  1962. }
  1963. if ($this->info_url !== $v) {
  1964. $this->info_url = $v;
  1965. $this->modifiedColumns[] = CcFilesPeer::INFO_URL;
  1966. }
  1967. return $this;
  1968. } // setDbInfoUrl()
  1969. /**
  1970. * Set the value of [artist_url] column.
  1971. *
  1972. * @param string $v new value
  1973. * @return CcFiles The current object (for fluent API support)
  1974. */
  1975. public function setDbArtistUrl($v)
  1976. {
  1977. if ($v !== null) {
  1978. $v = (string) $v;
  1979. }
  1980. if ($this->artist_url !== $v) {
  1981. $this->artist_url = $v;
  1982. $this->modifiedColumns[] = CcFilesPeer::ARTIST_URL;
  1983. }
  1984. return $this;
  1985. } // setDbArtistUrl()
  1986. /**
  1987. * Set the value of [audio_source_url] column.
  1988. *
  1989. * @param string $v new value
  1990. * @return CcFiles The current object (for fluent API support)
  1991. */
  1992. public function setDbAudioSourceUrl($v)
  1993. {
  1994. if ($v !== null) {
  1995. $v = (string) $v;
  1996. }
  1997. if ($this->audio_source_url !== $v) {
  1998. $this->audio_source_url = $v;
  1999. $this->modifiedColumns[] = CcFilesPeer::AUDIO_SOURCE_URL;
  2000. }
  2001. return $this;
  2002. } // setDbAudioSourceUrl()
  2003. /**
  2004. * Set the value of [radio_station_url] column.
  2005. *
  2006. * @param string $v new value
  2007. * @return CcFiles The current object (for fluent API support)
  2008. */
  2009. public function setDbRadioStationUrl($v)
  2010. {
  2011. if ($v !== null) {
  2012. $v = (string) $v;
  2013. }
  2014. if ($this->radio_station_url !== $v) {
  2015. $this->radio_station_url = $v;
  2016. $this->modifiedColumns[] = CcFilesPeer::RADIO_STATION_URL;
  2017. }
  2018. return $this;
  2019. } // setDbRadioStationUrl()
  2020. /**
  2021. * Set the value of [buy_this_url] column.
  2022. *
  2023. * @param string $v new value
  2024. * @return CcFiles The current object (for fluent API support)
  2025. */
  2026. public function setDbBuyThisUrl($v)
  2027. {
  2028. if ($v !== null) {
  2029. $v = (string) $v;
  2030. }
  2031. if ($this->buy_this_url !== $v) {
  2032. $this->buy_this_url = $v;
  2033. $this->modifiedColumns[] = CcFilesPeer::BUY_THIS_URL;
  2034. }
  2035. return $this;
  2036. } // setDbBuyThisUrl()
  2037. /**
  2038. * Set the value of [isrc_number] column.
  2039. *
  2040. * @param string $v new value
  2041. * @return CcFiles The current object (for fluent API support)
  2042. */
  2043. public function setDbIsrcNumber($v)
  2044. {
  2045. if ($v !== null) {
  2046. $v = (string) $v;
  2047. }
  2048. if ($this->isrc_number !== $v) {
  2049. $this->isrc_number = $v;
  2050. $this->modifiedColumns[] = CcFilesPeer::ISRC_NUMBER;
  2051. }
  2052. return $this;
  2053. } // setDbIsrcNumber()
  2054. /**
  2055. * Set the value of [catalog_number] column.
  2056. *
  2057. * @param string $v new value
  2058. * @return CcFiles The current object (for fluent API support)
  2059. */
  2060. public function setDbCatalogNumber($v)
  2061. {
  2062. if ($v !== null) {
  2063. $v = (string) $v;
  2064. }
  2065. if ($this->catalog_number !== $v) {
  2066. $this->catalog_number = $v;
  2067. $this->modifiedColumns[] = CcFilesPeer::CATALOG_NUMBER;
  2068. }
  2069. return $this;
  2070. } // setDbCatalogNumber()
  2071. /**
  2072. * Set the value of [original_artist] column.
  2073. *
  2074. * @param string $v new value
  2075. * @return CcFiles The current object (for fluent API support)
  2076. */
  2077. public function setDbOriginalArtist($v)
  2078. {
  2079. if ($v !== null) {
  2080. $v = (string) $v;
  2081. }
  2082. if ($this->original_artist !== $v) {
  2083. $this->original_artist = $v;
  2084. $this->modifiedColumns[] = CcFilesPeer::ORIGINAL_ARTIST;
  2085. }
  2086. return $this;
  2087. } // setDbOriginalArtist()
  2088. /**
  2089. * Set the value of [copyright] column.
  2090. *
  2091. * @param string $v new value
  2092. * @return CcFiles The current object (for fluent API support)
  2093. */
  2094. public function setDbCopyright($v)
  2095. {
  2096. if ($v !== null) {
  2097. $v = (string) $v;
  2098. }
  2099. if ($this->copyright !== $v) {
  2100. $this->copyright = $v;
  2101. $this->modifiedColumns[] = CcFilesPeer::COPYRIGHT;
  2102. }
  2103. return $this;
  2104. } // setDbCopyright()
  2105. /**
  2106. * Set the value of [report_datetime] column.
  2107. *
  2108. * @param string $v new value
  2109. * @return CcFiles The current object (for fluent API support)
  2110. */
  2111. public function setDbReportDatetime($v)
  2112. {
  2113. if ($v !== null) {
  2114. $v = (string) $v;
  2115. }
  2116. if ($this->report_datetime !== $v) {
  2117. $this->report_datetime = $v;
  2118. $this->modifiedColumns[] = CcFilesPeer::REPORT_DATETIME;
  2119. }
  2120. return $this;
  2121. } // setDbReportDatetime()
  2122. /**
  2123. * Set the value of [report_location] column.
  2124. *
  2125. * @param string $v new value
  2126. * @return CcFiles The current object (for fluent API support)
  2127. */
  2128. public function setDbReportLocation($v)
  2129. {
  2130. if ($v !== null) {
  2131. $v = (string) $v;
  2132. }
  2133. if ($this->report_location !== $v) {
  2134. $this->report_location = $v;
  2135. $this->modifiedColumns[] = CcFilesPeer::REPORT_LOCATION;
  2136. }
  2137. return $this;
  2138. } // setDbReportLocation()
  2139. /**
  2140. * Set the value of [report_organization] column.
  2141. *
  2142. * @param string $v new value
  2143. * @return CcFiles The current object (for fluent API support)
  2144. */
  2145. public function setDbReportOrganization($v)
  2146. {
  2147. if ($v !== null) {
  2148. $v = (string) $v;
  2149. }
  2150. if ($this->report_organization !== $v) {
  2151. $this->report_organization = $v;
  2152. $this->modifiedColumns[] = CcFilesPeer::REPORT_ORGANIZATION;
  2153. }
  2154. return $this;
  2155. } // setDbReportOrganization()
  2156. /**
  2157. * Set the value of [subject] column.
  2158. *
  2159. * @param string $v new value
  2160. * @return CcFiles The current object (for fluent API support)
  2161. */
  2162. public function setDbSubject($v)
  2163. {
  2164. if ($v !== null) {
  2165. $v = (string) $v;
  2166. }
  2167. if ($this->subject !== $v) {
  2168. $this->subject = $v;
  2169. $this->modifiedColumns[] = CcFilesPeer::SUBJECT;
  2170. }
  2171. return $this;
  2172. } // setDbSubject()
  2173. /**
  2174. * Set the value of [contributor] column.
  2175. *
  2176. * @param string $v new value
  2177. * @return CcFiles The current object (for fluent API support)
  2178. */
  2179. public function setDbContributor($v)
  2180. {
  2181. if ($v !== null) {
  2182. $v = (string) $v;
  2183. }
  2184. if ($this->contributor !== $v) {
  2185. $this->contributor = $v;
  2186. $this->modifiedColumns[] = CcFilesPeer::CONTRIBUTOR;
  2187. }
  2188. return $this;
  2189. } // setDbContributor()
  2190. /**
  2191. * Set the value of [language] column.
  2192. *
  2193. * @param string $v new value
  2194. * @return CcFiles The current object (for fluent API support)
  2195. */
  2196. public function setDbLanguage($v)
  2197. {
  2198. if ($v !== null) {
  2199. $v = (string) $v;
  2200. }
  2201. if ($this->language !== $v) {
  2202. $this->language = $v;
  2203. $this->modifiedColumns[] = CcFilesPeer::LANGUAGE;
  2204. }
  2205. return $this;
  2206. } // setDbLanguage()
  2207. /**
  2208. * Set the value of [file_exists] column.
  2209. *
  2210. * @param boolean $v new value
  2211. * @return CcFiles The current object (for fluent API support)
  2212. */
  2213. public function setDbFileExists($v)
  2214. {
  2215. if ($v !== null) {
  2216. $v = (boolean) $v;
  2217. }
  2218. if ($this->file_exists !== $v || $this->isNew()) {
  2219. $this->file_exists = $v;
  2220. $this->modifiedColumns[] = CcFilesPeer::FILE_EXISTS;
  2221. }
  2222. return $this;
  2223. } // setDbFileExists()
  2224. /**
  2225. * Set the value of [soundcloud_id] column.
  2226. *
  2227. * @param int $v new value
  2228. * @return CcFiles The current object (for fluent API support)
  2229. */
  2230. public function setDbSoundcloudId($v)
  2231. {
  2232. if ($v !== null) {
  2233. $v = (int) $v;
  2234. }
  2235. if ($this->soundcloud_id !== $v) {
  2236. $this->soundcloud_id = $v;
  2237. $this->modifiedColumns[] = CcFilesPeer::SOUNDCLOUD_ID;
  2238. }
  2239. return $this;
  2240. } // setDbSoundcloudId()
  2241. /**
  2242. * Set the value of [soundcloud_error_code] column.
  2243. *
  2244. * @param int $v new value
  2245. * @return CcFiles The current object (for fluent API support)
  2246. */
  2247. public function setDbSoundcloudErrorCode($v)
  2248. {
  2249. if ($v !== null) {
  2250. $v = (int) $v;
  2251. }
  2252. if ($this->soundcloud_error_code !== $v) {
  2253. $this->soundcloud_error_code = $v;
  2254. $this->modifiedColumns[] = CcFilesPeer::SOUNDCLOUD_ERROR_CODE;
  2255. }
  2256. return $this;
  2257. } // setDbSoundcloudErrorCode()
  2258. /**
  2259. * Set the value of [soundcloud_error_msg] column.
  2260. *
  2261. * @param string $v new value
  2262. * @return CcFiles The current object (for fluent API support)
  2263. */
  2264. public function setDbSoundcloudErrorMsg($v)
  2265. {
  2266. if ($v !== null) {
  2267. $v = (string) $v;
  2268. }
  2269. if ($this->soundcloud_error_msg !== $v) {
  2270. $this->soundcloud_error_msg = $v;
  2271. $this->modifiedColumns[] = CcFilesPeer::SOUNDCLOUD_ERROR_MSG;
  2272. }
  2273. return $this;
  2274. } // setDbSoundcloudErrorMsg()
  2275. /**
  2276. * Set the value of [soundcloud_link_to_file] column.
  2277. *
  2278. * @param string $v new value
  2279. * @return CcFiles The current object (for fluent API support)
  2280. */
  2281. public function setDbSoundcloudLinkToFile($v)
  2282. {
  2283. if ($v !== null) {
  2284. $v = (string) $v;
  2285. }
  2286. if ($this->soundcloud_link_to_file !== $v) {
  2287. $this->soundcloud_link_to_file = $v;
  2288. $this->modifiedColumns[] = CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE;
  2289. }
  2290. return $this;
  2291. } // setDbSoundcloudLinkToFile()
  2292. /**
  2293. * Sets the value of [soundcloud_upload_time] column to a normalized version of the date/time value specified.
  2294. *
  2295. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  2296. * be treated as NULL for temporal objects.
  2297. * @return CcFiles The current object (for fluent API support)
  2298. */
  2299. public function setDbSoundCloundUploadTime($v)
  2300. {
  2301. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  2302. // -- which is unexpected, to say the least.
  2303. if ($v === null || $v === '') {
  2304. $dt = null;
  2305. } elseif ($v instanceof DateTime) {
  2306. $dt = $v;
  2307. } else {
  2308. // some string/numeric value passed; we normalize that so that we can
  2309. // validate it.
  2310. try {
  2311. if (is_numeric($v)) { // if it's a unix timestamp
  2312. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  2313. // We have to explicitly specify and then change the time zone because of a
  2314. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  2315. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  2316. } else {
  2317. $dt = new DateTime($v);
  2318. }
  2319. } catch (Exception $x) {
  2320. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  2321. }
  2322. }
  2323. if ( $this->soundcloud_upload_time !== null || $dt !== null ) {
  2324. // (nested ifs are a little easier to read in this case)
  2325. $currNorm = ($this->soundcloud_upload_time !== null && $tmpDt = new DateTime($this->soundcloud_upload_time)) ? $tmpDt->format('Y-m-d\\TH:i:sO') : null;
  2326. $newNorm = ($dt !== null) ? $dt->format('Y-m-d\\TH:i:sO') : null;
  2327. if ( ($currNorm !== $newNorm) // normalized values don't match
  2328. )
  2329. {
  2330. $this->soundcloud_upload_time = ($dt ? $dt->format('Y-m-d\\TH:i:sO') : null);
  2331. $this->modifiedColumns[] = CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME;
  2332. }
  2333. } // if either are not null
  2334. return $this;
  2335. } // setDbSoundCloundUploadTime()
  2336. /**
  2337. * Set the value of [replay_gain] column.
  2338. *
  2339. * @param string $v new value
  2340. * @return CcFiles The current object (for fluent API support)
  2341. */
  2342. public function setDbReplayGain($v)
  2343. {
  2344. if ($v !== null) {
  2345. $v = (string) $v;
  2346. }
  2347. if ($this->replay_gain !== $v) {
  2348. $this->replay_gain = $v;
  2349. $this->modifiedColumns[] = CcFilesPeer::REPLAY_GAIN;
  2350. }
  2351. return $this;
  2352. } // setDbReplayGain()
  2353. /**
  2354. * Set the value of [owner_id] column.
  2355. *
  2356. * @param int $v new value
  2357. * @return CcFiles The current object (for fluent API support)
  2358. */
  2359. public function setDbOwnerId($v)
  2360. {
  2361. if ($v !== null) {
  2362. $v = (int) $v;
  2363. }
  2364. if ($this->owner_id !== $v) {
  2365. $this->owner_id = $v;
  2366. $this->modifiedColumns[] = CcFilesPeer::OWNER_ID;
  2367. }
  2368. if ($this->aFkOwner !== null && $this->aFkOwner->getDbId() !== $v) {
  2369. $this->aFkOwner = null;
  2370. }
  2371. return $this;
  2372. } // setDbOwnerId()
  2373. /**
  2374. * Set the value of [cuein] column.
  2375. *
  2376. * @param string $v new value
  2377. * @return CcFiles The current object (for fluent API support)
  2378. */
  2379. public function setDbCuein($v)
  2380. {
  2381. if ($v !== null) {
  2382. $v = (string) $v;
  2383. }
  2384. if ($this->cuein !== $v || $this->isNew()) {
  2385. $this->cuein = $v;
  2386. $this->modifiedColumns[] = CcFilesPeer::CUEIN;
  2387. }
  2388. return $this;
  2389. } // setDbCuein()
  2390. /**
  2391. * Set the value of [cueout] column.
  2392. *
  2393. * @param string $v new value
  2394. * @return CcFiles The current object (for fluent API support)
  2395. */
  2396. public function setDbCueout($v)
  2397. {
  2398. if ($v !== null) {
  2399. $v = (string) $v;
  2400. }
  2401. if ($this->cueout !== $v || $this->isNew()) {
  2402. $this->cueout = $v;
  2403. $this->modifiedColumns[] = CcFilesPeer::CUEOUT;
  2404. }
  2405. return $this;
  2406. } // setDbCueout()
  2407. /**
  2408. * Set the value of [silan_check] column.
  2409. *
  2410. * @param boolean $v new value
  2411. * @return CcFiles The current object (for fluent API support)
  2412. */
  2413. public function setDbSilanCheck($v)
  2414. {
  2415. if ($v !== null) {
  2416. $v = (boolean) $v;
  2417. }
  2418. if ($this->silan_check !== $v || $this->isNew()) {
  2419. $this->silan_check = $v;
  2420. $this->modifiedColumns[] = CcFilesPeer::SILAN_CHECK;
  2421. }
  2422. return $this;
  2423. } // setDbSilanCheck()
  2424. /**
  2425. * Set the value of [hidden] column.
  2426. *
  2427. * @param boolean $v new value
  2428. * @return CcFiles The current object (for fluent API support)
  2429. */
  2430. public function setDbHidden($v)
  2431. {
  2432. if ($v !== null) {
  2433. $v = (boolean) $v;
  2434. }
  2435. if ($this->hidden !== $v || $this->isNew()) {
  2436. $this->hidden = $v;
  2437. $this->modifiedColumns[] = CcFilesPeer::HIDDEN;
  2438. }
  2439. return $this;
  2440. } // setDbHidden()
  2441. /**
  2442. * Set the value of [is_scheduled] column.
  2443. *
  2444. * @param boolean $v new value
  2445. * @return CcFiles The current object (for fluent API support)
  2446. */
  2447. public function setDbIsScheduled($v)
  2448. {
  2449. if ($v !== null) {
  2450. $v = (boolean) $v;
  2451. }
  2452. if ($this->is_scheduled !== $v || $this->isNew()) {
  2453. $this->is_scheduled = $v;
  2454. $this->modifiedColumns[] = CcFilesPeer::IS_SCHEDULED;
  2455. }
  2456. return $this;
  2457. } // setDbIsScheduled()
  2458. /**
  2459. * Set the value of [is_playlist] column.
  2460. *
  2461. * @param boolean $v new value
  2462. * @return CcFiles The current object (for fluent API support)
  2463. */
  2464. public function setDbIsPlaylist($v)
  2465. {
  2466. if ($v !== null) {
  2467. $v = (boolean) $v;
  2468. }
  2469. if ($this->is_playlist !== $v || $this->isNew()) {
  2470. $this->is_playlist = $v;
  2471. $this->modifiedColumns[] = CcFilesPeer::IS_PLAYLIST;
  2472. }
  2473. return $this;
  2474. } // setDbIsPlaylist()
  2475. /**
  2476. * Indicates whether the columns in this object are only set to default values.
  2477. *
  2478. * This method can be used in conjunction with isModified() to indicate whether an object is both
  2479. * modified _and_ has some values set which are non-default.
  2480. *
  2481. * @return boolean Whether the columns in this object are only been set with default values.
  2482. */
  2483. public function hasOnlyDefaultValues()
  2484. {
  2485. if ($this->name !== '') {
  2486. return false;
  2487. }
  2488. if ($this->mime !== '') {
  2489. return false;
  2490. }
  2491. if ($this->ftype !== '') {
  2492. return false;
  2493. }
  2494. if ($this->filepath !== '') {
  2495. return false;
  2496. }
  2497. if ($this->state !== 'empty') {
  2498. return false;
  2499. }
  2500. if ($this->currentlyaccessing !== 0) {
  2501. return false;
  2502. }
  2503. if ($this->length !== '00:00:00') {
  2504. return false;
  2505. }
  2506. if ($this->file_exists !== true) {
  2507. return false;
  2508. }
  2509. if ($this->cuein !== '00:00:00') {
  2510. return false;
  2511. }
  2512. if ($this->cueout !== '00:00:00') {
  2513. return false;
  2514. }
  2515. if ($this->silan_check !== false) {
  2516. return false;
  2517. }
  2518. if ($this->hidden !== false) {
  2519. return false;
  2520. }
  2521. if ($this->is_scheduled !== false) {
  2522. return false;
  2523. }
  2524. if ($this->is_playlist !== false) {
  2525. return false;
  2526. }
  2527. // otherwise, everything was equal, so return TRUE
  2528. return true;
  2529. } // hasOnlyDefaultValues()
  2530. /**
  2531. * Hydrates (populates) the object variables with values from the database resultset.
  2532. *
  2533. * An offset (0-based "start column") is specified so that objects can be hydrated
  2534. * with a subset of the columns in the resultset rows. This is needed, for example,
  2535. * for results of JOIN queries where the resultset row includes columns from two or
  2536. * more tables.
  2537. *
  2538. * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM)
  2539. * @param int $startcol 0-based offset column which indicates which restultset column to start with.
  2540. * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
  2541. * @return int next starting column
  2542. * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
  2543. */
  2544. public function hydrate($row, $startcol = 0, $rehydrate = false)
  2545. {
  2546. try {
  2547. $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
  2548. $this->name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
  2549. $this->mime = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
  2550. $this->ftype = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
  2551. $this->directory = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
  2552. $this->filepath = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
  2553. $this->state = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
  2554. $this->currentlyaccessing = ($row[$startcol + 7] !== null) ? (int) $row[$startcol + 7] : null;
  2555. $this->editedby = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null;
  2556. $this->mtime = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
  2557. $this->utime = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
  2558. $this->lptime = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
  2559. $this->md5 = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
  2560. $this->track_title = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
  2561. $this->artist_name = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null;
  2562. $this->bit_rate = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null;
  2563. $this->sample_rate = ($row[$startcol + 16] !== null) ? (int) $row[$startcol + 16] : null;
  2564. $this->format = ($row[$startcol + 17] !== null) ? (string) $row[$startcol + 17] : null;
  2565. $this->length = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null;
  2566. $this->album_title = ($row[$startcol + 19] !== null) ? (string) $row[$startcol + 19] : null;
  2567. $this->genre = ($row[$startcol + 20] !== null) ? (string) $row[$startcol + 20] : null;
  2568. $this->comments = ($row[$startcol + 21] !== null) ? (string) $row[$startcol + 21] : null;
  2569. $this->year = ($row[$startcol + 22] !== null) ? (string) $row[$startcol + 22] : null;
  2570. $this->track_number = ($row[$startcol + 23] !== null) ? (int) $row[$startcol + 23] : null;
  2571. $this->channels = ($row[$startcol + 24] !== null) ? (int) $row[$startcol + 24] : null;
  2572. $this->url = ($row[$startcol + 25] !== null) ? (string) $row[$startcol + 25] : null;
  2573. $this->bpm = ($row[$startcol + 26] !== null) ? (int) $row[$startcol + 26] : null;
  2574. $this->rating = ($row[$startcol + 27] !== null) ? (string) $row[$startcol + 27] : null;
  2575. $this->encoded_by = ($row[$startcol + 28] !== null) ? (string) $row[$startcol + 28] : null;
  2576. $this->disc_number = ($row[$startcol + 29] !== null) ? (string) $row[$startcol + 29] : null;
  2577. $this->mood = ($row[$startcol + 30] !== null) ? (string) $row[$startcol + 30] : null;
  2578. $this->label = ($row[$startcol + 31] !== null) ? (string) $row[$startcol + 31] : null;
  2579. $this->composer = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null;
  2580. $this->encoder = ($row[$startcol + 33] !== null) ? (string) $row[$startcol + 33] : null;
  2581. $this->checksum = ($row[$startcol + 34] !== null) ? (string) $row[$startcol + 34] : null;
  2582. $this->lyrics = ($row[$startcol + 35] !== null) ? (string) $row[$startcol + 35] : null;
  2583. $this->orchestra = ($row[$startcol + 36] !== null) ? (string) $row[$startcol + 36] : null;
  2584. $this->conductor = ($row[$startcol + 37] !== null) ? (string) $row[$startcol + 37] : null;
  2585. $this->lyricist = ($row[$startcol + 38] !== null) ? (string) $row[$startcol + 38] : null;
  2586. $this->original_lyricist = ($row[$startcol + 39] !== null) ? (string) $row[$startcol + 39] : null;
  2587. $this->radio_station_name = ($row[$startcol + 40] !== null) ? (string) $row[$startcol + 40] : null;
  2588. $this->info_url = ($row[$startcol + 41] !== null) ? (string) $row[$startcol + 41] : null;
  2589. $this->artist_url = ($row[$startcol + 42] !== null) ? (string) $row[$startcol + 42] : null;
  2590. $this->audio_source_url = ($row[$startcol + 43] !== null) ? (string) $row[$startcol + 43] : null;
  2591. $this->radio_station_url = ($row[$startcol + 44] !== null) ? (string) $row[$startcol + 44] : null;
  2592. $this->buy_this_url = ($row[$startcol + 45] !== null) ? (string) $row[$startcol + 45] : null;
  2593. $this->isrc_number = ($row[$startcol + 46] !== null) ? (string) $row[$startcol + 46] : null;
  2594. $this->catalog_number = ($row[$startcol + 47] !== null) ? (string) $row[$startcol + 47] : null;
  2595. $this->original_artist = ($row[$startcol + 48] !== null) ? (string) $row[$startcol + 48] : null;
  2596. $this->copyright = ($row[$startcol + 49] !== null) ? (string) $row[$startcol + 49] : null;
  2597. $this->report_datetime = ($row[$startcol + 50] !== null) ? (string) $row[$startcol + 50] : null;
  2598. $this->report_location = ($row[$startcol + 51] !== null) ? (string) $row[$startcol + 51] : null;
  2599. $this->report_organization = ($row[$startcol + 52] !== null) ? (string) $row[$startcol + 52] : null;
  2600. $this->subject = ($row[$startcol + 53] !== null) ? (string) $row[$startcol + 53] : null;
  2601. $this->contributor = ($row[$startcol + 54] !== null) ? (string) $row[$startcol + 54] : null;
  2602. $this->language = ($row[$startcol + 55] !== null) ? (string) $row[$startcol + 55] : null;
  2603. $this->file_exists = ($row[$startcol + 56] !== null) ? (boolean) $row[$startcol + 56] : null;
  2604. $this->soundcloud_id = ($row[$startcol + 57] !== null) ? (int) $row[$startcol + 57] : null;
  2605. $this->soundcloud_error_code = ($row[$startcol + 58] !== null) ? (int) $row[$startcol + 58] : null;
  2606. $this->soundcloud_error_msg = ($row[$startcol + 59] !== null) ? (string) $row[$startcol + 59] : null;
  2607. $this->soundcloud_link_to_file = ($row[$startcol + 60] !== null) ? (string) $row[$startcol + 60] : null;
  2608. $this->soundcloud_upload_time = ($row[$startcol + 61] !== null) ? (string) $row[$startcol + 61] : null;
  2609. $this->replay_gain = ($row[$startcol + 62] !== null) ? (string) $row[$startcol + 62] : null;
  2610. $this->owner_id = ($row[$startcol + 63] !== null) ? (int) $row[$startcol + 63] : null;
  2611. $this->cuein = ($row[$startcol + 64] !== null) ? (string) $row[$startcol + 64] : null;
  2612. $this->cueout = ($row[$startcol + 65] !== null) ? (string) $row[$startcol + 65] : null;
  2613. $this->silan_check = ($row[$startcol + 66] !== null) ? (boolean) $row[$startcol + 66] : null;
  2614. $this->hidden = ($row[$startcol + 67] !== null) ? (boolean) $row[$startcol + 67] : null;
  2615. $this->is_scheduled = ($row[$startcol + 68] !== null) ? (boolean) $row[$startcol + 68] : null;
  2616. $this->is_playlist = ($row[$startcol + 69] !== null) ? (boolean) $row[$startcol + 69] : null;
  2617. $this->resetModified();
  2618. $this->setNew(false);
  2619. if ($rehydrate) {
  2620. $this->ensureConsistency();
  2621. }
  2622. return $startcol + 70; // 70 = CcFilesPeer::NUM_COLUMNS - CcFilesPeer::NUM_LAZY_LOAD_COLUMNS).
  2623. } catch (Exception $e) {
  2624. throw new PropelException("Error populating CcFiles object", $e);
  2625. }
  2626. }
  2627. /**
  2628. * Checks and repairs the internal consistency of the object.
  2629. *
  2630. * This method is executed after an already-instantiated object is re-hydrated
  2631. * from the database. It exists to check any foreign keys to make sure that
  2632. * the objects related to the current object are correct based on foreign key.
  2633. *
  2634. * You can override this method in the stub class, but you should always invoke
  2635. * the base method from the overridden method (i.e. parent::ensureConsistency()),
  2636. * in case your model changes.
  2637. *
  2638. * @throws PropelException
  2639. */
  2640. public function ensureConsistency()
  2641. {
  2642. if ($this->aCcMusicDirs !== null && $this->directory !== $this->aCcMusicDirs->getId()) {
  2643. $this->aCcMusicDirs = null;
  2644. }
  2645. if ($this->aCcSubjsRelatedByDbEditedby !== null && $this->editedby !== $this->aCcSubjsRelatedByDbEditedby->getDbId()) {
  2646. $this->aCcSubjsRelatedByDbEditedby = null;
  2647. }
  2648. if ($this->aFkOwner !== null && $this->owner_id !== $this->aFkOwner->getDbId()) {
  2649. $this->aFkOwner = null;
  2650. }
  2651. } // ensureConsistency
  2652. /**
  2653. * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
  2654. *
  2655. * This will only work if the object has been saved and has a valid primary key set.
  2656. *
  2657. * @param boolean $deep (optional) Whether to also de-associated any related objects.
  2658. * @param PropelPDO $con (optional) The PropelPDO connection to use.
  2659. * @return void
  2660. * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
  2661. */
  2662. public function reload($deep = false, PropelPDO $con = null)
  2663. {
  2664. if ($this->isDeleted()) {
  2665. throw new PropelException("Cannot reload a deleted object.");
  2666. }
  2667. if ($this->isNew()) {
  2668. throw new PropelException("Cannot reload an unsaved object.");
  2669. }
  2670. if ($con === null) {
  2671. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  2672. }
  2673. // We don't need to alter the object instance pool; we're just modifying this instance
  2674. // already in the pool.
  2675. $stmt = CcFilesPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
  2676. $row = $stmt->fetch(PDO::FETCH_NUM);
  2677. $stmt->closeCursor();
  2678. if (!$row) {
  2679. throw new PropelException('Cannot find matching row in the database to reload object values.');
  2680. }
  2681. $this->hydrate($row, 0, true); // rehydrate
  2682. if ($deep) { // also de-associate any related objects?
  2683. $this->aFkOwner = null;
  2684. $this->aCcSubjsRelatedByDbEditedby = null;
  2685. $this->aCcMusicDirs = null;
  2686. $this->collCcShowInstancess = null;
  2687. $this->collCcPlaylistcontentss = null;
  2688. $this->collCcBlockcontentss = null;
  2689. $this->collCcSchedules = null;
  2690. $this->collCcPlayoutHistorys = null;
  2691. } // if (deep)
  2692. }
  2693. /**
  2694. * Removes this object from datastore and sets delete attribute.
  2695. *
  2696. * @param PropelPDO $con
  2697. * @return void
  2698. * @throws PropelException
  2699. * @see BaseObject::setDeleted()
  2700. * @see BaseObject::isDeleted()
  2701. */
  2702. public function delete(PropelPDO $con = null)
  2703. {
  2704. if ($this->isDeleted()) {
  2705. throw new PropelException("This object has already been deleted.");
  2706. }
  2707. if ($con === null) {
  2708. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  2709. }
  2710. $con->beginTransaction();
  2711. try {
  2712. $ret = $this->preDelete($con);
  2713. if ($ret) {
  2714. CcFilesQuery::create()
  2715. ->filterByPrimaryKey($this->getPrimaryKey())
  2716. ->delete($con);
  2717. $this->postDelete($con);
  2718. $con->commit();
  2719. $this->setDeleted(true);
  2720. } else {
  2721. $con->commit();
  2722. }
  2723. } catch (PropelException $e) {
  2724. $con->rollBack();
  2725. throw $e;
  2726. }
  2727. }
  2728. /**
  2729. * Persists this object to the database.
  2730. *
  2731. * If the object is new, it inserts it; otherwise an update is performed.
  2732. * All modified related objects will also be persisted in the doSave()
  2733. * method. This method wraps all precipitate database operations in a
  2734. * single transaction.
  2735. *
  2736. * @param PropelPDO $con
  2737. * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
  2738. * @throws PropelException
  2739. * @see doSave()
  2740. */
  2741. public function save(PropelPDO $con = null)
  2742. {
  2743. if ($this->isDeleted()) {
  2744. throw new PropelException("You cannot save an object that has been deleted.");
  2745. }
  2746. if ($con === null) {
  2747. $con = Propel::getConnection(CcFilesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  2748. }
  2749. $con->beginTransaction();
  2750. $isInsert = $this->isNew();
  2751. try {
  2752. $ret = $this->preSave($con);
  2753. if ($isInsert) {
  2754. $ret = $ret && $this->preInsert($con);
  2755. } else {
  2756. $ret = $ret && $this->preUpdate($con);
  2757. }
  2758. if ($ret) {
  2759. $affectedRows = $this->doSave($con);
  2760. if ($isInsert) {
  2761. $this->postInsert($con);
  2762. } else {
  2763. $this->postUpdate($con);
  2764. }
  2765. $this->postSave($con);
  2766. CcFilesPeer::addInstanceToPool($this);
  2767. } else {
  2768. $affectedRows = 0;
  2769. }
  2770. $con->commit();
  2771. return $affectedRows;
  2772. } catch (PropelException $e) {
  2773. $con->rollBack();
  2774. throw $e;
  2775. }
  2776. }
  2777. /**
  2778. * Performs the work of inserting or updating the row in the database.
  2779. *
  2780. * If the object is new, it inserts it; otherwise an update is performed.
  2781. * All related objects are also updated in this method.
  2782. *
  2783. * @param PropelPDO $con
  2784. * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
  2785. * @throws PropelException
  2786. * @see save()
  2787. */
  2788. protected function doSave(PropelPDO $con)
  2789. {
  2790. $affectedRows = 0; // initialize var to track total num of affected rows
  2791. if (!$this->alreadyInSave) {
  2792. $this->alreadyInSave = true;
  2793. // We call the save method on the following object(s) if they
  2794. // were passed to this object by their coresponding set
  2795. // method. This object relates to these object(s) by a
  2796. // foreign key reference.
  2797. if ($this->aFkOwner !== null) {
  2798. if ($this->aFkOwner->isModified() || $this->aFkOwner->isNew()) {
  2799. $affectedRows += $this->aFkOwner->save($con);
  2800. }
  2801. $this->setFkOwner($this->aFkOwner);
  2802. }
  2803. if ($this->aCcSubjsRelatedByDbEditedby !== null) {
  2804. if ($this->aCcSubjsRelatedByDbEditedby->isModified() || $this->aCcSubjsRelatedByDbEditedby->isNew()) {
  2805. $affectedRows += $this->aCcSubjsRelatedByDbEditedby->save($con);
  2806. }
  2807. $this->setCcSubjsRelatedByDbEditedby($this->aCcSubjsRelatedByDbEditedby);
  2808. }
  2809. if ($this->aCcMusicDirs !== null) {
  2810. if ($this->aCcMusicDirs->isModified() || $this->aCcMusicDirs->isNew()) {
  2811. $affectedRows += $this->aCcMusicDirs->save($con);
  2812. }
  2813. $this->setCcMusicDirs($this->aCcMusicDirs);
  2814. }
  2815. if ($this->isNew() ) {
  2816. $this->modifiedColumns[] = CcFilesPeer::ID;
  2817. }
  2818. // If this object has been modified, then save it to the database.
  2819. if ($this->isModified()) {
  2820. if ($this->isNew()) {
  2821. $criteria = $this->buildCriteria();
  2822. if ($criteria->keyContainsValue(CcFilesPeer::ID) ) {
  2823. throw new PropelException('Cannot insert a value for auto-increment primary key ('.CcFilesPeer::ID.')');
  2824. }
  2825. $pk = BasePeer::doInsert($criteria, $con);
  2826. $affectedRows += 1;
  2827. $this->setDbId($pk); //[IMV] update autoincrement primary key
  2828. $this->setNew(false);
  2829. } else {
  2830. $affectedRows += CcFilesPeer::doUpdate($this, $con);
  2831. }
  2832. $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
  2833. }
  2834. if ($this->collCcShowInstancess !== null) {
  2835. foreach ($this->collCcShowInstancess as $referrerFK) {
  2836. if (!$referrerFK->isDeleted()) {
  2837. $affectedRows += $referrerFK->save($con);
  2838. }
  2839. }
  2840. }
  2841. if ($this->collCcPlaylistcontentss !== null) {
  2842. foreach ($this->collCcPlaylistcontentss as $referrerFK) {
  2843. if (!$referrerFK->isDeleted()) {
  2844. $affectedRows += $referrerFK->save($con);
  2845. }
  2846. }
  2847. }
  2848. if ($this->collCcBlockcontentss !== null) {
  2849. foreach ($this->collCcBlockcontentss as $referrerFK) {
  2850. if (!$referrerFK->isDeleted()) {
  2851. $affectedRows += $referrerFK->save($con);
  2852. }
  2853. }
  2854. }
  2855. if ($this->collCcSchedules !== null) {
  2856. foreach ($this->collCcSchedules as $referrerFK) {
  2857. if (!$referrerFK->isDeleted()) {
  2858. $affectedRows += $referrerFK->save($con);
  2859. }
  2860. }
  2861. }
  2862. if ($this->collCcPlayoutHistorys !== null) {
  2863. foreach ($this->collCcPlayoutHistorys as $referrerFK) {
  2864. if (!$referrerFK->isDeleted()) {
  2865. $affectedRows += $referrerFK->save($con);
  2866. }
  2867. }
  2868. }
  2869. $this->alreadyInSave = false;
  2870. }
  2871. return $affectedRows;
  2872. } // doSave()
  2873. /**
  2874. * Array of ValidationFailed objects.
  2875. * @var array ValidationFailed[]
  2876. */
  2877. protected $validationFailures = array();
  2878. /**
  2879. * Gets any ValidationFailed objects that resulted from last call to validate().
  2880. *
  2881. *
  2882. * @return array ValidationFailed[]
  2883. * @see validate()
  2884. */
  2885. public function getValidationFailures()
  2886. {
  2887. return $this->validationFailures;
  2888. }
  2889. /**
  2890. * Validates the objects modified field values and all objects related to this table.
  2891. *
  2892. * If $columns is either a column name or an array of column names
  2893. * only those columns are validated.
  2894. *
  2895. * @param mixed $columns Column name or an array of column names.
  2896. * @return boolean Whether all columns pass validation.
  2897. * @see doValidate()
  2898. * @see getValidationFailures()
  2899. */
  2900. public function validate($columns = null)
  2901. {
  2902. $res = $this->doValidate($columns);
  2903. if ($res === true) {
  2904. $this->validationFailures = array();
  2905. return true;
  2906. } else {
  2907. $this->validationFailures = $res;
  2908. return false;
  2909. }
  2910. }
  2911. /**
  2912. * This function performs the validation work for complex object models.
  2913. *
  2914. * In addition to checking the current object, all related objects will
  2915. * also be validated. If all pass then <code>true</code> is returned; otherwise
  2916. * an aggreagated array of ValidationFailed objects will be returned.
  2917. *
  2918. * @param array $columns Array of column names to validate.
  2919. * @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  2920. */
  2921. protected function doValidate($columns = null)
  2922. {
  2923. if (!$this->alreadyInValidation) {
  2924. $this->alreadyInValidation = true;
  2925. $retval = null;
  2926. $failureMap = array();
  2927. // We call the validate method on the following object(s) if they
  2928. // were passed to this object by their coresponding set
  2929. // method. This object relates to these object(s) by a
  2930. // foreign key reference.
  2931. if ($this->aFkOwner !== null) {
  2932. if (!$this->aFkOwner->validate($columns)) {
  2933. $failureMap = array_merge($failureMap, $this->aFkOwner->getValidationFailures());
  2934. }
  2935. }
  2936. if ($this->aCcSubjsRelatedByDbEditedby !== null) {
  2937. if (!$this->aCcSubjsRelatedByDbEditedby->validate($columns)) {
  2938. $failureMap = array_merge($failureMap, $this->aCcSubjsRelatedByDbEditedby->getValidationFailures());
  2939. }
  2940. }
  2941. if ($this->aCcMusicDirs !== null) {
  2942. if (!$this->aCcMusicDirs->validate($columns)) {
  2943. $failureMap = array_merge($failureMap, $this->aCcMusicDirs->getValidationFailures());
  2944. }
  2945. }
  2946. if (($retval = CcFilesPeer::doValidate($this, $columns)) !== true) {
  2947. $failureMap = array_merge($failureMap, $retval);
  2948. }
  2949. if ($this->collCcShowInstancess !== null) {
  2950. foreach ($this->collCcShowInstancess as $referrerFK) {
  2951. if (!$referrerFK->validate($columns)) {
  2952. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  2953. }
  2954. }
  2955. }
  2956. if ($this->collCcPlaylistcontentss !== null) {
  2957. foreach ($this->collCcPlaylistcontentss as $referrerFK) {
  2958. if (!$referrerFK->validate($columns)) {
  2959. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  2960. }
  2961. }
  2962. }
  2963. if ($this->collCcBlockcontentss !== null) {
  2964. foreach ($this->collCcBlockcontentss as $referrerFK) {
  2965. if (!$referrerFK->validate($columns)) {
  2966. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  2967. }
  2968. }
  2969. }
  2970. if ($this->collCcSchedules !== null) {
  2971. foreach ($this->collCcSchedules as $referrerFK) {
  2972. if (!$referrerFK->validate($columns)) {
  2973. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  2974. }
  2975. }
  2976. }
  2977. if ($this->collCcPlayoutHistorys !== null) {
  2978. foreach ($this->collCcPlayoutHistorys as $referrerFK) {
  2979. if (!$referrerFK->validate($columns)) {
  2980. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  2981. }
  2982. }
  2983. }
  2984. $this->alreadyInValidation = false;
  2985. }
  2986. return (!empty($failureMap) ? $failureMap : true);
  2987. }
  2988. /**
  2989. * Retrieves a field from the object by name passed in as a string.
  2990. *
  2991. * @param string $name name
  2992. * @param string $type The type of fieldname the $name is of:
  2993. * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  2994. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  2995. * @return mixed Value of field.
  2996. */
  2997. public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
  2998. {
  2999. $pos = CcFilesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
  3000. $field = $this->getByPosition($pos);
  3001. return $field;
  3002. }
  3003. /**
  3004. * Retrieves a field from the object by Position as specified in the xml schema.
  3005. * Zero-based.
  3006. *
  3007. * @param int $pos position in xml schema
  3008. * @return mixed Value of field at $pos
  3009. */
  3010. public function getByPosition($pos)
  3011. {
  3012. switch($pos) {
  3013. case 0:
  3014. return $this->getDbId();
  3015. break;
  3016. case 1:
  3017. return $this->getDbName();
  3018. break;
  3019. case 2:
  3020. return $this->getDbMime();
  3021. break;
  3022. case 3:
  3023. return $this->getDbFtype();
  3024. break;
  3025. case 4:
  3026. return $this->getDbDirectory();
  3027. break;
  3028. case 5:
  3029. return $this->getDbFilepath();
  3030. break;
  3031. case 6:
  3032. return $this->getDbState();
  3033. break;
  3034. case 7:
  3035. return $this->getDbCurrentlyaccessing();
  3036. break;
  3037. case 8:
  3038. return $this->getDbEditedby();
  3039. break;
  3040. case 9:
  3041. return $this->getDbMtime();
  3042. break;
  3043. case 10:
  3044. return $this->getDbUtime();
  3045. break;
  3046. case 11:
  3047. return $this->getDbLPtime();
  3048. break;
  3049. case 12:
  3050. return $this->getDbMd5();
  3051. break;
  3052. case 13:
  3053. return $this->getDbTrackTitle();
  3054. break;
  3055. case 14:
  3056. return $this->getDbArtistName();
  3057. break;
  3058. case 15:
  3059. return $this->getDbBitRate();
  3060. break;
  3061. case 16:
  3062. return $this->getDbSampleRate();
  3063. break;
  3064. case 17:
  3065. return $this->getDbFormat();
  3066. break;
  3067. case 18:
  3068. return $this->getDbLength();
  3069. break;
  3070. case 19:
  3071. return $this->getDbAlbumTitle();
  3072. break;
  3073. case 20:
  3074. return $this->getDbGenre();
  3075. break;
  3076. case 21:
  3077. return $this->getDbComments();
  3078. break;
  3079. case 22:
  3080. return $this->getDbYear();
  3081. break;
  3082. case 23:
  3083. return $this->getDbTrackNumber();
  3084. break;
  3085. case 24:
  3086. return $this->getDbChannels();
  3087. break;
  3088. case 25:
  3089. return $this->getDbUrl();
  3090. break;
  3091. case 26:
  3092. return $this->getDbBpm();
  3093. break;
  3094. case 27:
  3095. return $this->getDbRating();
  3096. break;
  3097. case 28:
  3098. return $this->getDbEncodedBy();
  3099. break;
  3100. case 29:
  3101. return $this->getDbDiscNumber();
  3102. break;
  3103. case 30:
  3104. return $this->getDbMood();
  3105. break;
  3106. case 31:
  3107. return $this->getDbLabel();
  3108. break;
  3109. case 32:
  3110. return $this->getDbComposer();
  3111. break;
  3112. case 33:
  3113. return $this->getDbEncoder();
  3114. break;
  3115. case 34:
  3116. return $this->getDbChecksum();
  3117. break;
  3118. case 35:
  3119. return $this->getDbLyrics();
  3120. break;
  3121. case 36:
  3122. return $this->getDbOrchestra();
  3123. break;
  3124. case 37:
  3125. return $this->getDbConductor();
  3126. break;
  3127. case 38:
  3128. return $this->getDbLyricist();
  3129. break;
  3130. case 39:
  3131. return $this->getDbOriginalLyricist();
  3132. break;
  3133. case 40:
  3134. return $this->getDbRadioStationName();
  3135. break;
  3136. case 41:
  3137. return $this->getDbInfoUrl();
  3138. break;
  3139. case 42:
  3140. return $this->getDbArtistUrl();
  3141. break;
  3142. case 43:
  3143. return $this->getDbAudioSourceUrl();
  3144. break;
  3145. case 44:
  3146. return $this->getDbRadioStationUrl();
  3147. break;
  3148. case 45:
  3149. return $this->getDbBuyThisUrl();
  3150. break;
  3151. case 46:
  3152. return $this->getDbIsrcNumber();
  3153. break;
  3154. case 47:
  3155. return $this->getDbCatalogNumber();
  3156. break;
  3157. case 48:
  3158. return $this->getDbOriginalArtist();
  3159. break;
  3160. case 49:
  3161. return $this->getDbCopyright();
  3162. break;
  3163. case 50:
  3164. return $this->getDbReportDatetime();
  3165. break;
  3166. case 51:
  3167. return $this->getDbReportLocation();
  3168. break;
  3169. case 52:
  3170. return $this->getDbReportOrganization();
  3171. break;
  3172. case 53:
  3173. return $this->getDbSubject();
  3174. break;
  3175. case 54:
  3176. return $this->getDbContributor();
  3177. break;
  3178. case 55:
  3179. return $this->getDbLanguage();
  3180. break;
  3181. case 56:
  3182. return $this->getDbFileExists();
  3183. break;
  3184. case 57:
  3185. return $this->getDbSoundcloudId();
  3186. break;
  3187. case 58:
  3188. return $this->getDbSoundcloudErrorCode();
  3189. break;
  3190. case 59:
  3191. return $this->getDbSoundcloudErrorMsg();
  3192. break;
  3193. case 60:
  3194. return $this->getDbSoundcloudLinkToFile();
  3195. break;
  3196. case 61:
  3197. return $this->getDbSoundCloundUploadTime();
  3198. break;
  3199. case 62:
  3200. return $this->getDbReplayGain();
  3201. break;
  3202. case 63:
  3203. return $this->getDbOwnerId();
  3204. break;
  3205. case 64:
  3206. return $this->getDbCuein();
  3207. break;
  3208. case 65:
  3209. return $this->getDbCueout();
  3210. break;
  3211. case 66:
  3212. return $this->getDbSilanCheck();
  3213. break;
  3214. case 67:
  3215. return $this->getDbHidden();
  3216. break;
  3217. case 68:
  3218. return $this->getDbIsScheduled();
  3219. break;
  3220. case 69:
  3221. return $this->getDbIsPlaylist();
  3222. break;
  3223. default:
  3224. return null;
  3225. break;
  3226. } // switch()
  3227. }
  3228. /**
  3229. * Exports the object as an array.
  3230. *
  3231. * You can specify the key type of the array by passing one of the class
  3232. * type constants.
  3233. *
  3234. * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  3235. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  3236. * Defaults to BasePeer::TYPE_PHPNAME.
  3237. * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  3238. * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
  3239. *
  3240. * @return array an associative array containing the field names (as keys) and field values
  3241. */
  3242. public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $includeForeignObjects = false)
  3243. {
  3244. $keys = CcFilesPeer::getFieldNames($keyType);
  3245. $result = array(
  3246. $keys[0] => $this->getDbId(),
  3247. $keys[1] => $this->getDbName(),
  3248. $keys[2] => $this->getDbMime(),
  3249. $keys[3] => $this->getDbFtype(),
  3250. $keys[4] => $this->getDbDirectory(),
  3251. $keys[5] => $this->getDbFilepath(),
  3252. $keys[6] => $this->getDbState(),
  3253. $keys[7] => $this->getDbCurrentlyaccessing(),
  3254. $keys[8] => $this->getDbEditedby(),
  3255. $keys[9] => $this->getDbMtime(),
  3256. $keys[10] => $this->getDbUtime(),
  3257. $keys[11] => $this->getDbLPtime(),
  3258. $keys[12] => $this->getDbMd5(),
  3259. $keys[13] => $this->getDbTrackTitle(),
  3260. $keys[14] => $this->getDbArtistName(),
  3261. $keys[15] => $this->getDbBitRate(),
  3262. $keys[16] => $this->getDbSampleRate(),
  3263. $keys[17] => $this->getDbFormat(),
  3264. $keys[18] => $this->getDbLength(),
  3265. $keys[19] => $this->getDbAlbumTitle(),
  3266. $keys[20] => $this->getDbGenre(),
  3267. $keys[21] => $this->getDbComments(),
  3268. $keys[22] => $this->getDbYear(),
  3269. $keys[23] => $this->getDbTrackNumber(),
  3270. $keys[24] => $this->getDbChannels(),
  3271. $keys[25] => $this->getDbUrl(),
  3272. $keys[26] => $this->getDbBpm(),
  3273. $keys[27] => $this->getDbRating(),
  3274. $keys[28] => $this->getDbEncodedBy(),
  3275. $keys[29] => $this->getDbDiscNumber(),
  3276. $keys[30] => $this->getDbMood(),
  3277. $keys[31] => $this->getDbLabel(),
  3278. $keys[32] => $this->getDbComposer(),
  3279. $keys[33] => $this->getDbEncoder(),
  3280. $keys[34] => $this->getDbChecksum(),
  3281. $keys[35] => $this->getDbLyrics(),
  3282. $keys[36] => $this->getDbOrchestra(),
  3283. $keys[37] => $this->getDbConductor(),
  3284. $keys[38] => $this->getDbLyricist(),
  3285. $keys[39] => $this->getDbOriginalLyricist(),
  3286. $keys[40] => $this->getDbRadioStationName(),
  3287. $keys[41] => $this->getDbInfoUrl(),
  3288. $keys[42] => $this->getDbArtistUrl(),
  3289. $keys[43] => $this->getDbAudioSourceUrl(),
  3290. $keys[44] => $this->getDbRadioStationUrl(),
  3291. $keys[45] => $this->getDbBuyThisUrl(),
  3292. $keys[46] => $this->getDbIsrcNumber(),
  3293. $keys[47] => $this->getDbCatalogNumber(),
  3294. $keys[48] => $this->getDbOriginalArtist(),
  3295. $keys[49] => $this->getDbCopyright(),
  3296. $keys[50] => $this->getDbReportDatetime(),
  3297. $keys[51] => $this->getDbReportLocation(),
  3298. $keys[52] => $this->getDbReportOrganization(),
  3299. $keys[53] => $this->getDbSubject(),
  3300. $keys[54] => $this->getDbContributor(),
  3301. $keys[55] => $this->getDbLanguage(),
  3302. $keys[56] => $this->getDbFileExists(),
  3303. $keys[57] => $this->getDbSoundcloudId(),
  3304. $keys[58] => $this->getDbSoundcloudErrorCode(),
  3305. $keys[59] => $this->getDbSoundcloudErrorMsg(),
  3306. $keys[60] => $this->getDbSoundcloudLinkToFile(),
  3307. $keys[61] => $this->getDbSoundCloundUploadTime(),
  3308. $keys[62] => $this->getDbReplayGain(),
  3309. $keys[63] => $this->getDbOwnerId(),
  3310. $keys[64] => $this->getDbCuein(),
  3311. $keys[65] => $this->getDbCueout(),
  3312. $keys[66] => $this->getDbSilanCheck(),
  3313. $keys[67] => $this->getDbHidden(),
  3314. $keys[68] => $this->getDbIsScheduled(),
  3315. $keys[69] => $this->getDbIsPlaylist(),
  3316. );
  3317. if ($includeForeignObjects) {
  3318. if (null !== $this->aFkOwner) {
  3319. $result['FkOwner'] = $this->aFkOwner->toArray($keyType, $includeLazyLoadColumns, true);
  3320. }
  3321. if (null !== $this->aCcSubjsRelatedByDbEditedby) {
  3322. $result['CcSubjsRelatedByDbEditedby'] = $this->aCcSubjsRelatedByDbEditedby->toArray($keyType, $includeLazyLoadColumns, true);
  3323. }
  3324. if (null !== $this->aCcMusicDirs) {
  3325. $result['CcMusicDirs'] = $this->aCcMusicDirs->toArray($keyType, $includeLazyLoadColumns, true);
  3326. }
  3327. }
  3328. return $result;
  3329. }
  3330. /**
  3331. * Sets a field from the object by name passed in as a string.
  3332. *
  3333. * @param string $name peer name
  3334. * @param mixed $value field value
  3335. * @param string $type The type of fieldname the $name is of:
  3336. * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  3337. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  3338. * @return void
  3339. */
  3340. public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
  3341. {
  3342. $pos = CcFilesPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
  3343. return $this->setByPosition($pos, $value);
  3344. }
  3345. /**
  3346. * Sets a field from the object by Position as specified in the xml schema.
  3347. * Zero-based.
  3348. *
  3349. * @param int $pos position in xml schema
  3350. * @param mixed $value field value
  3351. * @return void
  3352. */
  3353. public function setByPosition($pos, $value)
  3354. {
  3355. switch($pos) {
  3356. case 0:
  3357. $this->setDbId($value);
  3358. break;
  3359. case 1:
  3360. $this->setDbName($value);
  3361. break;
  3362. case 2:
  3363. $this->setDbMime($value);
  3364. break;
  3365. case 3:
  3366. $this->setDbFtype($value);
  3367. break;
  3368. case 4:
  3369. $this->setDbDirectory($value);
  3370. break;
  3371. case 5:
  3372. $this->setDbFilepath($value);
  3373. break;
  3374. case 6:
  3375. $this->setDbState($value);
  3376. break;
  3377. case 7:
  3378. $this->setDbCurrentlyaccessing($value);
  3379. break;
  3380. case 8:
  3381. $this->setDbEditedby($value);
  3382. break;
  3383. case 9:
  3384. $this->setDbMtime($value);
  3385. break;
  3386. case 10:
  3387. $this->setDbUtime($value);
  3388. break;
  3389. case 11:
  3390. $this->setDbLPtime($value);
  3391. break;
  3392. case 12:
  3393. $this->setDbMd5($value);
  3394. break;
  3395. case 13:
  3396. $this->setDbTrackTitle($value);
  3397. break;
  3398. case 14:
  3399. $this->setDbArtistName($value);
  3400. break;
  3401. case 15:
  3402. $this->setDbBitRate($value);
  3403. break;
  3404. case 16:
  3405. $this->setDbSampleRate($value);
  3406. break;
  3407. case 17:
  3408. $this->setDbFormat($value);
  3409. break;
  3410. case 18:
  3411. $this->setDbLength($value);
  3412. break;
  3413. case 19:
  3414. $this->setDbAlbumTitle($value);
  3415. break;
  3416. case 20:
  3417. $this->setDbGenre($value);
  3418. break;
  3419. case 21:
  3420. $this->setDbComments($value);
  3421. break;
  3422. case 22:
  3423. $this->setDbYear($value);
  3424. break;
  3425. case 23:
  3426. $this->setDbTrackNumber($value);
  3427. break;
  3428. case 24:
  3429. $this->setDbChannels($value);
  3430. break;
  3431. case 25:
  3432. $this->setDbUrl($value);
  3433. break;
  3434. case 26:
  3435. $this->setDbBpm($value);
  3436. break;
  3437. case 27:
  3438. $this->setDbRating($value);
  3439. break;
  3440. case 28:
  3441. $this->setDbEncodedBy($value);
  3442. break;
  3443. case 29:
  3444. $this->setDbDiscNumber($value);
  3445. break;
  3446. case 30:
  3447. $this->setDbMood($value);
  3448. break;
  3449. case 31:
  3450. $this->setDbLabel($value);
  3451. break;
  3452. case 32:
  3453. $this->setDbComposer($value);
  3454. break;
  3455. case 33:
  3456. $this->setDbEncoder($value);
  3457. break;
  3458. case 34:
  3459. $this->setDbChecksum($value);
  3460. break;
  3461. case 35:
  3462. $this->setDbLyrics($value);
  3463. break;
  3464. case 36:
  3465. $this->setDbOrchestra($value);
  3466. break;
  3467. case 37:
  3468. $this->setDbConductor($value);
  3469. break;
  3470. case 38:
  3471. $this->setDbLyricist($value);
  3472. break;
  3473. case 39:
  3474. $this->setDbOriginalLyricist($value);
  3475. break;
  3476. case 40:
  3477. $this->setDbRadioStationName($value);
  3478. break;
  3479. case 41:
  3480. $this->setDbInfoUrl($value);
  3481. break;
  3482. case 42:
  3483. $this->setDbArtistUrl($value);
  3484. break;
  3485. case 43:
  3486. $this->setDbAudioSourceUrl($value);
  3487. break;
  3488. case 44:
  3489. $this->setDbRadioStationUrl($value);
  3490. break;
  3491. case 45:
  3492. $this->setDbBuyThisUrl($value);
  3493. break;
  3494. case 46:
  3495. $this->setDbIsrcNumber($value);
  3496. break;
  3497. case 47:
  3498. $this->setDbCatalogNumber($value);
  3499. break;
  3500. case 48:
  3501. $this->setDbOriginalArtist($value);
  3502. break;
  3503. case 49:
  3504. $this->setDbCopyright($value);
  3505. break;
  3506. case 50:
  3507. $this->setDbReportDatetime($value);
  3508. break;
  3509. case 51:
  3510. $this->setDbReportLocation($value);
  3511. break;
  3512. case 52:
  3513. $this->setDbReportOrganization($value);
  3514. break;
  3515. case 53:
  3516. $this->setDbSubject($value);
  3517. break;
  3518. case 54:
  3519. $this->setDbContributor($value);
  3520. break;
  3521. case 55:
  3522. $this->setDbLanguage($value);
  3523. break;
  3524. case 56:
  3525. $this->setDbFileExists($value);
  3526. break;
  3527. case 57:
  3528. $this->setDbSoundcloudId($value);
  3529. break;
  3530. case 58:
  3531. $this->setDbSoundcloudErrorCode($value);
  3532. break;
  3533. case 59:
  3534. $this->setDbSoundcloudErrorMsg($value);
  3535. break;
  3536. case 60:
  3537. $this->setDbSoundcloudLinkToFile($value);
  3538. break;
  3539. case 61:
  3540. $this->setDbSoundCloundUploadTime($value);
  3541. break;
  3542. case 62:
  3543. $this->setDbReplayGain($value);
  3544. break;
  3545. case 63:
  3546. $this->setDbOwnerId($value);
  3547. break;
  3548. case 64:
  3549. $this->setDbCuein($value);
  3550. break;
  3551. case 65:
  3552. $this->setDbCueout($value);
  3553. break;
  3554. case 66:
  3555. $this->setDbSilanCheck($value);
  3556. break;
  3557. case 67:
  3558. $this->setDbHidden($value);
  3559. break;
  3560. case 68:
  3561. $this->setDbIsScheduled($value);
  3562. break;
  3563. case 69:
  3564. $this->setDbIsPlaylist($value);
  3565. break;
  3566. } // switch()
  3567. }
  3568. /**
  3569. * Populates the object using an array.
  3570. *
  3571. * This is particularly useful when populating an object from one of the
  3572. * request arrays (e.g. $_POST). This method goes through the column
  3573. * names, checking to see whether a matching key exists in populated
  3574. * array. If so the setByName() method is called for that column.
  3575. *
  3576. * You can specify the key type of the array by additionally passing one
  3577. * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  3578. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  3579. * The default key type is the column's phpname (e.g. 'AuthorId')
  3580. *
  3581. * @param array $arr An array to populate the object from.
  3582. * @param string $keyType The type of keys the array uses.
  3583. * @return void
  3584. */
  3585. public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
  3586. {
  3587. $keys = CcFilesPeer::getFieldNames($keyType);
  3588. if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
  3589. if (array_key_exists($keys[1], $arr)) $this->setDbName($arr[$keys[1]]);
  3590. if (array_key_exists($keys[2], $arr)) $this->setDbMime($arr[$keys[2]]);
  3591. if (array_key_exists($keys[3], $arr)) $this->setDbFtype($arr[$keys[3]]);
  3592. if (array_key_exists($keys[4], $arr)) $this->setDbDirectory($arr[$keys[4]]);
  3593. if (array_key_exists($keys[5], $arr)) $this->setDbFilepath($arr[$keys[5]]);
  3594. if (array_key_exists($keys[6], $arr)) $this->setDbState($arr[$keys[6]]);
  3595. if (array_key_exists($keys[7], $arr)) $this->setDbCurrentlyaccessing($arr[$keys[7]]);
  3596. if (array_key_exists($keys[8], $arr)) $this->setDbEditedby($arr[$keys[8]]);
  3597. if (array_key_exists($keys[9], $arr)) $this->setDbMtime($arr[$keys[9]]);
  3598. if (array_key_exists($keys[10], $arr)) $this->setDbUtime($arr[$keys[10]]);
  3599. if (array_key_exists($keys[11], $arr)) $this->setDbLPtime($arr[$keys[11]]);
  3600. if (array_key_exists($keys[12], $arr)) $this->setDbMd5($arr[$keys[12]]);
  3601. if (array_key_exists($keys[13], $arr)) $this->setDbTrackTitle($arr[$keys[13]]);
  3602. if (array_key_exists($keys[14], $arr)) $this->setDbArtistName($arr[$keys[14]]);
  3603. if (array_key_exists($keys[15], $arr)) $this->setDbBitRate($arr[$keys[15]]);
  3604. if (array_key_exists($keys[16], $arr)) $this->setDbSampleRate($arr[$keys[16]]);
  3605. if (array_key_exists($keys[17], $arr)) $this->setDbFormat($arr[$keys[17]]);
  3606. if (array_key_exists($keys[18], $arr)) $this->setDbLength($arr[$keys[18]]);
  3607. if (array_key_exists($keys[19], $arr)) $this->setDbAlbumTitle($arr[$keys[19]]);
  3608. if (array_key_exists($keys[20], $arr)) $this->setDbGenre($arr[$keys[20]]);
  3609. if (array_key_exists($keys[21], $arr)) $this->setDbComments($arr[$keys[21]]);
  3610. if (array_key_exists($keys[22], $arr)) $this->setDbYear($arr[$keys[22]]);
  3611. if (array_key_exists($keys[23], $arr)) $this->setDbTrackNumber($arr[$keys[23]]);
  3612. if (array_key_exists($keys[24], $arr)) $this->setDbChannels($arr[$keys[24]]);
  3613. if (array_key_exists($keys[25], $arr)) $this->setDbUrl($arr[$keys[25]]);
  3614. if (array_key_exists($keys[26], $arr)) $this->setDbBpm($arr[$keys[26]]);
  3615. if (array_key_exists($keys[27], $arr)) $this->setDbRating($arr[$keys[27]]);
  3616. if (array_key_exists($keys[28], $arr)) $this->setDbEncodedBy($arr[$keys[28]]);
  3617. if (array_key_exists($keys[29], $arr)) $this->setDbDiscNumber($arr[$keys[29]]);
  3618. if (array_key_exists($keys[30], $arr)) $this->setDbMood($arr[$keys[30]]);
  3619. if (array_key_exists($keys[31], $arr)) $this->setDbLabel($arr[$keys[31]]);
  3620. if (array_key_exists($keys[32], $arr)) $this->setDbComposer($arr[$keys[32]]);
  3621. if (array_key_exists($keys[33], $arr)) $this->setDbEncoder($arr[$keys[33]]);
  3622. if (array_key_exists($keys[34], $arr)) $this->setDbChecksum($arr[$keys[34]]);
  3623. if (array_key_exists($keys[35], $arr)) $this->setDbLyrics($arr[$keys[35]]);
  3624. if (array_key_exists($keys[36], $arr)) $this->setDbOrchestra($arr[$keys[36]]);
  3625. if (array_key_exists($keys[37], $arr)) $this->setDbConductor($arr[$keys[37]]);
  3626. if (array_key_exists($keys[38], $arr)) $this->setDbLyricist($arr[$keys[38]]);
  3627. if (array_key_exists($keys[39], $arr)) $this->setDbOriginalLyricist($arr[$keys[39]]);
  3628. if (array_key_exists($keys[40], $arr)) $this->setDbRadioStationName($arr[$keys[40]]);
  3629. if (array_key_exists($keys[41], $arr)) $this->setDbInfoUrl($arr[$keys[41]]);
  3630. if (array_key_exists($keys[42], $arr)) $this->setDbArtistUrl($arr[$keys[42]]);
  3631. if (array_key_exists($keys[43], $arr)) $this->setDbAudioSourceUrl($arr[$keys[43]]);
  3632. if (array_key_exists($keys[44], $arr)) $this->setDbRadioStationUrl($arr[$keys[44]]);
  3633. if (array_key_exists($keys[45], $arr)) $this->setDbBuyThisUrl($arr[$keys[45]]);
  3634. if (array_key_exists($keys[46], $arr)) $this->setDbIsrcNumber($arr[$keys[46]]);
  3635. if (array_key_exists($keys[47], $arr)) $this->setDbCatalogNumber($arr[$keys[47]]);
  3636. if (array_key_exists($keys[48], $arr)) $this->setDbOriginalArtist($arr[$keys[48]]);
  3637. if (array_key_exists($keys[49], $arr)) $this->setDbCopyright($arr[$keys[49]]);
  3638. if (array_key_exists($keys[50], $arr)) $this->setDbReportDatetime($arr[$keys[50]]);
  3639. if (array_key_exists($keys[51], $arr)) $this->setDbReportLocation($arr[$keys[51]]);
  3640. if (array_key_exists($keys[52], $arr)) $this->setDbReportOrganization($arr[$keys[52]]);
  3641. if (array_key_exists($keys[53], $arr)) $this->setDbSubject($arr[$keys[53]]);
  3642. if (array_key_exists($keys[54], $arr)) $this->setDbContributor($arr[$keys[54]]);
  3643. if (array_key_exists($keys[55], $arr)) $this->setDbLanguage($arr[$keys[55]]);
  3644. if (array_key_exists($keys[56], $arr)) $this->setDbFileExists($arr[$keys[56]]);
  3645. if (array_key_exists($keys[57], $arr)) $this->setDbSoundcloudId($arr[$keys[57]]);
  3646. if (array_key_exists($keys[58], $arr)) $this->setDbSoundcloudErrorCode($arr[$keys[58]]);
  3647. if (array_key_exists($keys[59], $arr)) $this->setDbSoundcloudErrorMsg($arr[$keys[59]]);
  3648. if (array_key_exists($keys[60], $arr)) $this->setDbSoundcloudLinkToFile($arr[$keys[60]]);
  3649. if (array_key_exists($keys[61], $arr)) $this->setDbSoundCloundUploadTime($arr[$keys[61]]);
  3650. if (array_key_exists($keys[62], $arr)) $this->setDbReplayGain($arr[$keys[62]]);
  3651. if (array_key_exists($keys[63], $arr)) $this->setDbOwnerId($arr[$keys[63]]);
  3652. if (array_key_exists($keys[64], $arr)) $this->setDbCuein($arr[$keys[64]]);
  3653. if (array_key_exists($keys[65], $arr)) $this->setDbCueout($arr[$keys[65]]);
  3654. if (array_key_exists($keys[66], $arr)) $this->setDbSilanCheck($arr[$keys[66]]);
  3655. if (array_key_exists($keys[67], $arr)) $this->setDbHidden($arr[$keys[67]]);
  3656. if (array_key_exists($keys[68], $arr)) $this->setDbIsScheduled($arr[$keys[68]]);
  3657. if (array_key_exists($keys[69], $arr)) $this->setDbIsPlaylist($arr[$keys[69]]);
  3658. }
  3659. /**
  3660. * Build a Criteria object containing the values of all modified columns in this object.
  3661. *
  3662. * @return Criteria The Criteria object containing all modified values.
  3663. */
  3664. public function buildCriteria()
  3665. {
  3666. $criteria = new Criteria(CcFilesPeer::DATABASE_NAME);
  3667. if ($this->isColumnModified(CcFilesPeer::ID)) $criteria->add(CcFilesPeer::ID, $this->id);
  3668. if ($this->isColumnModified(CcFilesPeer::NAME)) $criteria->add(CcFilesPeer::NAME, $this->name);
  3669. if ($this->isColumnModified(CcFilesPeer::MIME)) $criteria->add(CcFilesPeer::MIME, $this->mime);
  3670. if ($this->isColumnModified(CcFilesPeer::FTYPE)) $criteria->add(CcFilesPeer::FTYPE, $this->ftype);
  3671. if ($this->isColumnModified(CcFilesPeer::DIRECTORY)) $criteria->add(CcFilesPeer::DIRECTORY, $this->directory);
  3672. if ($this->isColumnModified(CcFilesPeer::FILEPATH)) $criteria->add(CcFilesPeer::FILEPATH, $this->filepath);
  3673. if ($this->isColumnModified(CcFilesPeer::STATE)) $criteria->add(CcFilesPeer::STATE, $this->state);
  3674. if ($this->isColumnModified(CcFilesPeer::CURRENTLYACCESSING)) $criteria->add(CcFilesPeer::CURRENTLYACCESSING, $this->currentlyaccessing);
  3675. if ($this->isColumnModified(CcFilesPeer::EDITEDBY)) $criteria->add(CcFilesPeer::EDITEDBY, $this->editedby);
  3676. if ($this->isColumnModified(CcFilesPeer::MTIME)) $criteria->add(CcFilesPeer::MTIME, $this->mtime);
  3677. if ($this->isColumnModified(CcFilesPeer::UTIME)) $criteria->add(CcFilesPeer::UTIME, $this->utime);
  3678. if ($this->isColumnModified(CcFilesPeer::LPTIME)) $criteria->add(CcFilesPeer::LPTIME, $this->lptime);
  3679. if ($this->isColumnModified(CcFilesPeer::MD5)) $criteria->add(CcFilesPeer::MD5, $this->md5);
  3680. if ($this->isColumnModified(CcFilesPeer::TRACK_TITLE)) $criteria->add(CcFilesPeer::TRACK_TITLE, $this->track_title);
  3681. if ($this->isColumnModified(CcFilesPeer::ARTIST_NAME)) $criteria->add(CcFilesPeer::ARTIST_NAME, $this->artist_name);
  3682. if ($this->isColumnModified(CcFilesPeer::BIT_RATE)) $criteria->add(CcFilesPeer::BIT_RATE, $this->bit_rate);
  3683. if ($this->isColumnModified(CcFilesPeer::SAMPLE_RATE)) $criteria->add(CcFilesPeer::SAMPLE_RATE, $this->sample_rate);
  3684. if ($this->isColumnModified(CcFilesPeer::FORMAT)) $criteria->add(CcFilesPeer::FORMAT, $this->format);
  3685. if ($this->isColumnModified(CcFilesPeer::LENGTH)) $criteria->add(CcFilesPeer::LENGTH, $this->length);
  3686. if ($this->isColumnModified(CcFilesPeer::ALBUM_TITLE)) $criteria->add(CcFilesPeer::ALBUM_TITLE, $this->album_title);
  3687. if ($this->isColumnModified(CcFilesPeer::GENRE)) $criteria->add(CcFilesPeer::GENRE, $this->genre);
  3688. if ($this->isColumnModified(CcFilesPeer::COMMENTS)) $criteria->add(CcFilesPeer::COMMENTS, $this->comments);
  3689. if ($this->isColumnModified(CcFilesPeer::YEAR)) $criteria->add(CcFilesPeer::YEAR, $this->year);
  3690. if ($this->isColumnModified(CcFilesPeer::TRACK_NUMBER)) $criteria->add(CcFilesPeer::TRACK_NUMBER, $this->track_number);
  3691. if ($this->isColumnModified(CcFilesPeer::CHANNELS)) $criteria->add(CcFilesPeer::CHANNELS, $this->channels);
  3692. if ($this->isColumnModified(CcFilesPeer::URL)) $criteria->add(CcFilesPeer::URL, $this->url);
  3693. if ($this->isColumnModified(CcFilesPeer::BPM)) $criteria->add(CcFilesPeer::BPM, $this->bpm);
  3694. if ($this->isColumnModified(CcFilesPeer::RATING)) $criteria->add(CcFilesPeer::RATING, $this->rating);
  3695. if ($this->isColumnModified(CcFilesPeer::ENCODED_BY)) $criteria->add(CcFilesPeer::ENCODED_BY, $this->encoded_by);
  3696. if ($this->isColumnModified(CcFilesPeer::DISC_NUMBER)) $criteria->add(CcFilesPeer::DISC_NUMBER, $this->disc_number);
  3697. if ($this->isColumnModified(CcFilesPeer::MOOD)) $criteria->add(CcFilesPeer::MOOD, $this->mood);
  3698. if ($this->isColumnModified(CcFilesPeer::LABEL)) $criteria->add(CcFilesPeer::LABEL, $this->label);
  3699. if ($this->isColumnModified(CcFilesPeer::COMPOSER)) $criteria->add(CcFilesPeer::COMPOSER, $this->composer);
  3700. if ($this->isColumnModified(CcFilesPeer::ENCODER)) $criteria->add(CcFilesPeer::ENCODER, $this->encoder);
  3701. if ($this->isColumnModified(CcFilesPeer::CHECKSUM)) $criteria->add(CcFilesPeer::CHECKSUM, $this->checksum);
  3702. if ($this->isColumnModified(CcFilesPeer::LYRICS)) $criteria->add(CcFilesPeer::LYRICS, $this->lyrics);
  3703. if ($this->isColumnModified(CcFilesPeer::ORCHESTRA)) $criteria->add(CcFilesPeer::ORCHESTRA, $this->orchestra);
  3704. if ($this->isColumnModified(CcFilesPeer::CONDUCTOR)) $criteria->add(CcFilesPeer::CONDUCTOR, $this->conductor);
  3705. if ($this->isColumnModified(CcFilesPeer::LYRICIST)) $criteria->add(CcFilesPeer::LYRICIST, $this->lyricist);
  3706. if ($this->isColumnModified(CcFilesPeer::ORIGINAL_LYRICIST)) $criteria->add(CcFilesPeer::ORIGINAL_LYRICIST, $this->original_lyricist);
  3707. if ($this->isColumnModified(CcFilesPeer::RADIO_STATION_NAME)) $criteria->add(CcFilesPeer::RADIO_STATION_NAME, $this->radio_station_name);
  3708. if ($this->isColumnModified(CcFilesPeer::INFO_URL)) $criteria->add(CcFilesPeer::INFO_URL, $this->info_url);
  3709. if ($this->isColumnModified(CcFilesPeer::ARTIST_URL)) $criteria->add(CcFilesPeer::ARTIST_URL, $this->artist_url);
  3710. if ($this->isColumnModified(CcFilesPeer::AUDIO_SOURCE_URL)) $criteria->add(CcFilesPeer::AUDIO_SOURCE_URL, $this->audio_source_url);
  3711. if ($this->isColumnModified(CcFilesPeer::RADIO_STATION_URL)) $criteria->add(CcFilesPeer::RADIO_STATION_URL, $this->radio_station_url);
  3712. if ($this->isColumnModified(CcFilesPeer::BUY_THIS_URL)) $criteria->add(CcFilesPeer::BUY_THIS_URL, $this->buy_this_url);
  3713. if ($this->isColumnModified(CcFilesPeer::ISRC_NUMBER)) $criteria->add(CcFilesPeer::ISRC_NUMBER, $this->isrc_number);
  3714. if ($this->isColumnModified(CcFilesPeer::CATALOG_NUMBER)) $criteria->add(CcFilesPeer::CATALOG_NUMBER, $this->catalog_number);
  3715. if ($this->isColumnModified(CcFilesPeer::ORIGINAL_ARTIST)) $criteria->add(CcFilesPeer::ORIGINAL_ARTIST, $this->original_artist);
  3716. if ($this->isColumnModified(CcFilesPeer::COPYRIGHT)) $criteria->add(CcFilesPeer::COPYRIGHT, $this->copyright);
  3717. if ($this->isColumnModified(CcFilesPeer::REPORT_DATETIME)) $criteria->add(CcFilesPeer::REPORT_DATETIME, $this->report_datetime);
  3718. if ($this->isColumnModified(CcFilesPeer::REPORT_LOCATION)) $criteria->add(CcFilesPeer::REPORT_LOCATION, $this->report_location);
  3719. if ($this->isColumnModified(CcFilesPeer::REPORT_ORGANIZATION)) $criteria->add(CcFilesPeer::REPORT_ORGANIZATION, $this->report_organization);
  3720. if ($this->isColumnModified(CcFilesPeer::SUBJECT)) $criteria->add(CcFilesPeer::SUBJECT, $this->subject);
  3721. if ($this->isColumnModified(CcFilesPeer::CONTRIBUTOR)) $criteria->add(CcFilesPeer::CONTRIBUTOR, $this->contributor);
  3722. if ($this->isColumnModified(CcFilesPeer::LANGUAGE)) $criteria->add(CcFilesPeer::LANGUAGE, $this->language);
  3723. if ($this->isColumnModified(CcFilesPeer::FILE_EXISTS)) $criteria->add(CcFilesPeer::FILE_EXISTS, $this->file_exists);
  3724. if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ID)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ID, $this->soundcloud_id);
  3725. if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_CODE)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ERROR_CODE, $this->soundcloud_error_code);
  3726. if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_ERROR_MSG)) $criteria->add(CcFilesPeer::SOUNDCLOUD_ERROR_MSG, $this->soundcloud_error_msg);
  3727. if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE)) $criteria->add(CcFilesPeer::SOUNDCLOUD_LINK_TO_FILE, $this->soundcloud_link_to_file);
  3728. if ($this->isColumnModified(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME)) $criteria->add(CcFilesPeer::SOUNDCLOUD_UPLOAD_TIME, $this->soundcloud_upload_time);
  3729. if ($this->isColumnModified(CcFilesPeer::REPLAY_GAIN)) $criteria->add(CcFilesPeer::REPLAY_GAIN, $this->replay_gain);
  3730. if ($this->isColumnModified(CcFilesPeer::OWNER_ID)) $criteria->add(CcFilesPeer::OWNER_ID, $this->owner_id);
  3731. if ($this->isColumnModified(CcFilesPeer::CUEIN)) $criteria->add(CcFilesPeer::CUEIN, $this->cuein);
  3732. if ($this->isColumnModified(CcFilesPeer::CUEOUT)) $criteria->add(CcFilesPeer::CUEOUT, $this->cueout);
  3733. if ($this->isColumnModified(CcFilesPeer::SILAN_CHECK)) $criteria->add(CcFilesPeer::SILAN_CHECK, $this->silan_check);
  3734. if ($this->isColumnModified(CcFilesPeer::HIDDEN)) $criteria->add(CcFilesPeer::HIDDEN, $this->hidden);
  3735. if ($this->isColumnModified(CcFilesPeer::IS_SCHEDULED)) $criteria->add(CcFilesPeer::IS_SCHEDULED, $this->is_scheduled);
  3736. if ($this->isColumnModified(CcFilesPeer::IS_PLAYLIST)) $criteria->add(CcFilesPeer::IS_PLAYLIST, $this->is_playlist);
  3737. return $criteria;
  3738. }
  3739. /**
  3740. * Builds a Criteria object containing the primary key for this object.
  3741. *
  3742. * Unlike buildCriteria() this method includes the primary key values regardless
  3743. * of whether or not they have been modified.
  3744. *
  3745. * @return Criteria The Criteria object containing value(s) for primary key(s).
  3746. */
  3747. public function buildPkeyCriteria()
  3748. {
  3749. $criteria = new Criteria(CcFilesPeer::DATABASE_NAME);
  3750. $criteria->add(CcFilesPeer::ID, $this->id);
  3751. return $criteria;
  3752. }
  3753. /**
  3754. * Returns the primary key for this object (row).
  3755. * @return int
  3756. */
  3757. public function getPrimaryKey()
  3758. {
  3759. return $this->getDbId();
  3760. }
  3761. /**
  3762. * Generic method to set the primary key (id column).
  3763. *
  3764. * @param int $key Primary key.
  3765. * @return void
  3766. */
  3767. public function setPrimaryKey($key)
  3768. {
  3769. $this->setDbId($key);
  3770. }
  3771. /**
  3772. * Returns true if the primary key for this object is null.
  3773. * @return boolean
  3774. */
  3775. public function isPrimaryKeyNull()
  3776. {
  3777. return null === $this->getDbId();
  3778. }
  3779. /**
  3780. * Sets contents of passed object to values from current object.
  3781. *
  3782. * If desired, this method can also make copies of all associated (fkey referrers)
  3783. * objects.
  3784. *
  3785. * @param object $copyObj An object of CcFiles (or compatible) type.
  3786. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  3787. * @throws PropelException
  3788. */
  3789. public function copyInto($copyObj, $deepCopy = false)
  3790. {
  3791. $copyObj->setDbName($this->name);
  3792. $copyObj->setDbMime($this->mime);
  3793. $copyObj->setDbFtype($this->ftype);
  3794. $copyObj->setDbDirectory($this->directory);
  3795. $copyObj->setDbFilepath($this->filepath);
  3796. $copyObj->setDbState($this->state);
  3797. $copyObj->setDbCurrentlyaccessing($this->currentlyaccessing);
  3798. $copyObj->setDbEditedby($this->editedby);
  3799. $copyObj->setDbMtime($this->mtime);
  3800. $copyObj->setDbUtime($this->utime);
  3801. $copyObj->setDbLPtime($this->lptime);
  3802. $copyObj->setDbMd5($this->md5);
  3803. $copyObj->setDbTrackTitle($this->track_title);
  3804. $copyObj->setDbArtistName($this->artist_name);
  3805. $copyObj->setDbBitRate($this->bit_rate);
  3806. $copyObj->setDbSampleRate($this->sample_rate);
  3807. $copyObj->setDbFormat($this->format);
  3808. $copyObj->setDbLength($this->length);
  3809. $copyObj->setDbAlbumTitle($this->album_title);
  3810. $copyObj->setDbGenre($this->genre);
  3811. $copyObj->setDbComments($this->comments);
  3812. $copyObj->setDbYear($this->year);
  3813. $copyObj->setDbTrackNumber($this->track_number);
  3814. $copyObj->setDbChannels($this->channels);
  3815. $copyObj->setDbUrl($this->url);
  3816. $copyObj->setDbBpm($this->bpm);
  3817. $copyObj->setDbRating($this->rating);
  3818. $copyObj->setDbEncodedBy($this->encoded_by);
  3819. $copyObj->setDbDiscNumber($this->disc_number);
  3820. $copyObj->setDbMood($this->mood);
  3821. $copyObj->setDbLabel($this->label);
  3822. $copyObj->setDbComposer($this->composer);
  3823. $copyObj->setDbEncoder($this->encoder);
  3824. $copyObj->setDbChecksum($this->checksum);
  3825. $copyObj->setDbLyrics($this->lyrics);
  3826. $copyObj->setDbOrchestra($this->orchestra);
  3827. $copyObj->setDbConductor($this->conductor);
  3828. $copyObj->setDbLyricist($this->lyricist);
  3829. $copyObj->setDbOriginalLyricist($this->original_lyricist);
  3830. $copyObj->setDbRadioStationName($this->radio_station_name);
  3831. $copyObj->setDbInfoUrl($this->info_url);
  3832. $copyObj->setDbArtistUrl($this->artist_url);
  3833. $copyObj->setDbAudioSourceUrl($this->audio_source_url);
  3834. $copyObj->setDbRadioStationUrl($this->radio_station_url);
  3835. $copyObj->setDbBuyThisUrl($this->buy_this_url);
  3836. $copyObj->setDbIsrcNumber($this->isrc_number);
  3837. $copyObj->setDbCatalogNumber($this->catalog_number);
  3838. $copyObj->setDbOriginalArtist($this->original_artist);
  3839. $copyObj->setDbCopyright($this->copyright);
  3840. $copyObj->setDbReportDatetime($this->report_datetime);
  3841. $copyObj->setDbReportLocation($this->report_location);
  3842. $copyObj->setDbReportOrganization($this->report_organization);
  3843. $copyObj->setDbSubject($this->subject);
  3844. $copyObj->setDbContributor($this->contributor);
  3845. $copyObj->setDbLanguage($this->language);
  3846. $copyObj->setDbFileExists($this->file_exists);
  3847. $copyObj->setDbSoundcloudId($this->soundcloud_id);
  3848. $copyObj->setDbSoundcloudErrorCode($this->soundcloud_error_code);
  3849. $copyObj->setDbSoundcloudErrorMsg($this->soundcloud_error_msg);
  3850. $copyObj->setDbSoundcloudLinkToFile($this->soundcloud_link_to_file);
  3851. $copyObj->setDbSoundCloundUploadTime($this->soundcloud_upload_time);
  3852. $copyObj->setDbReplayGain($this->replay_gain);
  3853. $copyObj->setDbOwnerId($this->owner_id);
  3854. $copyObj->setDbCuein($this->cuein);
  3855. $copyObj->setDbCueout($this->cueout);
  3856. $copyObj->setDbSilanCheck($this->silan_check);
  3857. $copyObj->setDbHidden($this->hidden);
  3858. $copyObj->setDbIsScheduled($this->is_scheduled);
  3859. $copyObj->setDbIsPlaylist($this->is_playlist);
  3860. if ($deepCopy) {
  3861. // important: temporarily setNew(false) because this affects the behavior of
  3862. // the getter/setter methods for fkey referrer objects.
  3863. $copyObj->setNew(false);
  3864. foreach ($this->getCcShowInstancess() as $relObj) {
  3865. if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
  3866. $copyObj->addCcShowInstances($relObj->copy($deepCopy));
  3867. }
  3868. }
  3869. foreach ($this->getCcPlaylistcontentss() as $relObj) {
  3870. if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
  3871. $copyObj->addCcPlaylistcontents($relObj->copy($deepCopy));
  3872. }
  3873. }
  3874. foreach ($this->getCcBlockcontentss() as $relObj) {
  3875. if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
  3876. $copyObj->addCcBlockcontents($relObj->copy($deepCopy));
  3877. }
  3878. }
  3879. foreach ($this->getCcSchedules() as $relObj) {
  3880. if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
  3881. $copyObj->addCcSchedule($relObj->copy($deepCopy));
  3882. }
  3883. }
  3884. foreach ($this->getCcPlayoutHistorys() as $relObj) {
  3885. if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
  3886. $copyObj->addCcPlayoutHistory($relObj->copy($deepCopy));
  3887. }
  3888. }
  3889. } // if ($deepCopy)
  3890. $copyObj->setNew(true);
  3891. $copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value
  3892. }
  3893. /**
  3894. * Makes a copy of this object that will be inserted as a new row in table when saved.
  3895. * It creates a new object filling in the simple attributes, but skipping any primary
  3896. * keys that are defined for the table.
  3897. *
  3898. * If desired, this method can also make copies of all associated (fkey referrers)
  3899. * objects.
  3900. *
  3901. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  3902. * @return CcFiles Clone of current object.
  3903. * @throws PropelException
  3904. */
  3905. public function copy($deepCopy = false)
  3906. {
  3907. // we use get_class(), because this might be a subclass
  3908. $clazz = get_class($this);
  3909. $copyObj = new $clazz();
  3910. $this->copyInto($copyObj, $deepCopy);
  3911. return $copyObj;
  3912. }
  3913. /**
  3914. * Returns a peer instance associated with this om.
  3915. *
  3916. * Since Peer classes are not to have any instance attributes, this method returns the
  3917. * same instance for all member of this class. The method could therefore
  3918. * be static, but this would prevent one from overriding the behavior.
  3919. *
  3920. * @return CcFilesPeer
  3921. */
  3922. public function getPeer()
  3923. {
  3924. if (self::$peer === null) {
  3925. self::$peer = new CcFilesPeer();
  3926. }
  3927. return self::$peer;
  3928. }
  3929. /**
  3930. * Declares an association between this object and a CcSubjs object.
  3931. *
  3932. * @param CcSubjs $v
  3933. * @return CcFiles The current object (for fluent API support)
  3934. * @throws PropelException
  3935. */
  3936. public function setFkOwner(CcSubjs $v = null)
  3937. {
  3938. if ($v === null) {
  3939. $this->setDbOwnerId(NULL);
  3940. } else {
  3941. $this->setDbOwnerId($v->getDbId());
  3942. }
  3943. $this->aFkOwner = $v;
  3944. // Add binding for other direction of this n:n relationship.
  3945. // If this object has already been added to the CcSubjs object, it will not be re-added.
  3946. if ($v !== null) {
  3947. $v->addCcFilesRelatedByDbOwnerId($this);
  3948. }
  3949. return $this;
  3950. }
  3951. /**
  3952. * Get the associated CcSubjs object
  3953. *
  3954. * @param PropelPDO Optional Connection object.
  3955. * @return CcSubjs The associated CcSubjs object.
  3956. * @throws PropelException
  3957. */
  3958. public function getFkOwner(PropelPDO $con = null)
  3959. {
  3960. if ($this->aFkOwner === null && ($this->owner_id !== null)) {
  3961. $this->aFkOwner = CcSubjsQuery::create()->findPk($this->owner_id, $con);
  3962. /* The following can be used additionally to
  3963. guarantee the related object contains a reference
  3964. to this object. This level of coupling may, however, be
  3965. undesirable since it could result in an only partially populated collection
  3966. in the referenced object.
  3967. $this->aFkOwner->addCcFilessRelatedByDbOwnerId($this);
  3968. */
  3969. }
  3970. return $this->aFkOwner;
  3971. }
  3972. /**
  3973. * Declares an association between this object and a CcSubjs object.
  3974. *
  3975. * @param CcSubjs $v
  3976. * @return CcFiles The current object (for fluent API support)
  3977. * @throws PropelException
  3978. */
  3979. public function setCcSubjsRelatedByDbEditedby(CcSubjs $v = null)
  3980. {
  3981. if ($v === null) {
  3982. $this->setDbEditedby(NULL);
  3983. } else {
  3984. $this->setDbEditedby($v->getDbId());
  3985. }
  3986. $this->aCcSubjsRelatedByDbEditedby = $v;
  3987. // Add binding for other direction of this n:n relationship.
  3988. // If this object has already been added to the CcSubjs object, it will not be re-added.
  3989. if ($v !== null) {
  3990. $v->addCcFilesRelatedByDbEditedby($this);
  3991. }
  3992. return $this;
  3993. }
  3994. /**
  3995. * Get the associated CcSubjs object
  3996. *
  3997. * @param PropelPDO Optional Connection object.
  3998. * @return CcSubjs The associated CcSubjs object.
  3999. * @throws PropelException
  4000. */
  4001. public function getCcSubjsRelatedByDbEditedby(PropelPDO $con = null)
  4002. {
  4003. if ($this->aCcSubjsRelatedByDbEditedby === null && ($this->editedby !== null)) {
  4004. $this->aCcSubjsRelatedByDbEditedby = CcSubjsQuery::create()->findPk($this->editedby, $con);
  4005. /* The following can be used additionally to
  4006. guarantee the related object contains a reference
  4007. to this object. This level of coupling may, however, be
  4008. undesirable since it could result in an only partially populated collection
  4009. in the referenced object.
  4010. $this->aCcSubjsRelatedByDbEditedby->addCcFilessRelatedByDbEditedby($this);
  4011. */
  4012. }
  4013. return $this->aCcSubjsRelatedByDbEditedby;
  4014. }
  4015. /**
  4016. * Declares an association between this object and a CcMusicDirs object.
  4017. *
  4018. * @param CcMusicDirs $v
  4019. * @return CcFiles The current object (for fluent API support)
  4020. * @throws PropelException
  4021. */
  4022. public function setCcMusicDirs(CcMusicDirs $v = null)
  4023. {
  4024. if ($v === null) {
  4025. $this->setDbDirectory(NULL);
  4026. } else {
  4027. $this->setDbDirectory($v->getId());
  4028. }
  4029. $this->aCcMusicDirs = $v;
  4030. // Add binding for other direction of this n:n relationship.
  4031. // If this object has already been added to the CcMusicDirs object, it will not be re-added.
  4032. if ($v !== null) {
  4033. $v->addCcFiles($this);
  4034. }
  4035. return $this;
  4036. }
  4037. /**
  4038. * Get the associated CcMusicDirs object
  4039. *
  4040. * @param PropelPDO Optional Connection object.
  4041. * @return CcMusicDirs The associated CcMusicDirs object.
  4042. * @throws PropelException
  4043. */
  4044. public function getCcMusicDirs(PropelPDO $con = null)
  4045. {
  4046. if ($this->aCcMusicDirs === null && ($this->directory !== null)) {
  4047. $this->aCcMusicDirs = CcMusicDirsQuery::create()->findPk($this->directory, $con);
  4048. /* The following can be used additionally to
  4049. guarantee the related object contains a reference
  4050. to this object. This level of coupling may, however, be
  4051. undesirable since it could result in an only partially populated collection
  4052. in the referenced object.
  4053. $this->aCcMusicDirs->addCcFiless($this);
  4054. */
  4055. }
  4056. return $this->aCcMusicDirs;
  4057. }
  4058. /**
  4059. * Clears out the collCcShowInstancess collection
  4060. *
  4061. * This does not modify the database; however, it will remove any associated objects, causing
  4062. * them to be refetched by subsequent calls to accessor method.
  4063. *
  4064. * @return void
  4065. * @see addCcShowInstancess()
  4066. */
  4067. public function clearCcShowInstancess()
  4068. {
  4069. $this->collCcShowInstancess = null; // important to set this to NULL since that means it is uninitialized
  4070. }
  4071. /**
  4072. * Initializes the collCcShowInstancess collection.
  4073. *
  4074. * By default this just sets the collCcShowInstancess collection to an empty array (like clearcollCcShowInstancess());
  4075. * however, you may wish to override this method in your stub class to provide setting appropriate
  4076. * to your application -- for example, setting the initial array to the values stored in database.
  4077. *
  4078. * @return void
  4079. */
  4080. public function initCcShowInstancess()
  4081. {
  4082. $this->collCcShowInstancess = new PropelObjectCollection();
  4083. $this->collCcShowInstancess->setModel('CcShowInstances');
  4084. }
  4085. /**
  4086. * Gets an array of CcShowInstances objects which contain a foreign key that references this object.
  4087. *
  4088. * If the $criteria is not null, it is used to always fetch the results from the database.
  4089. * Otherwise the results are fetched from the database the first time, then cached.
  4090. * Next time the same method is called without $criteria, the cached collection is returned.
  4091. * If this CcFiles is new, it will return
  4092. * an empty collection or the current collection; the criteria is ignored on a new object.
  4093. *
  4094. * @param Criteria $criteria optional Criteria object to narrow the query
  4095. * @param PropelPDO $con optional connection object
  4096. * @return PropelCollection|array CcShowInstances[] List of CcShowInstances objects
  4097. * @throws PropelException
  4098. */
  4099. public function getCcShowInstancess($criteria = null, PropelPDO $con = null)
  4100. {
  4101. if(null === $this->collCcShowInstancess || null !== $criteria) {
  4102. if ($this->isNew() && null === $this->collCcShowInstancess) {
  4103. // return empty collection
  4104. $this->initCcShowInstancess();
  4105. } else {
  4106. $collCcShowInstancess = CcShowInstancesQuery::create(null, $criteria)
  4107. ->filterByCcFiles($this)
  4108. ->find($con);
  4109. if (null !== $criteria) {
  4110. return $collCcShowInstancess;
  4111. }
  4112. $this->collCcShowInstancess = $collCcShowInstancess;
  4113. }
  4114. }
  4115. return $this->collCcShowInstancess;
  4116. }
  4117. /**
  4118. * Returns the number of related CcShowInstances objects.
  4119. *
  4120. * @param Criteria $criteria
  4121. * @param boolean $distinct
  4122. * @param PropelPDO $con
  4123. * @return int Count of related CcShowInstances objects.
  4124. * @throws PropelException
  4125. */
  4126. public function countCcShowInstancess(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
  4127. {
  4128. if(null === $this->collCcShowInstancess || null !== $criteria) {
  4129. if ($this->isNew() && null === $this->collCcShowInstancess) {
  4130. return 0;
  4131. } else {
  4132. $query = CcShowInstancesQuery::create(null, $criteria);
  4133. if($distinct) {
  4134. $query->distinct();
  4135. }
  4136. return $query
  4137. ->filterByCcFiles($this)
  4138. ->count($con);
  4139. }
  4140. } else {
  4141. return count($this->collCcShowInstancess);
  4142. }
  4143. }
  4144. /**
  4145. * Method called to associate a CcShowInstances object to this object
  4146. * through the CcShowInstances foreign key attribute.
  4147. *
  4148. * @param CcShowInstances $l CcShowInstances
  4149. * @return void
  4150. * @throws PropelException
  4151. */
  4152. public function addCcShowInstances(CcShowInstances $l)
  4153. {
  4154. if ($this->collCcShowInstancess === null) {
  4155. $this->initCcShowInstancess();
  4156. }
  4157. if (!$this->collCcShowInstancess->contains($l)) { // only add it if the **same** object is not already associated
  4158. $this->collCcShowInstancess[]= $l;
  4159. $l->setCcFiles($this);
  4160. }
  4161. }
  4162. /**
  4163. * If this collection has already been initialized with
  4164. * an identical criteria, it returns the collection.
  4165. * Otherwise if this CcFiles is new, it will return
  4166. * an empty collection; or if this CcFiles has previously
  4167. * been saved, it will retrieve related CcShowInstancess from storage.
  4168. *
  4169. * This method is protected by default in order to keep the public
  4170. * api reasonable. You can provide public methods for those you
  4171. * actually need in CcFiles.
  4172. *
  4173. * @param Criteria $criteria optional Criteria object to narrow the query
  4174. * @param PropelPDO $con optional connection object
  4175. * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
  4176. * @return PropelCollection|array CcShowInstances[] List of CcShowInstances objects
  4177. */
  4178. public function getCcShowInstancessJoinCcShow($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  4179. {
  4180. $query = CcShowInstancesQuery::create(null, $criteria);
  4181. $query->joinWith('CcShow', $join_behavior);
  4182. return $this->getCcShowInstancess($query, $con);
  4183. }
  4184. /**
  4185. * If this collection has already been initialized with
  4186. * an identical criteria, it returns the collection.
  4187. * Otherwise if this CcFiles is new, it will return
  4188. * an empty collection; or if this CcFiles has previously
  4189. * been saved, it will retrieve related CcShowInstancess from storage.
  4190. *
  4191. * This method is protected by default in order to keep the public
  4192. * api reasonable. You can provide public methods for those you
  4193. * actually need in CcFiles.
  4194. *
  4195. * @param Criteria $criteria optional Criteria object to narrow the query
  4196. * @param PropelPDO $con optional connection object
  4197. * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
  4198. * @return PropelCollection|array CcShowInstances[] List of CcShowInstances objects
  4199. */
  4200. public function getCcShowInstancessJoinCcShowInstancesRelatedByDbOriginalShow($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  4201. {
  4202. $query = CcShowInstancesQuery::create(null, $criteria);
  4203. $query->joinWith('CcShowInstancesRelatedByDbOriginalShow', $join_behavior);
  4204. return $this->getCcShowInstancess($query, $con);
  4205. }
  4206. /**
  4207. * Clears out the collCcPlaylistcontentss collection
  4208. *
  4209. * This does not modify the database; however, it will remove any associated objects, causing
  4210. * them to be refetched by subsequent calls to accessor method.
  4211. *
  4212. * @return void
  4213. * @see addCcPlaylistcontentss()
  4214. */
  4215. public function clearCcPlaylistcontentss()
  4216. {
  4217. $this->collCcPlaylistcontentss = null; // important to set this to NULL since that means it is uninitialized
  4218. }
  4219. /**
  4220. * Initializes the collCcPlaylistcontentss collection.
  4221. *
  4222. * By default this just sets the collCcPlaylistcontentss collection to an empty array (like clearcollCcPlaylistcontentss());
  4223. * however, you may wish to override this method in your stub class to provide setting appropriate
  4224. * to your application -- for example, setting the initial array to the values stored in database.
  4225. *
  4226. * @return void
  4227. */
  4228. public function initCcPlaylistcontentss()
  4229. {
  4230. $this->collCcPlaylistcontentss = new PropelObjectCollection();
  4231. $this->collCcPlaylistcontentss->setModel('CcPlaylistcontents');
  4232. }
  4233. /**
  4234. * Gets an array of CcPlaylistcontents objects which contain a foreign key that references this object.
  4235. *
  4236. * If the $criteria is not null, it is used to always fetch the results from the database.
  4237. * Otherwise the results are fetched from the database the first time, then cached.
  4238. * Next time the same method is called without $criteria, the cached collection is returned.
  4239. * If this CcFiles is new, it will return
  4240. * an empty collection or the current collection; the criteria is ignored on a new object.
  4241. *
  4242. * @param Criteria $criteria optional Criteria object to narrow the query
  4243. * @param PropelPDO $con optional connection object
  4244. * @return PropelCollection|array CcPlaylistcontents[] List of CcPlaylistcontents objects
  4245. * @throws PropelException
  4246. */
  4247. public function getCcPlaylistcontentss($criteria = null, PropelPDO $con = null)
  4248. {
  4249. if(null === $this->collCcPlaylistcontentss || null !== $criteria) {
  4250. if ($this->isNew() && null === $this->collCcPlaylistcontentss) {
  4251. // return empty collection
  4252. $this->initCcPlaylistcontentss();
  4253. } else {
  4254. $collCcPlaylistcontentss = CcPlaylistcontentsQuery::create(null, $criteria)
  4255. ->filterByCcFiles($this)
  4256. ->find($con);
  4257. if (null !== $criteria) {
  4258. return $collCcPlaylistcontentss;
  4259. }
  4260. $this->collCcPlaylistcontentss = $collCcPlaylistcontentss;
  4261. }
  4262. }
  4263. return $this->collCcPlaylistcontentss;
  4264. }
  4265. /**
  4266. * Returns the number of related CcPlaylistcontents objects.
  4267. *
  4268. * @param Criteria $criteria
  4269. * @param boolean $distinct
  4270. * @param PropelPDO $con
  4271. * @return int Count of related CcPlaylistcontents objects.
  4272. * @throws PropelException
  4273. */
  4274. public function countCcPlaylistcontentss(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
  4275. {
  4276. if(null === $this->collCcPlaylistcontentss || null !== $criteria) {
  4277. if ($this->isNew() && null === $this->collCcPlaylistcontentss) {
  4278. return 0;
  4279. } else {
  4280. $query = CcPlaylistcontentsQuery::create(null, $criteria);
  4281. if($distinct) {
  4282. $query->distinct();
  4283. }
  4284. return $query
  4285. ->filterByCcFiles($this)
  4286. ->count($con);
  4287. }
  4288. } else {
  4289. return count($this->collCcPlaylistcontentss);
  4290. }
  4291. }
  4292. /**
  4293. * Method called to associate a CcPlaylistcontents object to this object
  4294. * through the CcPlaylistcontents foreign key attribute.
  4295. *
  4296. * @param CcPlaylistcontents $l CcPlaylistcontents
  4297. * @return void
  4298. * @throws PropelException
  4299. */
  4300. public function addCcPlaylistcontents(CcPlaylistcontents $l)
  4301. {
  4302. if ($this->collCcPlaylistcontentss === null) {
  4303. $this->initCcPlaylistcontentss();
  4304. }
  4305. if (!$this->collCcPlaylistcontentss->contains($l)) { // only add it if the **same** object is not already associated
  4306. $this->collCcPlaylistcontentss[]= $l;
  4307. $l->setCcFiles($this);
  4308. }
  4309. }
  4310. /**
  4311. * If this collection has already been initialized with
  4312. * an identical criteria, it returns the collection.
  4313. * Otherwise if this CcFiles is new, it will return
  4314. * an empty collection; or if this CcFiles has previously
  4315. * been saved, it will retrieve related CcPlaylistcontentss from storage.
  4316. *
  4317. * This method is protected by default in order to keep the public
  4318. * api reasonable. You can provide public methods for those you
  4319. * actually need in CcFiles.
  4320. *
  4321. * @param Criteria $criteria optional Criteria object to narrow the query
  4322. * @param PropelPDO $con optional connection object
  4323. * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
  4324. * @return PropelCollection|array CcPlaylistcontents[] List of CcPlaylistcontents objects
  4325. */
  4326. public function getCcPlaylistcontentssJoinCcBlock($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  4327. {
  4328. $query = CcPlaylistcontentsQuery::create(null, $criteria);
  4329. $query->joinWith('CcBlock', $join_behavior);
  4330. return $this->getCcPlaylistcontentss($query, $con);
  4331. }
  4332. /**
  4333. * If this collection has already been initialized with
  4334. * an identical criteria, it returns the collection.
  4335. * Otherwise if this CcFiles is new, it will return
  4336. * an empty collection; or if this CcFiles has previously
  4337. * been saved, it will retrieve related CcPlaylistcontentss from storage.
  4338. *
  4339. * This method is protected by default in order to keep the public
  4340. * api reasonable. You can provide public methods for those you
  4341. * actually need in CcFiles.
  4342. *
  4343. * @param Criteria $criteria optional Criteria object to narrow the query
  4344. * @param PropelPDO $con optional connection object
  4345. * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
  4346. * @return PropelCollection|array CcPlaylistcontents[] List of CcPlaylistcontents objects
  4347. */
  4348. public function getCcPlaylistcontentssJoinCcPlaylist($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  4349. {
  4350. $query = CcPlaylistcontentsQuery::create(null, $criteria);
  4351. $query->joinWith('CcPlaylist', $join_behavior);
  4352. return $this->getCcPlaylistcontentss($query, $con);
  4353. }
  4354. /**
  4355. * Clears out the collCcBlockcontentss collection
  4356. *
  4357. * This does not modify the database; however, it will remove any associated objects, causing
  4358. * them to be refetched by subsequent calls to accessor method.
  4359. *
  4360. * @return void
  4361. * @see addCcBlockcontentss()
  4362. */
  4363. public function clearCcBlockcontentss()
  4364. {
  4365. $this->collCcBlockcontentss = null; // important to set this to NULL since that means it is uninitialized
  4366. }
  4367. /**
  4368. * Initializes the collCcBlockcontentss collection.
  4369. *
  4370. * By default this just sets the collCcBlockcontentss collection to an empty array (like clearcollCcBlockcontentss());
  4371. * however, you may wish to override this method in your stub class to provide setting appropriate
  4372. * to your application -- for example, setting the initial array to the values stored in database.
  4373. *
  4374. * @return void
  4375. */
  4376. public function initCcBlockcontentss()
  4377. {
  4378. $this->collCcBlockcontentss = new PropelObjectCollection();
  4379. $this->collCcBlockcontentss->setModel('CcBlockcontents');
  4380. }
  4381. /**
  4382. * Gets an array of CcBlockcontents objects which contain a foreign key that references this object.
  4383. *
  4384. * If the $criteria is not null, it is used to always fetch the results from the database.
  4385. * Otherwise the results are fetched from the database the first time, then cached.
  4386. * Next time the same method is called without $criteria, the cached collection is returned.
  4387. * If this CcFiles is new, it will return
  4388. * an empty collection or the current collection; the criteria is ignored on a new object.
  4389. *
  4390. * @param Criteria $criteria optional Criteria object to narrow the query
  4391. * @param PropelPDO $con optional connection object
  4392. * @return PropelCollection|array CcBlockcontents[] List of CcBlockcontents objects
  4393. * @throws PropelException
  4394. */
  4395. public function getCcBlockcontentss($criteria = null, PropelPDO $con = null)
  4396. {
  4397. if(null === $this->collCcBlockcontentss || null !== $criteria) {
  4398. if ($this->isNew() && null === $this->collCcBlockcontentss) {
  4399. // return empty collection
  4400. $this->initCcBlockcontentss();
  4401. } else {
  4402. $collCcBlockcontentss = CcBlockcontentsQuery::create(null, $criteria)
  4403. ->filterByCcFiles($this)
  4404. ->find($con);
  4405. if (null !== $criteria) {
  4406. return $collCcBlockcontentss;
  4407. }
  4408. $this->collCcBlockcontentss = $collCcBlockcontentss;
  4409. }
  4410. }
  4411. return $this->collCcBlockcontentss;
  4412. }
  4413. /**
  4414. * Returns the number of related CcBlockcontents objects.
  4415. *
  4416. * @param Criteria $criteria
  4417. * @param boolean $distinct
  4418. * @param PropelPDO $con
  4419. * @return int Count of related CcBlockcontents objects.
  4420. * @throws PropelException
  4421. */
  4422. public function countCcBlockcontentss(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
  4423. {
  4424. if(null === $this->collCcBlockcontentss || null !== $criteria) {
  4425. if ($this->isNew() && null === $this->collCcBlockcontentss) {
  4426. return 0;
  4427. } else {
  4428. $query = CcBlockcontentsQuery::create(null, $criteria);
  4429. if($distinct) {
  4430. $query->distinct();
  4431. }
  4432. return $query
  4433. ->filterByCcFiles($this)
  4434. ->count($con);
  4435. }
  4436. } else {
  4437. return count($this->collCcBlockcontentss);
  4438. }
  4439. }
  4440. /**
  4441. * Method called to associate a CcBlockcontents object to this object
  4442. * through the CcBlockcontents foreign key attribute.
  4443. *
  4444. * @param CcBlockcontents $l CcBlockcontents
  4445. * @return void
  4446. * @throws PropelException
  4447. */
  4448. public function addCcBlockcontents(CcBlockcontents $l)
  4449. {
  4450. if ($this->collCcBlockcontentss === null) {
  4451. $this->initCcBlockcontentss();
  4452. }
  4453. if (!$this->collCcBlockcontentss->contains($l)) { // only add it if the **same** object is not already associated
  4454. $this->collCcBlockcontentss[]= $l;
  4455. $l->setCcFiles($this);
  4456. }
  4457. }
  4458. /**
  4459. * If this collection has already been initialized with
  4460. * an identical criteria, it returns the collection.
  4461. * Otherwise if this CcFiles is new, it will return
  4462. * an empty collection; or if this CcFiles has previously
  4463. * been saved, it will retrieve related CcBlockcontentss from storage.
  4464. *
  4465. * This method is protected by default in order to keep the public
  4466. * api reasonable. You can provide public methods for those you
  4467. * actually need in CcFiles.
  4468. *
  4469. * @param Criteria $criteria optional Criteria object to narrow the query
  4470. * @param PropelPDO $con optional connection object
  4471. * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
  4472. * @return PropelCollection|array CcBlockcontents[] List of CcBlockcontents objects
  4473. */
  4474. public function getCcBlockcontentssJoinCcBlock($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  4475. {
  4476. $query = CcBlockcontentsQuery::create(null, $criteria);
  4477. $query->joinWith('CcBlock', $join_behavior);
  4478. return $this->getCcBlockcontentss($query, $con);
  4479. }
  4480. /**
  4481. * Clears out the collCcSchedules collection
  4482. *
  4483. * This does not modify the database; however, it will remove any associated objects, causing
  4484. * them to be refetched by subsequent calls to accessor method.
  4485. *
  4486. * @return void
  4487. * @see addCcSchedules()
  4488. */
  4489. public function clearCcSchedules()
  4490. {
  4491. $this->collCcSchedules = null; // important to set this to NULL since that means it is uninitialized
  4492. }
  4493. /**
  4494. * Initializes the collCcSchedules collection.
  4495. *
  4496. * By default this just sets the collCcSchedules collection to an empty array (like clearcollCcSchedules());
  4497. * however, you may wish to override this method in your stub class to provide setting appropriate
  4498. * to your application -- for example, setting the initial array to the values stored in database.
  4499. *
  4500. * @return void
  4501. */
  4502. public function initCcSchedules()
  4503. {
  4504. $this->collCcSchedules = new PropelObjectCollection();
  4505. $this->collCcSchedules->setModel('CcSchedule');
  4506. }
  4507. /**
  4508. * Gets an array of CcSchedule objects which contain a foreign key that references this object.
  4509. *
  4510. * If the $criteria is not null, it is used to always fetch the results from the database.
  4511. * Otherwise the results are fetched from the database the first time, then cached.
  4512. * Next time the same method is called without $criteria, the cached collection is returned.
  4513. * If this CcFiles is new, it will return
  4514. * an empty collection or the current collection; the criteria is ignored on a new object.
  4515. *
  4516. * @param Criteria $criteria optional Criteria object to narrow the query
  4517. * @param PropelPDO $con optional connection object
  4518. * @return PropelCollection|array CcSchedule[] List of CcSchedule objects
  4519. * @throws PropelException
  4520. */
  4521. public function getCcSchedules($criteria = null, PropelPDO $con = null)
  4522. {
  4523. if(null === $this->collCcSchedules || null !== $criteria) {
  4524. if ($this->isNew() && null === $this->collCcSchedules) {
  4525. // return empty collection
  4526. $this->initCcSchedules();
  4527. } else {
  4528. $collCcSchedules = CcScheduleQuery::create(null, $criteria)
  4529. ->filterByCcFiles($this)
  4530. ->find($con);
  4531. if (null !== $criteria) {
  4532. return $collCcSchedules;
  4533. }
  4534. $this->collCcSchedules = $collCcSchedules;
  4535. }
  4536. }
  4537. return $this->collCcSchedules;
  4538. }
  4539. /**
  4540. * Returns the number of related CcSchedule objects.
  4541. *
  4542. * @param Criteria $criteria
  4543. * @param boolean $distinct
  4544. * @param PropelPDO $con
  4545. * @return int Count of related CcSchedule objects.
  4546. * @throws PropelException
  4547. */
  4548. public function countCcSchedules(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
  4549. {
  4550. if(null === $this->collCcSchedules || null !== $criteria) {
  4551. if ($this->isNew() && null === $this->collCcSchedules) {
  4552. return 0;
  4553. } else {
  4554. $query = CcScheduleQuery::create(null, $criteria);
  4555. if($distinct) {
  4556. $query->distinct();
  4557. }
  4558. return $query
  4559. ->filterByCcFiles($this)
  4560. ->count($con);
  4561. }
  4562. } else {
  4563. return count($this->collCcSchedules);
  4564. }
  4565. }
  4566. /**
  4567. * Method called to associate a CcSchedule object to this object
  4568. * through the CcSchedule foreign key attribute.
  4569. *
  4570. * @param CcSchedule $l CcSchedule
  4571. * @return void
  4572. * @throws PropelException
  4573. */
  4574. public function addCcSchedule(CcSchedule $l)
  4575. {
  4576. if ($this->collCcSchedules === null) {
  4577. $this->initCcSchedules();
  4578. }
  4579. if (!$this->collCcSchedules->contains($l)) { // only add it if the **same** object is not already associated
  4580. $this->collCcSchedules[]= $l;
  4581. $l->setCcFiles($this);
  4582. }
  4583. }
  4584. /**
  4585. * If this collection has already been initialized with
  4586. * an identical criteria, it returns the collection.
  4587. * Otherwise if this CcFiles is new, it will return
  4588. * an empty collection; or if this CcFiles has previously
  4589. * been saved, it will retrieve related CcSchedules from storage.
  4590. *
  4591. * This method is protected by default in order to keep the public
  4592. * api reasonable. You can provide public methods for those you
  4593. * actually need in CcFiles.
  4594. *
  4595. * @param Criteria $criteria optional Criteria object to narrow the query
  4596. * @param PropelPDO $con optional connection object
  4597. * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
  4598. * @return PropelCollection|array CcSchedule[] List of CcSchedule objects
  4599. */
  4600. public function getCcSchedulesJoinCcShowInstances($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  4601. {
  4602. $query = CcScheduleQuery::create(null, $criteria);
  4603. $query->joinWith('CcShowInstances', $join_behavior);
  4604. return $this->getCcSchedules($query, $con);
  4605. }
  4606. /**
  4607. * If this collection has already been initialized with
  4608. * an identical criteria, it returns the collection.
  4609. * Otherwise if this CcFiles is new, it will return
  4610. * an empty collection; or if this CcFiles has previously
  4611. * been saved, it will retrieve related CcSchedules from storage.
  4612. *
  4613. * This method is protected by default in order to keep the public
  4614. * api reasonable. You can provide public methods for those you
  4615. * actually need in CcFiles.
  4616. *
  4617. * @param Criteria $criteria optional Criteria object to narrow the query
  4618. * @param PropelPDO $con optional connection object
  4619. * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
  4620. * @return PropelCollection|array CcSchedule[] List of CcSchedule objects
  4621. */
  4622. public function getCcSchedulesJoinCcWebstream($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  4623. {
  4624. $query = CcScheduleQuery::create(null, $criteria);
  4625. $query->joinWith('CcWebstream', $join_behavior);
  4626. return $this->getCcSchedules($query, $con);
  4627. }
  4628. /**
  4629. * Clears out the collCcPlayoutHistorys collection
  4630. *
  4631. * This does not modify the database; however, it will remove any associated objects, causing
  4632. * them to be refetched by subsequent calls to accessor method.
  4633. *
  4634. * @return void
  4635. * @see addCcPlayoutHistorys()
  4636. */
  4637. public function clearCcPlayoutHistorys()
  4638. {
  4639. $this->collCcPlayoutHistorys = null; // important to set this to NULL since that means it is uninitialized
  4640. }
  4641. /**
  4642. * Initializes the collCcPlayoutHistorys collection.
  4643. *
  4644. * By default this just sets the collCcPlayoutHistorys collection to an empty array (like clearcollCcPlayoutHistorys());
  4645. * however, you may wish to override this method in your stub class to provide setting appropriate
  4646. * to your application -- for example, setting the initial array to the values stored in database.
  4647. *
  4648. * @return void
  4649. */
  4650. public function initCcPlayoutHistorys()
  4651. {
  4652. $this->collCcPlayoutHistorys = new PropelObjectCollection();
  4653. $this->collCcPlayoutHistorys->setModel('CcPlayoutHistory');
  4654. }
  4655. /**
  4656. * Gets an array of CcPlayoutHistory objects which contain a foreign key that references this object.
  4657. *
  4658. * If the $criteria is not null, it is used to always fetch the results from the database.
  4659. * Otherwise the results are fetched from the database the first time, then cached.
  4660. * Next time the same method is called without $criteria, the cached collection is returned.
  4661. * If this CcFiles is new, it will return
  4662. * an empty collection or the current collection; the criteria is ignored on a new object.
  4663. *
  4664. * @param Criteria $criteria optional Criteria object to narrow the query
  4665. * @param PropelPDO $con optional connection object
  4666. * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects
  4667. * @throws PropelException
  4668. */
  4669. public function getCcPlayoutHistorys($criteria = null, PropelPDO $con = null)
  4670. {
  4671. if(null === $this->collCcPlayoutHistorys || null !== $criteria) {
  4672. if ($this->isNew() && null === $this->collCcPlayoutHistorys) {
  4673. // return empty collection
  4674. $this->initCcPlayoutHistorys();
  4675. } else {
  4676. $collCcPlayoutHistorys = CcPlayoutHistoryQuery::create(null, $criteria)
  4677. ->filterByCcFiles($this)
  4678. ->find($con);
  4679. if (null !== $criteria) {
  4680. return $collCcPlayoutHistorys;
  4681. }
  4682. $this->collCcPlayoutHistorys = $collCcPlayoutHistorys;
  4683. }
  4684. }
  4685. return $this->collCcPlayoutHistorys;
  4686. }
  4687. /**
  4688. * Returns the number of related CcPlayoutHistory objects.
  4689. *
  4690. * @param Criteria $criteria
  4691. * @param boolean $distinct
  4692. * @param PropelPDO $con
  4693. * @return int Count of related CcPlayoutHistory objects.
  4694. * @throws PropelException
  4695. */
  4696. public function countCcPlayoutHistorys(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
  4697. {
  4698. if(null === $this->collCcPlayoutHistorys || null !== $criteria) {
  4699. if ($this->isNew() && null === $this->collCcPlayoutHistorys) {
  4700. return 0;
  4701. } else {
  4702. $query = CcPlayoutHistoryQuery::create(null, $criteria);
  4703. if($distinct) {
  4704. $query->distinct();
  4705. }
  4706. return $query
  4707. ->filterByCcFiles($this)
  4708. ->count($con);
  4709. }
  4710. } else {
  4711. return count($this->collCcPlayoutHistorys);
  4712. }
  4713. }
  4714. /**
  4715. * Method called to associate a CcPlayoutHistory object to this object
  4716. * through the CcPlayoutHistory foreign key attribute.
  4717. *
  4718. * @param CcPlayoutHistory $l CcPlayoutHistory
  4719. * @return void
  4720. * @throws PropelException
  4721. */
  4722. public function addCcPlayoutHistory(CcPlayoutHistory $l)
  4723. {
  4724. if ($this->collCcPlayoutHistorys === null) {
  4725. $this->initCcPlayoutHistorys();
  4726. }
  4727. if (!$this->collCcPlayoutHistorys->contains($l)) { // only add it if the **same** object is not already associated
  4728. $this->collCcPlayoutHistorys[]= $l;
  4729. $l->setCcFiles($this);
  4730. }
  4731. }
  4732. /**
  4733. * If this collection has already been initialized with
  4734. * an identical criteria, it returns the collection.
  4735. * Otherwise if this CcFiles is new, it will return
  4736. * an empty collection; or if this CcFiles has previously
  4737. * been saved, it will retrieve related CcPlayoutHistorys from storage.
  4738. *
  4739. * This method is protected by default in order to keep the public
  4740. * api reasonable. You can provide public methods for those you
  4741. * actually need in CcFiles.
  4742. *
  4743. * @param Criteria $criteria optional Criteria object to narrow the query
  4744. * @param PropelPDO $con optional connection object
  4745. * @param string $join_behavior optional join type to use (defaults to Criteria::LEFT_JOIN)
  4746. * @return PropelCollection|array CcPlayoutHistory[] List of CcPlayoutHistory objects
  4747. */
  4748. public function getCcPlayoutHistorysJoinCcShowInstances($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
  4749. {
  4750. $query = CcPlayoutHistoryQuery::create(null, $criteria);
  4751. $query->joinWith('CcShowInstances', $join_behavior);
  4752. return $this->getCcPlayoutHistorys($query, $con);
  4753. }
  4754. /**
  4755. * Clears the current object and sets all attributes to their default values
  4756. */
  4757. public function clear()
  4758. {
  4759. $this->id = null;
  4760. $this->name = null;
  4761. $this->mime = null;
  4762. $this->ftype = null;
  4763. $this->directory = null;
  4764. $this->filepath = null;
  4765. $this->state = null;
  4766. $this->currentlyaccessing = null;
  4767. $this->editedby = null;
  4768. $this->mtime = null;
  4769. $this->utime = null;
  4770. $this->lptime = null;
  4771. $this->md5 = null;
  4772. $this->track_title = null;
  4773. $this->artist_name = null;
  4774. $this->bit_rate = null;
  4775. $this->sample_rate = null;
  4776. $this->format = null;
  4777. $this->length = null;
  4778. $this->album_title = null;
  4779. $this->genre = null;
  4780. $this->comments = null;
  4781. $this->year = null;
  4782. $this->track_number = null;
  4783. $this->channels = null;
  4784. $this->url = null;
  4785. $this->bpm = null;
  4786. $this->rating = null;
  4787. $this->encoded_by = null;
  4788. $this->disc_number = null;
  4789. $this->mood = null;
  4790. $this->label = null;
  4791. $this->composer = null;
  4792. $this->encoder = null;
  4793. $this->checksum = null;
  4794. $this->lyrics = null;
  4795. $this->orchestra = null;
  4796. $this->conductor = null;
  4797. $this->lyricist = null;
  4798. $this->original_lyricist = null;
  4799. $this->radio_station_name = null;
  4800. $this->info_url = null;
  4801. $this->artist_url = null;
  4802. $this->audio_source_url = null;
  4803. $this->radio_station_url = null;
  4804. $this->buy_this_url = null;
  4805. $this->isrc_number = null;
  4806. $this->catalog_number = null;
  4807. $this->original_artist = null;
  4808. $this->copyright = null;
  4809. $this->report_datetime = null;
  4810. $this->report_location = null;
  4811. $this->report_organization = null;
  4812. $this->subject = null;
  4813. $this->contributor = null;
  4814. $this->language = null;
  4815. $this->file_exists = null;
  4816. $this->soundcloud_id = null;
  4817. $this->soundcloud_error_code = null;
  4818. $this->soundcloud_error_msg = null;
  4819. $this->soundcloud_link_to_file = null;
  4820. $this->soundcloud_upload_time = null;
  4821. $this->replay_gain = null;
  4822. $this->owner_id = null;
  4823. $this->cuein = null;
  4824. $this->cueout = null;
  4825. $this->silan_check = null;
  4826. $this->hidden = null;
  4827. $this->is_scheduled = null;
  4828. $this->is_playlist = null;
  4829. $this->alreadyInSave = false;
  4830. $this->alreadyInValidation = false;
  4831. $this->clearAllReferences();
  4832. $this->applyDefaultValues();
  4833. $this->resetModified();
  4834. $this->setNew(true);
  4835. $this->setDeleted(false);
  4836. }
  4837. /**
  4838. * Resets all collections of referencing foreign keys.
  4839. *
  4840. * This method is a user-space workaround for PHP's inability to garbage collect objects
  4841. * with circular references. This is currently necessary when using Propel in certain
  4842. * daemon or large-volumne/high-memory operations.
  4843. *
  4844. * @param boolean $deep Whether to also clear the references on all associated objects.
  4845. */
  4846. public function clearAllReferences($deep = false)
  4847. {
  4848. if ($deep) {
  4849. if ($this->collCcShowInstancess) {
  4850. foreach ((array) $this->collCcShowInstancess as $o) {
  4851. $o->clearAllReferences($deep);
  4852. }
  4853. }
  4854. if ($this->collCcPlaylistcontentss) {
  4855. foreach ((array) $this->collCcPlaylistcontentss as $o) {
  4856. $o->clearAllReferences($deep);
  4857. }
  4858. }
  4859. if ($this->collCcBlockcontentss) {
  4860. foreach ((array) $this->collCcBlockcontentss as $o) {
  4861. $o->clearAllReferences($deep);
  4862. }
  4863. }
  4864. if ($this->collCcSchedules) {
  4865. foreach ((array) $this->collCcSchedules as $o) {
  4866. $o->clearAllReferences($deep);
  4867. }
  4868. }
  4869. if ($this->collCcPlayoutHistorys) {
  4870. foreach ((array) $this->collCcPlayoutHistorys as $o) {
  4871. $o->clearAllReferences($deep);
  4872. }
  4873. }
  4874. } // if ($deep)
  4875. $this->collCcShowInstancess = null;
  4876. $this->collCcPlaylistcontentss = null;
  4877. $this->collCcBlockcontentss = null;
  4878. $this->collCcSchedules = null;
  4879. $this->collCcPlayoutHistorys = null;
  4880. $this->aFkOwner = null;
  4881. $this->aCcSubjsRelatedByDbEditedby = null;
  4882. $this->aCcMusicDirs = null;
  4883. }
  4884. /**
  4885. * Catches calls to virtual methods
  4886. */
  4887. public function __call($name, $params)
  4888. {
  4889. if (preg_match('/get(\w+)/', $name, $matches)) {
  4890. $virtualColumn = $matches[1];
  4891. if ($this->hasVirtualColumn($virtualColumn)) {
  4892. return $this->getVirtualColumn($virtualColumn);
  4893. }
  4894. // no lcfirst in php<5.3...
  4895. $virtualColumn[0] = strtolower($virtualColumn[0]);
  4896. if ($this->hasVirtualColumn($virtualColumn)) {
  4897. return $this->getVirtualColumn($virtualColumn);
  4898. }
  4899. }
  4900. throw new PropelException('Call to undefined method: ' . $name);
  4901. }
  4902. } // BaseCcFiles