BaseKataoMember.php 98 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517
  1. <?php
  2. /**
  3. * Base class that represents a row from the 'katao_member' table.
  4. *
  5. *
  6. *
  7. * @package lib.model.om
  8. */
  9. abstract class BaseKataoMember extends BaseObject implements Persistent {
  10. /**
  11. * The Peer class.
  12. * Instance provides a convenient way of calling static methods on a class
  13. * that calling code may not be able to identify.
  14. * @var KataoMemberPeer
  15. */
  16. protected static $peer;
  17. /**
  18. * The value for the id field.
  19. * @var int
  20. */
  21. protected $id;
  22. /**
  23. * The value for the katao_index field.
  24. * @var int
  25. */
  26. protected $katao_index;
  27. /**
  28. * The value for the katao_node_id field.
  29. * @var int
  30. */
  31. protected $katao_node_id;
  32. /**
  33. * The value for the next_katao_node_id field.
  34. * @var int
  35. */
  36. protected $next_katao_node_id;
  37. /**
  38. * The value for the katao_member_id field.
  39. * @var int
  40. */
  41. protected $katao_member_id;
  42. /**
  43. * The value for the first_name field.
  44. * @var string
  45. */
  46. protected $first_name;
  47. /**
  48. * The value for the last_name field.
  49. * @var string
  50. */
  51. protected $last_name;
  52. /**
  53. * The value for the accounting_code field.
  54. * @var string
  55. */
  56. protected $accounting_code;
  57. /**
  58. * The value for the accounting_code_sol field.
  59. * @var string
  60. */
  61. protected $accounting_code_sol;
  62. /**
  63. * The value for the initial_amount_euro field.
  64. * @var double
  65. */
  66. protected $initial_amount_euro = 0;
  67. /**
  68. * The value for the initial_amount_sol field.
  69. * @var int
  70. */
  71. protected $initial_amount_sol = 0;
  72. /**
  73. * The value for the is_referer field.
  74. * @var int
  75. */
  76. protected $is_referer = 0;
  77. /**
  78. * The value for the is_delegate field.
  79. * @var int
  80. */
  81. protected $is_delegate = 0;
  82. /**
  83. * The value for the is_anonymous field.
  84. * @var int
  85. */
  86. protected $is_anonymous = 0;
  87. /**
  88. * The value for the is_member field.
  89. * @var int
  90. */
  91. protected $is_member = 1;
  92. /**
  93. * The value for the card_number_sol field.
  94. * @var string
  95. */
  96. protected $card_number_sol;
  97. /**
  98. * The value for the user_situation field.
  99. * @var string
  100. */
  101. protected $user_situation;
  102. /**
  103. * The value for the user_birthday field.
  104. * @var int
  105. */
  106. protected $user_birthday;
  107. /**
  108. * The value for the parrain_name field.
  109. * @var string
  110. */
  111. protected $parrain_name;
  112. /**
  113. * The value for the created_at field.
  114. * @var int
  115. */
  116. protected $created_at;
  117. /**
  118. * The value for the updated_at field.
  119. * @var int
  120. */
  121. protected $updated_at;
  122. /**
  123. * @var KataoNode
  124. */
  125. protected $aKataoNodeRelatedByKataoNodeId;
  126. /**
  127. * @var KataoNode
  128. */
  129. protected $aKataoNodeRelatedByNextKataoNodeId;
  130. /**
  131. * @var KataoMember
  132. */
  133. protected $aKataoMemberRelatedByKataoMemberId;
  134. /**
  135. * Collection to store aggregation of collKataoConfigs.
  136. * @var array
  137. */
  138. protected $collKataoConfigs;
  139. /**
  140. * The criteria used to select the current contents of collKataoConfigs.
  141. * @var Criteria
  142. */
  143. protected $lastKataoConfigCriteria = null;
  144. /**
  145. * Collection to store aggregation of collKataoUsers.
  146. * @var array
  147. */
  148. protected $collKataoUsers;
  149. /**
  150. * The criteria used to select the current contents of collKataoUsers.
  151. * @var Criteria
  152. */
  153. protected $lastKataoUserCriteria = null;
  154. /**
  155. * Collection to store aggregation of collKataoMembersRelatedByKataoMemberId.
  156. * @var array
  157. */
  158. protected $collKataoMembersRelatedByKataoMemberId;
  159. /**
  160. * The criteria used to select the current contents of collKataoMembersRelatedByKataoMemberId.
  161. * @var Criteria
  162. */
  163. protected $lastKataoMemberRelatedByKataoMemberIdCriteria = null;
  164. /**
  165. * Collection to store aggregation of collKataoSuppliersRelatedByMemberId.
  166. * @var array
  167. */
  168. protected $collKataoSuppliersRelatedByMemberId;
  169. /**
  170. * The criteria used to select the current contents of collKataoSuppliersRelatedByMemberId.
  171. * @var Criteria
  172. */
  173. protected $lastKataoSupplierRelatedByMemberIdCriteria = null;
  174. /**
  175. * Collection to store aggregation of collKataoSuppliersRelatedByRefererId.
  176. * @var array
  177. */
  178. protected $collKataoSuppliersRelatedByRefererId;
  179. /**
  180. * The criteria used to select the current contents of collKataoSuppliersRelatedByRefererId.
  181. * @var Criteria
  182. */
  183. protected $lastKataoSupplierRelatedByRefererIdCriteria = null;
  184. /**
  185. * Collection to store aggregation of collKataoInvoices.
  186. * @var array
  187. */
  188. protected $collKataoInvoices;
  189. /**
  190. * The criteria used to select the current contents of collKataoInvoices.
  191. * @var Criteria
  192. */
  193. protected $lastKataoInvoiceCriteria = null;
  194. /**
  195. * Collection to store aggregation of collKataoMemberDeposits.
  196. * @var array
  197. */
  198. protected $collKataoMemberDeposits;
  199. /**
  200. * The criteria used to select the current contents of collKataoMemberDeposits.
  201. * @var Criteria
  202. */
  203. protected $lastKataoMemberDepositCriteria = null;
  204. /**
  205. * Collection to store aggregation of collKataoMemberNodes.
  206. * @var array
  207. */
  208. protected $collKataoMemberNodes;
  209. /**
  210. * The criteria used to select the current contents of collKataoMemberNodes.
  211. * @var Criteria
  212. */
  213. protected $lastKataoMemberNodeCriteria = null;
  214. /**
  215. * Collection to store aggregation of collKataoAssocMemberGroups.
  216. * @var array
  217. */
  218. protected $collKataoAssocMemberGroups;
  219. /**
  220. * The criteria used to select the current contents of collKataoAssocMemberGroups.
  221. * @var Criteria
  222. */
  223. protected $lastKataoAssocMemberGroupCriteria = null;
  224. /**
  225. * Flag to prevent endless save loop, if this object is referenced
  226. * by another object which falls in this transaction.
  227. * @var boolean
  228. */
  229. protected $alreadyInSave = false;
  230. /**
  231. * Flag to prevent endless validation loop, if this object is referenced
  232. * by another object which falls in this transaction.
  233. * @var boolean
  234. */
  235. protected $alreadyInValidation = false;
  236. /**
  237. * Get the [id] column value.
  238. *
  239. * @return int
  240. */
  241. public function getId()
  242. {
  243. return $this->id;
  244. }
  245. /**
  246. * Get the [katao_index] column value.
  247. *
  248. * @return int
  249. */
  250. public function getKataoIndex()
  251. {
  252. return $this->katao_index;
  253. }
  254. /**
  255. * Get the [katao_node_id] column value.
  256. *
  257. * @return int
  258. */
  259. public function getKataoNodeId()
  260. {
  261. return $this->katao_node_id;
  262. }
  263. /**
  264. * Get the [next_katao_node_id] column value.
  265. *
  266. * @return int
  267. */
  268. public function getNextKataoNodeId()
  269. {
  270. return $this->next_katao_node_id;
  271. }
  272. /**
  273. * Get the [katao_member_id] column value.
  274. *
  275. * @return int
  276. */
  277. public function getKataoMemberId()
  278. {
  279. return $this->katao_member_id;
  280. }
  281. /**
  282. * Get the [first_name] column value.
  283. *
  284. * @return string
  285. */
  286. public function getFirstName()
  287. {
  288. return $this->first_name;
  289. }
  290. /**
  291. * Get the [last_name] column value.
  292. *
  293. * @return string
  294. */
  295. public function getLastName()
  296. {
  297. return $this->last_name;
  298. }
  299. /**
  300. * Get the [accounting_code] column value.
  301. *
  302. * @return string
  303. */
  304. public function getAccountingCode()
  305. {
  306. return $this->accounting_code;
  307. }
  308. /**
  309. * Get the [accounting_code_sol] column value.
  310. *
  311. * @return string
  312. */
  313. public function getAccountingCodeSol()
  314. {
  315. return $this->accounting_code_sol;
  316. }
  317. /**
  318. * Get the [initial_amount_euro] column value.
  319. *
  320. * @return double
  321. */
  322. public function getInitialAmountEuro()
  323. {
  324. return $this->initial_amount_euro;
  325. }
  326. /**
  327. * Get the [initial_amount_sol] column value.
  328. *
  329. * @return int
  330. */
  331. public function getInitialAmountSol()
  332. {
  333. return $this->initial_amount_sol;
  334. }
  335. /**
  336. * Get the [is_referer] column value.
  337. *
  338. * @return int
  339. */
  340. public function getIsReferer()
  341. {
  342. return $this->is_referer;
  343. }
  344. /**
  345. * Get the [is_delegate] column value.
  346. *
  347. * @return int
  348. */
  349. public function getIsDelegate()
  350. {
  351. return $this->is_delegate;
  352. }
  353. /**
  354. * Get the [is_anonymous] column value.
  355. *
  356. * @return int
  357. */
  358. public function getIsAnonymous()
  359. {
  360. return $this->is_anonymous;
  361. }
  362. /**
  363. * Get the [is_member] column value.
  364. *
  365. * @return int
  366. */
  367. public function getIsMember()
  368. {
  369. return $this->is_member;
  370. }
  371. /**
  372. * Get the [card_number_sol] column value.
  373. *
  374. * @return string
  375. */
  376. public function getCardNumberSol()
  377. {
  378. return $this->card_number_sol;
  379. }
  380. /**
  381. * Get the [user_situation] column value.
  382. *
  383. * @return string
  384. */
  385. public function getUserSituation()
  386. {
  387. return $this->user_situation;
  388. }
  389. /**
  390. * Get the [optionally formatted] [user_birthday] column value.
  391. *
  392. * @param string $format The date/time format string (either date()-style or strftime()-style).
  393. * If format is NULL, then the integer unix timestamp will be returned.
  394. * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
  395. * @throws PropelException - if unable to convert the date/time to timestamp.
  396. */
  397. public function getUserBirthday($format = 'Y-m-d')
  398. {
  399. if ($this->user_birthday === null || $this->user_birthday === '') {
  400. return null;
  401. } elseif (!is_int($this->user_birthday)) {
  402. // a non-timestamp value was set externally, so we convert it
  403. $ts = strtotime($this->user_birthday);
  404. if ($ts === -1 || $ts === false) { // in PHP 5.1 return value changes to FALSE
  405. throw new PropelException("Unable to parse value of [user_birthday] as date/time value: " . var_export($this->user_birthday, true));
  406. }
  407. } else {
  408. $ts = $this->user_birthday;
  409. }
  410. if ($format === null) {
  411. return $ts;
  412. } elseif (strpos($format, '%') !== false) {
  413. return strftime($format, $ts);
  414. } else {
  415. return date($format, $ts);
  416. }
  417. }
  418. /**
  419. * Get the [parrain_name] column value.
  420. *
  421. * @return string
  422. */
  423. public function getParrainName()
  424. {
  425. return $this->parrain_name;
  426. }
  427. /**
  428. * Get the [optionally formatted] [created_at] column value.
  429. *
  430. * @param string $format The date/time format string (either date()-style or strftime()-style).
  431. * If format is NULL, then the integer unix timestamp will be returned.
  432. * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
  433. * @throws PropelException - if unable to convert the date/time to timestamp.
  434. */
  435. public function getCreatedAt($format = 'Y-m-d H:i:s')
  436. {
  437. if ($this->created_at === null || $this->created_at === '') {
  438. return null;
  439. } elseif (!is_int($this->created_at)) {
  440. // a non-timestamp value was set externally, so we convert it
  441. $ts = strtotime($this->created_at);
  442. if ($ts === -1 || $ts === false) { // in PHP 5.1 return value changes to FALSE
  443. throw new PropelException("Unable to parse value of [created_at] as date/time value: " . var_export($this->created_at, true));
  444. }
  445. } else {
  446. $ts = $this->created_at;
  447. }
  448. if ($format === null) {
  449. return $ts;
  450. } elseif (strpos($format, '%') !== false) {
  451. return strftime($format, $ts);
  452. } else {
  453. return date($format, $ts);
  454. }
  455. }
  456. /**
  457. * Get the [optionally formatted] [updated_at] column value.
  458. *
  459. * @param string $format The date/time format string (either date()-style or strftime()-style).
  460. * If format is NULL, then the integer unix timestamp will be returned.
  461. * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
  462. * @throws PropelException - if unable to convert the date/time to timestamp.
  463. */
  464. public function getUpdatedAt($format = 'Y-m-d H:i:s')
  465. {
  466. if ($this->updated_at === null || $this->updated_at === '') {
  467. return null;
  468. } elseif (!is_int($this->updated_at)) {
  469. // a non-timestamp value was set externally, so we convert it
  470. $ts = strtotime($this->updated_at);
  471. if ($ts === -1 || $ts === false) { // in PHP 5.1 return value changes to FALSE
  472. throw new PropelException("Unable to parse value of [updated_at] as date/time value: " . var_export($this->updated_at, true));
  473. }
  474. } else {
  475. $ts = $this->updated_at;
  476. }
  477. if ($format === null) {
  478. return $ts;
  479. } elseif (strpos($format, '%') !== false) {
  480. return strftime($format, $ts);
  481. } else {
  482. return date($format, $ts);
  483. }
  484. }
  485. /**
  486. * Set the value of [id] column.
  487. *
  488. * @param int $v new value
  489. * @return void
  490. */
  491. public function setId($v)
  492. {
  493. // Since the native PHP type for this column is integer,
  494. // we will cast the input value to an int (if it is not).
  495. if ($v !== null && !is_int($v) && is_numeric($v)) {
  496. $v = (int) $v;
  497. }
  498. if ($this->id !== $v) {
  499. $this->id = $v;
  500. $this->modifiedColumns[] = KataoMemberPeer::ID;
  501. }
  502. } // setId()
  503. /**
  504. * Set the value of [katao_index] column.
  505. *
  506. * @param int $v new value
  507. * @return void
  508. */
  509. public function setKataoIndex($v)
  510. {
  511. // Since the native PHP type for this column is integer,
  512. // we will cast the input value to an int (if it is not).
  513. if ($v !== null && !is_int($v) && is_numeric($v)) {
  514. $v = (int) $v;
  515. }
  516. if ($this->katao_index !== $v) {
  517. $this->katao_index = $v;
  518. $this->modifiedColumns[] = KataoMemberPeer::KATAO_INDEX;
  519. }
  520. } // setKataoIndex()
  521. /**
  522. * Set the value of [katao_node_id] column.
  523. *
  524. * @param int $v new value
  525. * @return void
  526. */
  527. public function setKataoNodeId($v)
  528. {
  529. // Since the native PHP type for this column is integer,
  530. // we will cast the input value to an int (if it is not).
  531. if ($v !== null && !is_int($v) && is_numeric($v)) {
  532. $v = (int) $v;
  533. }
  534. if ($this->katao_node_id !== $v) {
  535. $this->katao_node_id = $v;
  536. $this->modifiedColumns[] = KataoMemberPeer::KATAO_NODE_ID;
  537. }
  538. if ($this->aKataoNodeRelatedByKataoNodeId !== null && $this->aKataoNodeRelatedByKataoNodeId->getId() !== $v) {
  539. $this->aKataoNodeRelatedByKataoNodeId = null;
  540. }
  541. } // setKataoNodeId()
  542. /**
  543. * Set the value of [next_katao_node_id] column.
  544. *
  545. * @param int $v new value
  546. * @return void
  547. */
  548. public function setNextKataoNodeId($v)
  549. {
  550. // Since the native PHP type for this column is integer,
  551. // we will cast the input value to an int (if it is not).
  552. if ($v !== null && !is_int($v) && is_numeric($v)) {
  553. $v = (int) $v;
  554. }
  555. if ($this->next_katao_node_id !== $v) {
  556. $this->next_katao_node_id = $v;
  557. $this->modifiedColumns[] = KataoMemberPeer::NEXT_KATAO_NODE_ID;
  558. }
  559. if ($this->aKataoNodeRelatedByNextKataoNodeId !== null && $this->aKataoNodeRelatedByNextKataoNodeId->getId() !== $v) {
  560. $this->aKataoNodeRelatedByNextKataoNodeId = null;
  561. }
  562. } // setNextKataoNodeId()
  563. /**
  564. * Set the value of [katao_member_id] column.
  565. *
  566. * @param int $v new value
  567. * @return void
  568. */
  569. public function setKataoMemberId($v)
  570. {
  571. // Since the native PHP type for this column is integer,
  572. // we will cast the input value to an int (if it is not).
  573. if ($v !== null && !is_int($v) && is_numeric($v)) {
  574. $v = (int) $v;
  575. }
  576. if ($this->katao_member_id !== $v) {
  577. $this->katao_member_id = $v;
  578. $this->modifiedColumns[] = KataoMemberPeer::KATAO_MEMBER_ID;
  579. }
  580. if ($this->aKataoMemberRelatedByKataoMemberId !== null && $this->aKataoMemberRelatedByKataoMemberId->getId() !== $v) {
  581. $this->aKataoMemberRelatedByKataoMemberId = null;
  582. }
  583. } // setKataoMemberId()
  584. /**
  585. * Set the value of [first_name] column.
  586. *
  587. * @param string $v new value
  588. * @return void
  589. */
  590. public function setFirstName($v)
  591. {
  592. // Since the native PHP type for this column is string,
  593. // we will cast the input to a string (if it is not).
  594. if ($v !== null && !is_string($v)) {
  595. $v = (string) $v;
  596. }
  597. if ($this->first_name !== $v) {
  598. $this->first_name = $v;
  599. $this->modifiedColumns[] = KataoMemberPeer::FIRST_NAME;
  600. }
  601. } // setFirstName()
  602. /**
  603. * Set the value of [last_name] column.
  604. *
  605. * @param string $v new value
  606. * @return void
  607. */
  608. public function setLastName($v)
  609. {
  610. // Since the native PHP type for this column is string,
  611. // we will cast the input to a string (if it is not).
  612. if ($v !== null && !is_string($v)) {
  613. $v = (string) $v;
  614. }
  615. if ($this->last_name !== $v) {
  616. $this->last_name = $v;
  617. $this->modifiedColumns[] = KataoMemberPeer::LAST_NAME;
  618. }
  619. } // setLastName()
  620. /**
  621. * Set the value of [accounting_code] column.
  622. *
  623. * @param string $v new value
  624. * @return void
  625. */
  626. public function setAccountingCode($v)
  627. {
  628. // Since the native PHP type for this column is string,
  629. // we will cast the input to a string (if it is not).
  630. if ($v !== null && !is_string($v)) {
  631. $v = (string) $v;
  632. }
  633. if ($this->accounting_code !== $v) {
  634. $this->accounting_code = $v;
  635. $this->modifiedColumns[] = KataoMemberPeer::ACCOUNTING_CODE;
  636. }
  637. } // setAccountingCode()
  638. /**
  639. * Set the value of [accounting_code_sol] column.
  640. *
  641. * @param string $v new value
  642. * @return void
  643. */
  644. public function setAccountingCodeSol($v)
  645. {
  646. // Since the native PHP type for this column is string,
  647. // we will cast the input to a string (if it is not).
  648. if ($v !== null && !is_string($v)) {
  649. $v = (string) $v;
  650. }
  651. if ($this->accounting_code_sol !== $v) {
  652. $this->accounting_code_sol = $v;
  653. $this->modifiedColumns[] = KataoMemberPeer::ACCOUNTING_CODE_SOL;
  654. }
  655. } // setAccountingCodeSol()
  656. /**
  657. * Set the value of [initial_amount_euro] column.
  658. *
  659. * @param double $v new value
  660. * @return void
  661. */
  662. public function setInitialAmountEuro($v)
  663. {
  664. if ($this->initial_amount_euro !== $v || $v === 0) {
  665. $this->initial_amount_euro = $v;
  666. $this->modifiedColumns[] = KataoMemberPeer::INITIAL_AMOUNT_EURO;
  667. }
  668. } // setInitialAmountEuro()
  669. /**
  670. * Set the value of [initial_amount_sol] column.
  671. *
  672. * @param int $v new value
  673. * @return void
  674. */
  675. public function setInitialAmountSol($v)
  676. {
  677. // Since the native PHP type for this column is integer,
  678. // we will cast the input value to an int (if it is not).
  679. if ($v !== null && !is_int($v) && is_numeric($v)) {
  680. $v = (int) $v;
  681. }
  682. if ($this->initial_amount_sol !== $v || $v === 0) {
  683. $this->initial_amount_sol = $v;
  684. $this->modifiedColumns[] = KataoMemberPeer::INITIAL_AMOUNT_SOL;
  685. }
  686. } // setInitialAmountSol()
  687. /**
  688. * Set the value of [is_referer] column.
  689. *
  690. * @param int $v new value
  691. * @return void
  692. */
  693. public function setIsReferer($v)
  694. {
  695. // Since the native PHP type for this column is integer,
  696. // we will cast the input value to an int (if it is not).
  697. if ($v !== null && !is_int($v) && is_numeric($v)) {
  698. $v = (int) $v;
  699. }
  700. if ($this->is_referer !== $v || $v === 0) {
  701. $this->is_referer = $v;
  702. $this->modifiedColumns[] = KataoMemberPeer::IS_REFERER;
  703. }
  704. } // setIsReferer()
  705. /**
  706. * Set the value of [is_delegate] column.
  707. *
  708. * @param int $v new value
  709. * @return void
  710. */
  711. public function setIsDelegate($v)
  712. {
  713. // Since the native PHP type for this column is integer,
  714. // we will cast the input value to an int (if it is not).
  715. if ($v !== null && !is_int($v) && is_numeric($v)) {
  716. $v = (int) $v;
  717. }
  718. if ($this->is_delegate !== $v || $v === 0) {
  719. $this->is_delegate = $v;
  720. $this->modifiedColumns[] = KataoMemberPeer::IS_DELEGATE;
  721. }
  722. } // setIsDelegate()
  723. /**
  724. * Set the value of [is_anonymous] column.
  725. *
  726. * @param int $v new value
  727. * @return void
  728. */
  729. public function setIsAnonymous($v)
  730. {
  731. // Since the native PHP type for this column is integer,
  732. // we will cast the input value to an int (if it is not).
  733. if ($v !== null && !is_int($v) && is_numeric($v)) {
  734. $v = (int) $v;
  735. }
  736. if ($this->is_anonymous !== $v || $v === 0) {
  737. $this->is_anonymous = $v;
  738. $this->modifiedColumns[] = KataoMemberPeer::IS_ANONYMOUS;
  739. }
  740. } // setIsAnonymous()
  741. /**
  742. * Set the value of [is_member] column.
  743. *
  744. * @param int $v new value
  745. * @return void
  746. */
  747. public function setIsMember($v)
  748. {
  749. // Since the native PHP type for this column is integer,
  750. // we will cast the input value to an int (if it is not).
  751. if ($v !== null && !is_int($v) && is_numeric($v)) {
  752. $v = (int) $v;
  753. }
  754. if ($this->is_member !== $v || $v === 1) {
  755. $this->is_member = $v;
  756. $this->modifiedColumns[] = KataoMemberPeer::IS_MEMBER;
  757. }
  758. } // setIsMember()
  759. /**
  760. * Set the value of [card_number_sol] column.
  761. *
  762. * @param string $v new value
  763. * @return void
  764. */
  765. public function setCardNumberSol($v)
  766. {
  767. // Since the native PHP type for this column is string,
  768. // we will cast the input to a string (if it is not).
  769. if ($v !== null && !is_string($v)) {
  770. $v = (string) $v;
  771. }
  772. if ($this->card_number_sol !== $v) {
  773. $this->card_number_sol = $v;
  774. $this->modifiedColumns[] = KataoMemberPeer::CARD_NUMBER_SOL;
  775. }
  776. } // setCardNumberSol()
  777. /**
  778. * Set the value of [user_situation] column.
  779. *
  780. * @param string $v new value
  781. * @return void
  782. */
  783. public function setUserSituation($v)
  784. {
  785. // Since the native PHP type for this column is string,
  786. // we will cast the input to a string (if it is not).
  787. if ($v !== null && !is_string($v)) {
  788. $v = (string) $v;
  789. }
  790. if ($this->user_situation !== $v) {
  791. $this->user_situation = $v;
  792. $this->modifiedColumns[] = KataoMemberPeer::USER_SITUATION;
  793. }
  794. } // setUserSituation()
  795. /**
  796. * Set the value of [user_birthday] column.
  797. *
  798. * @param int $v new value
  799. * @return void
  800. */
  801. public function setUserBirthday($v)
  802. {
  803. if ($v !== null && !is_int($v)) {
  804. $ts = strtotime($v);
  805. if ($ts === -1 || $ts === false) { // in PHP 5.1 return value changes to FALSE
  806. throw new PropelException("Unable to parse date/time value for [user_birthday] from input: " . var_export($v, true));
  807. }
  808. } else {
  809. $ts = $v;
  810. }
  811. if ($this->user_birthday !== $ts) {
  812. $this->user_birthday = $ts;
  813. $this->modifiedColumns[] = KataoMemberPeer::USER_BIRTHDAY;
  814. }
  815. } // setUserBirthday()
  816. /**
  817. * Set the value of [parrain_name] column.
  818. *
  819. * @param string $v new value
  820. * @return void
  821. */
  822. public function setParrainName($v)
  823. {
  824. // Since the native PHP type for this column is string,
  825. // we will cast the input to a string (if it is not).
  826. if ($v !== null && !is_string($v)) {
  827. $v = (string) $v;
  828. }
  829. if ($this->parrain_name !== $v) {
  830. $this->parrain_name = $v;
  831. $this->modifiedColumns[] = KataoMemberPeer::PARRAIN_NAME;
  832. }
  833. } // setParrainName()
  834. /**
  835. * Set the value of [created_at] column.
  836. *
  837. * @param int $v new value
  838. * @return void
  839. */
  840. public function setCreatedAt($v)
  841. {
  842. if ($v !== null && !is_int($v)) {
  843. $ts = strtotime($v);
  844. if ($ts === -1 || $ts === false) { // in PHP 5.1 return value changes to FALSE
  845. throw new PropelException("Unable to parse date/time value for [created_at] from input: " . var_export($v, true));
  846. }
  847. } else {
  848. $ts = $v;
  849. }
  850. if ($this->created_at !== $ts) {
  851. $this->created_at = $ts;
  852. $this->modifiedColumns[] = KataoMemberPeer::CREATED_AT;
  853. }
  854. } // setCreatedAt()
  855. /**
  856. * Set the value of [updated_at] column.
  857. *
  858. * @param int $v new value
  859. * @return void
  860. */
  861. public function setUpdatedAt($v)
  862. {
  863. if ($v !== null && !is_int($v)) {
  864. $ts = strtotime($v);
  865. if ($ts === -1 || $ts === false) { // in PHP 5.1 return value changes to FALSE
  866. throw new PropelException("Unable to parse date/time value for [updated_at] from input: " . var_export($v, true));
  867. }
  868. } else {
  869. $ts = $v;
  870. }
  871. if ($this->updated_at !== $ts) {
  872. $this->updated_at = $ts;
  873. $this->modifiedColumns[] = KataoMemberPeer::UPDATED_AT;
  874. }
  875. } // setUpdatedAt()
  876. /**
  877. * Hydrates (populates) the object variables with values from the database resultset.
  878. *
  879. * An offset (1-based "start column") is specified so that objects can be hydrated
  880. * with a subset of the columns in the resultset rows. This is needed, for example,
  881. * for results of JOIN queries where the resultset row includes columns from two or
  882. * more tables.
  883. *
  884. * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos.
  885. * @param int $startcol 1-based offset column which indicates which restultset column to start with.
  886. * @return int next starting column
  887. * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
  888. */
  889. public function hydrate(ResultSet $rs, $startcol = 1)
  890. {
  891. try {
  892. $this->id = $rs->getInt($startcol + 0);
  893. $this->katao_index = $rs->getInt($startcol + 1);
  894. $this->katao_node_id = $rs->getInt($startcol + 2);
  895. $this->next_katao_node_id = $rs->getInt($startcol + 3);
  896. $this->katao_member_id = $rs->getInt($startcol + 4);
  897. $this->first_name = $rs->getString($startcol + 5);
  898. $this->last_name = $rs->getString($startcol + 6);
  899. $this->accounting_code = $rs->getString($startcol + 7);
  900. $this->accounting_code_sol = $rs->getString($startcol + 8);
  901. $this->initial_amount_euro = $rs->getFloat($startcol + 9);
  902. $this->initial_amount_sol = $rs->getInt($startcol + 10);
  903. $this->is_referer = $rs->getInt($startcol + 11);
  904. $this->is_delegate = $rs->getInt($startcol + 12);
  905. $this->is_anonymous = $rs->getInt($startcol + 13);
  906. $this->is_member = $rs->getInt($startcol + 14);
  907. $this->card_number_sol = $rs->getString($startcol + 15);
  908. $this->user_situation = $rs->getString($startcol + 16);
  909. $this->user_birthday = $rs->getDate($startcol + 17, null);
  910. $this->parrain_name = $rs->getString($startcol + 18);
  911. $this->created_at = $rs->getTimestamp($startcol + 19, null);
  912. $this->updated_at = $rs->getTimestamp($startcol + 20, null);
  913. $this->resetModified();
  914. $this->setNew(false);
  915. // FIXME - using NUM_COLUMNS may be clearer.
  916. return $startcol + 21; // 21 = KataoMemberPeer::NUM_COLUMNS - KataoMemberPeer::NUM_LAZY_LOAD_COLUMNS).
  917. } catch (Exception $e) {
  918. throw new PropelException("Error populating KataoMember object", $e);
  919. }
  920. }
  921. /**
  922. * Removes this object from datastore and sets delete attribute.
  923. *
  924. * @param Connection $con
  925. * @return void
  926. * @throws PropelException
  927. * @see BaseObject::setDeleted()
  928. * @see BaseObject::isDeleted()
  929. */
  930. public function delete($con = null)
  931. {
  932. foreach (sfMixer::getCallables('BaseKataoMember:delete:pre') as $callable)
  933. {
  934. $ret = call_user_func($callable, $this, $con);
  935. if ($ret)
  936. {
  937. return;
  938. }
  939. }
  940. if ($this->isDeleted()) {
  941. throw new PropelException("This object has already been deleted.");
  942. }
  943. if ($con === null) {
  944. $con = Propel::getConnection(KataoMemberPeer::DATABASE_NAME);
  945. }
  946. try {
  947. $con->begin();
  948. KataoMemberPeer::doDelete($this, $con);
  949. $this->setDeleted(true);
  950. $con->commit();
  951. } catch (PropelException $e) {
  952. $con->rollback();
  953. throw $e;
  954. }
  955. foreach (sfMixer::getCallables('BaseKataoMember:delete:post') as $callable)
  956. {
  957. call_user_func($callable, $this, $con);
  958. }
  959. }
  960. /**
  961. * Stores the object in the database. If the object is new,
  962. * it inserts it; otherwise an update is performed. This method
  963. * wraps the doSave() worker method in a transaction.
  964. *
  965. * @param Connection $con
  966. * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
  967. * @throws PropelException
  968. * @see doSave()
  969. */
  970. public function save($con = null)
  971. {
  972. foreach (sfMixer::getCallables('BaseKataoMember:save:pre') as $callable)
  973. {
  974. $affectedRows = call_user_func($callable, $this, $con);
  975. if (is_int($affectedRows))
  976. {
  977. return $affectedRows;
  978. }
  979. }
  980. if ($this->isNew() && !$this->isColumnModified(KataoMemberPeer::CREATED_AT))
  981. {
  982. $this->setCreatedAt(time());
  983. }
  984. if ($this->isModified() && !$this->isColumnModified(KataoMemberPeer::UPDATED_AT))
  985. {
  986. $this->setUpdatedAt(time());
  987. }
  988. if ($this->isDeleted()) {
  989. throw new PropelException("You cannot save an object that has been deleted.");
  990. }
  991. if ($con === null) {
  992. $con = Propel::getConnection(KataoMemberPeer::DATABASE_NAME);
  993. }
  994. try {
  995. $con->begin();
  996. $affectedRows = $this->doSave($con);
  997. $con->commit();
  998. foreach (sfMixer::getCallables('BaseKataoMember:save:post') as $callable)
  999. {
  1000. call_user_func($callable, $this, $con, $affectedRows);
  1001. }
  1002. return $affectedRows;
  1003. } catch (PropelException $e) {
  1004. $con->rollback();
  1005. throw $e;
  1006. }
  1007. }
  1008. /**
  1009. * Stores the object in the database.
  1010. *
  1011. * If the object is new, it inserts it; otherwise an update is performed.
  1012. * All related objects are also updated in this method.
  1013. *
  1014. * @param Connection $con
  1015. * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
  1016. * @throws PropelException
  1017. * @see save()
  1018. */
  1019. protected function doSave($con)
  1020. {
  1021. $affectedRows = 0; // initialize var to track total num of affected rows
  1022. if (!$this->alreadyInSave) {
  1023. $this->alreadyInSave = true;
  1024. // We call the save method on the following object(s) if they
  1025. // were passed to this object by their coresponding set
  1026. // method. This object relates to these object(s) by a
  1027. // foreign key reference.
  1028. if ($this->aKataoNodeRelatedByKataoNodeId !== null) {
  1029. if ($this->aKataoNodeRelatedByKataoNodeId->isModified()) {
  1030. $affectedRows += $this->aKataoNodeRelatedByKataoNodeId->save($con);
  1031. }
  1032. $this->setKataoNodeRelatedByKataoNodeId($this->aKataoNodeRelatedByKataoNodeId);
  1033. }
  1034. if ($this->aKataoNodeRelatedByNextKataoNodeId !== null) {
  1035. if ($this->aKataoNodeRelatedByNextKataoNodeId->isModified()) {
  1036. $affectedRows += $this->aKataoNodeRelatedByNextKataoNodeId->save($con);
  1037. }
  1038. $this->setKataoNodeRelatedByNextKataoNodeId($this->aKataoNodeRelatedByNextKataoNodeId);
  1039. }
  1040. if ($this->aKataoMemberRelatedByKataoMemberId !== null) {
  1041. if ($this->aKataoMemberRelatedByKataoMemberId->isModified()) {
  1042. $affectedRows += $this->aKataoMemberRelatedByKataoMemberId->save($con);
  1043. }
  1044. $this->setKataoMemberRelatedByKataoMemberId($this->aKataoMemberRelatedByKataoMemberId);
  1045. }
  1046. // If this object has been modified, then save it to the database.
  1047. if ($this->isModified()) {
  1048. if ($this->isNew()) {
  1049. $pk = KataoMemberPeer::doInsert($this, $con);
  1050. $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
  1051. // should always be true here (even though technically
  1052. // BasePeer::doInsert() can insert multiple rows).
  1053. $this->setId($pk); //[IMV] update autoincrement primary key
  1054. $this->setNew(false);
  1055. } else {
  1056. $affectedRows += KataoMemberPeer::doUpdate($this, $con);
  1057. }
  1058. $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
  1059. }
  1060. if ($this->collKataoConfigs !== null) {
  1061. foreach($this->collKataoConfigs as $referrerFK) {
  1062. if (!$referrerFK->isDeleted()) {
  1063. $affectedRows += $referrerFK->save($con);
  1064. }
  1065. }
  1066. }
  1067. if ($this->collKataoUsers !== null) {
  1068. foreach($this->collKataoUsers as $referrerFK) {
  1069. if (!$referrerFK->isDeleted()) {
  1070. $affectedRows += $referrerFK->save($con);
  1071. }
  1072. }
  1073. }
  1074. if ($this->collKataoMembersRelatedByKataoMemberId !== null) {
  1075. foreach($this->collKataoMembersRelatedByKataoMemberId as $referrerFK) {
  1076. if (!$referrerFK->isDeleted()) {
  1077. $affectedRows += $referrerFK->save($con);
  1078. }
  1079. }
  1080. }
  1081. if ($this->collKataoSuppliersRelatedByMemberId !== null) {
  1082. foreach($this->collKataoSuppliersRelatedByMemberId as $referrerFK) {
  1083. if (!$referrerFK->isDeleted()) {
  1084. $affectedRows += $referrerFK->save($con);
  1085. }
  1086. }
  1087. }
  1088. if ($this->collKataoSuppliersRelatedByRefererId !== null) {
  1089. foreach($this->collKataoSuppliersRelatedByRefererId as $referrerFK) {
  1090. if (!$referrerFK->isDeleted()) {
  1091. $affectedRows += $referrerFK->save($con);
  1092. }
  1093. }
  1094. }
  1095. if ($this->collKataoInvoices !== null) {
  1096. foreach($this->collKataoInvoices as $referrerFK) {
  1097. if (!$referrerFK->isDeleted()) {
  1098. $affectedRows += $referrerFK->save($con);
  1099. }
  1100. }
  1101. }
  1102. if ($this->collKataoMemberDeposits !== null) {
  1103. foreach($this->collKataoMemberDeposits as $referrerFK) {
  1104. if (!$referrerFK->isDeleted()) {
  1105. $affectedRows += $referrerFK->save($con);
  1106. }
  1107. }
  1108. }
  1109. if ($this->collKataoMemberNodes !== null) {
  1110. foreach($this->collKataoMemberNodes as $referrerFK) {
  1111. if (!$referrerFK->isDeleted()) {
  1112. $affectedRows += $referrerFK->save($con);
  1113. }
  1114. }
  1115. }
  1116. if ($this->collKataoAssocMemberGroups !== null) {
  1117. foreach($this->collKataoAssocMemberGroups as $referrerFK) {
  1118. if (!$referrerFK->isDeleted()) {
  1119. $affectedRows += $referrerFK->save($con);
  1120. }
  1121. }
  1122. }
  1123. $this->alreadyInSave = false;
  1124. }
  1125. return $affectedRows;
  1126. } // doSave()
  1127. /**
  1128. * Array of ValidationFailed objects.
  1129. * @var array ValidationFailed[]
  1130. */
  1131. protected $validationFailures = array();
  1132. /**
  1133. * Gets any ValidationFailed objects that resulted from last call to validate().
  1134. *
  1135. *
  1136. * @return array ValidationFailed[]
  1137. * @see validate()
  1138. */
  1139. public function getValidationFailures()
  1140. {
  1141. return $this->validationFailures;
  1142. }
  1143. /**
  1144. * Validates the objects modified field values and all objects related to this table.
  1145. *
  1146. * If $columns is either a column name or an array of column names
  1147. * only those columns are validated.
  1148. *
  1149. * @param mixed $columns Column name or an array of column names.
  1150. * @return boolean Whether all columns pass validation.
  1151. * @see doValidate()
  1152. * @see getValidationFailures()
  1153. */
  1154. public function validate($columns = null)
  1155. {
  1156. $res = $this->doValidate($columns);
  1157. if ($res === true) {
  1158. $this->validationFailures = array();
  1159. return true;
  1160. } else {
  1161. $this->validationFailures = $res;
  1162. return false;
  1163. }
  1164. }
  1165. /**
  1166. * This function performs the validation work for complex object models.
  1167. *
  1168. * In addition to checking the current object, all related objects will
  1169. * also be validated. If all pass then <code>true</code> is returned; otherwise
  1170. * an aggreagated array of ValidationFailed objects will be returned.
  1171. *
  1172. * @param array $columns Array of column names to validate.
  1173. * @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  1174. */
  1175. protected function doValidate($columns = null)
  1176. {
  1177. if (!$this->alreadyInValidation) {
  1178. $this->alreadyInValidation = true;
  1179. $retval = null;
  1180. $failureMap = array();
  1181. // We call the validate method on the following object(s) if they
  1182. // were passed to this object by their coresponding set
  1183. // method. This object relates to these object(s) by a
  1184. // foreign key reference.
  1185. if ($this->aKataoNodeRelatedByKataoNodeId !== null) {
  1186. if (!$this->aKataoNodeRelatedByKataoNodeId->validate($columns)) {
  1187. $failureMap = array_merge($failureMap, $this->aKataoNodeRelatedByKataoNodeId->getValidationFailures());
  1188. }
  1189. }
  1190. if ($this->aKataoNodeRelatedByNextKataoNodeId !== null) {
  1191. if (!$this->aKataoNodeRelatedByNextKataoNodeId->validate($columns)) {
  1192. $failureMap = array_merge($failureMap, $this->aKataoNodeRelatedByNextKataoNodeId->getValidationFailures());
  1193. }
  1194. }
  1195. if ($this->aKataoMemberRelatedByKataoMemberId !== null) {
  1196. if (!$this->aKataoMemberRelatedByKataoMemberId->validate($columns)) {
  1197. $failureMap = array_merge($failureMap, $this->aKataoMemberRelatedByKataoMemberId->getValidationFailures());
  1198. }
  1199. }
  1200. if (($retval = KataoMemberPeer::doValidate($this, $columns)) !== true) {
  1201. $failureMap = array_merge($failureMap, $retval);
  1202. }
  1203. if ($this->collKataoConfigs !== null) {
  1204. foreach($this->collKataoConfigs as $referrerFK) {
  1205. if (!$referrerFK->validate($columns)) {
  1206. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  1207. }
  1208. }
  1209. }
  1210. if ($this->collKataoUsers !== null) {
  1211. foreach($this->collKataoUsers as $referrerFK) {
  1212. if (!$referrerFK->validate($columns)) {
  1213. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  1214. }
  1215. }
  1216. }
  1217. if ($this->collKataoSuppliersRelatedByMemberId !== null) {
  1218. foreach($this->collKataoSuppliersRelatedByMemberId as $referrerFK) {
  1219. if (!$referrerFK->validate($columns)) {
  1220. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  1221. }
  1222. }
  1223. }
  1224. if ($this->collKataoSuppliersRelatedByRefererId !== null) {
  1225. foreach($this->collKataoSuppliersRelatedByRefererId as $referrerFK) {
  1226. if (!$referrerFK->validate($columns)) {
  1227. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  1228. }
  1229. }
  1230. }
  1231. if ($this->collKataoInvoices !== null) {
  1232. foreach($this->collKataoInvoices as $referrerFK) {
  1233. if (!$referrerFK->validate($columns)) {
  1234. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  1235. }
  1236. }
  1237. }
  1238. if ($this->collKataoMemberDeposits !== null) {
  1239. foreach($this->collKataoMemberDeposits as $referrerFK) {
  1240. if (!$referrerFK->validate($columns)) {
  1241. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  1242. }
  1243. }
  1244. }
  1245. if ($this->collKataoMemberNodes !== null) {
  1246. foreach($this->collKataoMemberNodes as $referrerFK) {
  1247. if (!$referrerFK->validate($columns)) {
  1248. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  1249. }
  1250. }
  1251. }
  1252. if ($this->collKataoAssocMemberGroups !== null) {
  1253. foreach($this->collKataoAssocMemberGroups as $referrerFK) {
  1254. if (!$referrerFK->validate($columns)) {
  1255. $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
  1256. }
  1257. }
  1258. }
  1259. $this->alreadyInValidation = false;
  1260. }
  1261. return (!empty($failureMap) ? $failureMap : true);
  1262. }
  1263. /**
  1264. * Retrieves a field from the object by name passed in as a string.
  1265. *
  1266. * @param string $name name
  1267. * @param string $type The type of fieldname the $name is of:
  1268. * one of the class type constants TYPE_PHPNAME,
  1269. * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
  1270. * @return mixed Value of field.
  1271. */
  1272. public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
  1273. {
  1274. $pos = KataoMemberPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
  1275. return $this->getByPosition($pos);
  1276. }
  1277. /**
  1278. * Retrieves a field from the object by Position as specified in the xml schema.
  1279. * Zero-based.
  1280. *
  1281. * @param int $pos position in xml schema
  1282. * @return mixed Value of field at $pos
  1283. */
  1284. public function getByPosition($pos)
  1285. {
  1286. switch($pos) {
  1287. case 0:
  1288. return $this->getId();
  1289. break;
  1290. case 1:
  1291. return $this->getKataoIndex();
  1292. break;
  1293. case 2:
  1294. return $this->getKataoNodeId();
  1295. break;
  1296. case 3:
  1297. return $this->getNextKataoNodeId();
  1298. break;
  1299. case 4:
  1300. return $this->getKataoMemberId();
  1301. break;
  1302. case 5:
  1303. return $this->getFirstName();
  1304. break;
  1305. case 6:
  1306. return $this->getLastName();
  1307. break;
  1308. case 7:
  1309. return $this->getAccountingCode();
  1310. break;
  1311. case 8:
  1312. return $this->getAccountingCodeSol();
  1313. break;
  1314. case 9:
  1315. return $this->getInitialAmountEuro();
  1316. break;
  1317. case 10:
  1318. return $this->getInitialAmountSol();
  1319. break;
  1320. case 11:
  1321. return $this->getIsReferer();
  1322. break;
  1323. case 12:
  1324. return $this->getIsDelegate();
  1325. break;
  1326. case 13:
  1327. return $this->getIsAnonymous();
  1328. break;
  1329. case 14:
  1330. return $this->getIsMember();
  1331. break;
  1332. case 15:
  1333. return $this->getCardNumberSol();
  1334. break;
  1335. case 16:
  1336. return $this->getUserSituation();
  1337. break;
  1338. case 17:
  1339. return $this->getUserBirthday();
  1340. break;
  1341. case 18:
  1342. return $this->getParrainName();
  1343. break;
  1344. case 19:
  1345. return $this->getCreatedAt();
  1346. break;
  1347. case 20:
  1348. return $this->getUpdatedAt();
  1349. break;
  1350. default:
  1351. return null;
  1352. break;
  1353. } // switch()
  1354. }
  1355. /**
  1356. * Exports the object as an array.
  1357. *
  1358. * You can specify the key type of the array by passing one of the class
  1359. * type constants.
  1360. *
  1361. * @param string $keyType One of the class type constants TYPE_PHPNAME,
  1362. * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
  1363. * @return an associative array containing the field names (as keys) and field values
  1364. */
  1365. public function toArray($keyType = BasePeer::TYPE_PHPNAME)
  1366. {
  1367. $keys = KataoMemberPeer::getFieldNames($keyType);
  1368. $result = array(
  1369. $keys[0] => $this->getId(),
  1370. $keys[1] => $this->getKataoIndex(),
  1371. $keys[2] => $this->getKataoNodeId(),
  1372. $keys[3] => $this->getNextKataoNodeId(),
  1373. $keys[4] => $this->getKataoMemberId(),
  1374. $keys[5] => $this->getFirstName(),
  1375. $keys[6] => $this->getLastName(),
  1376. $keys[7] => $this->getAccountingCode(),
  1377. $keys[8] => $this->getAccountingCodeSol(),
  1378. $keys[9] => $this->getInitialAmountEuro(),
  1379. $keys[10] => $this->getInitialAmountSol(),
  1380. $keys[11] => $this->getIsReferer(),
  1381. $keys[12] => $this->getIsDelegate(),
  1382. $keys[13] => $this->getIsAnonymous(),
  1383. $keys[14] => $this->getIsMember(),
  1384. $keys[15] => $this->getCardNumberSol(),
  1385. $keys[16] => $this->getUserSituation(),
  1386. $keys[17] => $this->getUserBirthday(),
  1387. $keys[18] => $this->getParrainName(),
  1388. $keys[19] => $this->getCreatedAt(),
  1389. $keys[20] => $this->getUpdatedAt(),
  1390. );
  1391. return $result;
  1392. }
  1393. /**
  1394. * Sets a field from the object by name passed in as a string.
  1395. *
  1396. * @param string $name peer name
  1397. * @param mixed $value field value
  1398. * @param string $type The type of fieldname the $name is of:
  1399. * one of the class type constants TYPE_PHPNAME,
  1400. * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
  1401. * @return void
  1402. */
  1403. public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
  1404. {
  1405. $pos = KataoMemberPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
  1406. return $this->setByPosition($pos, $value);
  1407. }
  1408. /**
  1409. * Sets a field from the object by Position as specified in the xml schema.
  1410. * Zero-based.
  1411. *
  1412. * @param int $pos position in xml schema
  1413. * @param mixed $value field value
  1414. * @return void
  1415. */
  1416. public function setByPosition($pos, $value)
  1417. {
  1418. switch($pos) {
  1419. case 0:
  1420. $this->setId($value);
  1421. break;
  1422. case 1:
  1423. $this->setKataoIndex($value);
  1424. break;
  1425. case 2:
  1426. $this->setKataoNodeId($value);
  1427. break;
  1428. case 3:
  1429. $this->setNextKataoNodeId($value);
  1430. break;
  1431. case 4:
  1432. $this->setKataoMemberId($value);
  1433. break;
  1434. case 5:
  1435. $this->setFirstName($value);
  1436. break;
  1437. case 6:
  1438. $this->setLastName($value);
  1439. break;
  1440. case 7:
  1441. $this->setAccountingCode($value);
  1442. break;
  1443. case 8:
  1444. $this->setAccountingCodeSol($value);
  1445. break;
  1446. case 9:
  1447. $this->setInitialAmountEuro($value);
  1448. break;
  1449. case 10:
  1450. $this->setInitialAmountSol($value);
  1451. break;
  1452. case 11:
  1453. $this->setIsReferer($value);
  1454. break;
  1455. case 12:
  1456. $this->setIsDelegate($value);
  1457. break;
  1458. case 13:
  1459. $this->setIsAnonymous($value);
  1460. break;
  1461. case 14:
  1462. $this->setIsMember($value);
  1463. break;
  1464. case 15:
  1465. $this->setCardNumberSol($value);
  1466. break;
  1467. case 16:
  1468. $this->setUserSituation($value);
  1469. break;
  1470. case 17:
  1471. $this->setUserBirthday($value);
  1472. break;
  1473. case 18:
  1474. $this->setParrainName($value);
  1475. break;
  1476. case 19:
  1477. $this->setCreatedAt($value);
  1478. break;
  1479. case 20:
  1480. $this->setUpdatedAt($value);
  1481. break;
  1482. } // switch()
  1483. }
  1484. /**
  1485. * Populates the object using an array.
  1486. *
  1487. * This is particularly useful when populating an object from one of the
  1488. * request arrays (e.g. $_POST). This method goes through the column
  1489. * names, checking to see whether a matching key exists in populated
  1490. * array. If so the setByName() method is called for that column.
  1491. *
  1492. * You can specify the key type of the array by additionally passing one
  1493. * of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME,
  1494. * TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId')
  1495. *
  1496. * @param array $arr An array to populate the object from.
  1497. * @param string $keyType The type of keys the array uses.
  1498. * @return void
  1499. */
  1500. public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
  1501. {
  1502. $keys = KataoMemberPeer::getFieldNames($keyType);
  1503. if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
  1504. if (array_key_exists($keys[1], $arr)) $this->setKataoIndex($arr[$keys[1]]);
  1505. if (array_key_exists($keys[2], $arr)) $this->setKataoNodeId($arr[$keys[2]]);
  1506. if (array_key_exists($keys[3], $arr)) $this->setNextKataoNodeId($arr[$keys[3]]);
  1507. if (array_key_exists($keys[4], $arr)) $this->setKataoMemberId($arr[$keys[4]]);
  1508. if (array_key_exists($keys[5], $arr)) $this->setFirstName($arr[$keys[5]]);
  1509. if (array_key_exists($keys[6], $arr)) $this->setLastName($arr[$keys[6]]);
  1510. if (array_key_exists($keys[7], $arr)) $this->setAccountingCode($arr[$keys[7]]);
  1511. if (array_key_exists($keys[8], $arr)) $this->setAccountingCodeSol($arr[$keys[8]]);
  1512. if (array_key_exists($keys[9], $arr)) $this->setInitialAmountEuro($arr[$keys[9]]);
  1513. if (array_key_exists($keys[10], $arr)) $this->setInitialAmountSol($arr[$keys[10]]);
  1514. if (array_key_exists($keys[11], $arr)) $this->setIsReferer($arr[$keys[11]]);
  1515. if (array_key_exists($keys[12], $arr)) $this->setIsDelegate($arr[$keys[12]]);
  1516. if (array_key_exists($keys[13], $arr)) $this->setIsAnonymous($arr[$keys[13]]);
  1517. if (array_key_exists($keys[14], $arr)) $this->setIsMember($arr[$keys[14]]);
  1518. if (array_key_exists($keys[15], $arr)) $this->setCardNumberSol($arr[$keys[15]]);
  1519. if (array_key_exists($keys[16], $arr)) $this->setUserSituation($arr[$keys[16]]);
  1520. if (array_key_exists($keys[17], $arr)) $this->setUserBirthday($arr[$keys[17]]);
  1521. if (array_key_exists($keys[18], $arr)) $this->setParrainName($arr[$keys[18]]);
  1522. if (array_key_exists($keys[19], $arr)) $this->setCreatedAt($arr[$keys[19]]);
  1523. if (array_key_exists($keys[20], $arr)) $this->setUpdatedAt($arr[$keys[20]]);
  1524. }
  1525. /**
  1526. * Build a Criteria object containing the values of all modified columns in this object.
  1527. *
  1528. * @return Criteria The Criteria object containing all modified values.
  1529. */
  1530. public function buildCriteria()
  1531. {
  1532. $criteria = new Criteria(KataoMemberPeer::DATABASE_NAME);
  1533. if ($this->isColumnModified(KataoMemberPeer::ID)) $criteria->add(KataoMemberPeer::ID, $this->id);
  1534. if ($this->isColumnModified(KataoMemberPeer::KATAO_INDEX)) $criteria->add(KataoMemberPeer::KATAO_INDEX, $this->katao_index);
  1535. if ($this->isColumnModified(KataoMemberPeer::KATAO_NODE_ID)) $criteria->add(KataoMemberPeer::KATAO_NODE_ID, $this->katao_node_id);
  1536. if ($this->isColumnModified(KataoMemberPeer::NEXT_KATAO_NODE_ID)) $criteria->add(KataoMemberPeer::NEXT_KATAO_NODE_ID, $this->next_katao_node_id);
  1537. if ($this->isColumnModified(KataoMemberPeer::KATAO_MEMBER_ID)) $criteria->add(KataoMemberPeer::KATAO_MEMBER_ID, $this->katao_member_id);
  1538. if ($this->isColumnModified(KataoMemberPeer::FIRST_NAME)) $criteria->add(KataoMemberPeer::FIRST_NAME, $this->first_name);
  1539. if ($this->isColumnModified(KataoMemberPeer::LAST_NAME)) $criteria->add(KataoMemberPeer::LAST_NAME, $this->last_name);
  1540. if ($this->isColumnModified(KataoMemberPeer::ACCOUNTING_CODE)) $criteria->add(KataoMemberPeer::ACCOUNTING_CODE, $this->accounting_code);
  1541. if ($this->isColumnModified(KataoMemberPeer::ACCOUNTING_CODE_SOL)) $criteria->add(KataoMemberPeer::ACCOUNTING_CODE_SOL, $this->accounting_code_sol);
  1542. if ($this->isColumnModified(KataoMemberPeer::INITIAL_AMOUNT_EURO)) $criteria->add(KataoMemberPeer::INITIAL_AMOUNT_EURO, $this->initial_amount_euro);
  1543. if ($this->isColumnModified(KataoMemberPeer::INITIAL_AMOUNT_SOL)) $criteria->add(KataoMemberPeer::INITIAL_AMOUNT_SOL, $this->initial_amount_sol);
  1544. if ($this->isColumnModified(KataoMemberPeer::IS_REFERER)) $criteria->add(KataoMemberPeer::IS_REFERER, $this->is_referer);
  1545. if ($this->isColumnModified(KataoMemberPeer::IS_DELEGATE)) $criteria->add(KataoMemberPeer::IS_DELEGATE, $this->is_delegate);
  1546. if ($this->isColumnModified(KataoMemberPeer::IS_ANONYMOUS)) $criteria->add(KataoMemberPeer::IS_ANONYMOUS, $this->is_anonymous);
  1547. if ($this->isColumnModified(KataoMemberPeer::IS_MEMBER)) $criteria->add(KataoMemberPeer::IS_MEMBER, $this->is_member);
  1548. if ($this->isColumnModified(KataoMemberPeer::CARD_NUMBER_SOL)) $criteria->add(KataoMemberPeer::CARD_NUMBER_SOL, $this->card_number_sol);
  1549. if ($this->isColumnModified(KataoMemberPeer::USER_SITUATION)) $criteria->add(KataoMemberPeer::USER_SITUATION, $this->user_situation);
  1550. if ($this->isColumnModified(KataoMemberPeer::USER_BIRTHDAY)) $criteria->add(KataoMemberPeer::USER_BIRTHDAY, $this->user_birthday);
  1551. if ($this->isColumnModified(KataoMemberPeer::PARRAIN_NAME)) $criteria->add(KataoMemberPeer::PARRAIN_NAME, $this->parrain_name);
  1552. if ($this->isColumnModified(KataoMemberPeer::CREATED_AT)) $criteria->add(KataoMemberPeer::CREATED_AT, $this->created_at);
  1553. if ($this->isColumnModified(KataoMemberPeer::UPDATED_AT)) $criteria->add(KataoMemberPeer::UPDATED_AT, $this->updated_at);
  1554. return $criteria;
  1555. }
  1556. /**
  1557. * Builds a Criteria object containing the primary key for this object.
  1558. *
  1559. * Unlike buildCriteria() this method includes the primary key values regardless
  1560. * of whether or not they have been modified.
  1561. *
  1562. * @return Criteria The Criteria object containing value(s) for primary key(s).
  1563. */
  1564. public function buildPkeyCriteria()
  1565. {
  1566. $criteria = new Criteria(KataoMemberPeer::DATABASE_NAME);
  1567. $criteria->add(KataoMemberPeer::ID, $this->id);
  1568. return $criteria;
  1569. }
  1570. /**
  1571. * Returns the primary key for this object (row).
  1572. * @return int
  1573. */
  1574. public function getPrimaryKey()
  1575. {
  1576. return $this->getId();
  1577. }
  1578. /**
  1579. * Generic method to set the primary key (id column).
  1580. *
  1581. * @param int $key Primary key.
  1582. * @return void
  1583. */
  1584. public function setPrimaryKey($key)
  1585. {
  1586. $this->setId($key);
  1587. }
  1588. /**
  1589. * Sets contents of passed object to values from current object.
  1590. *
  1591. * If desired, this method can also make copies of all associated (fkey referrers)
  1592. * objects.
  1593. *
  1594. * @param object $copyObj An object of KataoMember (or compatible) type.
  1595. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  1596. * @throws PropelException
  1597. */
  1598. public function copyInto($copyObj, $deepCopy = false)
  1599. {
  1600. $copyObj->setKataoIndex($this->katao_index);
  1601. $copyObj->setKataoNodeId($this->katao_node_id);
  1602. $copyObj->setNextKataoNodeId($this->next_katao_node_id);
  1603. $copyObj->setKataoMemberId($this->katao_member_id);
  1604. $copyObj->setFirstName($this->first_name);
  1605. $copyObj->setLastName($this->last_name);
  1606. $copyObj->setAccountingCode($this->accounting_code);
  1607. $copyObj->setAccountingCodeSol($this->accounting_code_sol);
  1608. $copyObj->setInitialAmountEuro($this->initial_amount_euro);
  1609. $copyObj->setInitialAmountSol($this->initial_amount_sol);
  1610. $copyObj->setIsReferer($this->is_referer);
  1611. $copyObj->setIsDelegate($this->is_delegate);
  1612. $copyObj->setIsAnonymous($this->is_anonymous);
  1613. $copyObj->setIsMember($this->is_member);
  1614. $copyObj->setCardNumberSol($this->card_number_sol);
  1615. $copyObj->setUserSituation($this->user_situation);
  1616. $copyObj->setUserBirthday($this->user_birthday);
  1617. $copyObj->setParrainName($this->parrain_name);
  1618. $copyObj->setCreatedAt($this->created_at);
  1619. $copyObj->setUpdatedAt($this->updated_at);
  1620. if ($deepCopy) {
  1621. // important: temporarily setNew(false) because this affects the behavior of
  1622. // the getter/setter methods for fkey referrer objects.
  1623. $copyObj->setNew(false);
  1624. foreach($this->getKataoConfigs() as $relObj) {
  1625. $copyObj->addKataoConfig($relObj->copy($deepCopy));
  1626. }
  1627. foreach($this->getKataoUsers() as $relObj) {
  1628. $copyObj->addKataoUser($relObj->copy($deepCopy));
  1629. }
  1630. foreach($this->getKataoMembersRelatedByKataoMemberId() as $relObj) {
  1631. if($this->getPrimaryKey() === $relObj->getPrimaryKey()) {
  1632. continue;
  1633. }
  1634. $copyObj->addKataoMemberRelatedByKataoMemberId($relObj->copy($deepCopy));
  1635. }
  1636. foreach($this->getKataoSuppliersRelatedByMemberId() as $relObj) {
  1637. $copyObj->addKataoSupplierRelatedByMemberId($relObj->copy($deepCopy));
  1638. }
  1639. foreach($this->getKataoSuppliersRelatedByRefererId() as $relObj) {
  1640. $copyObj->addKataoSupplierRelatedByRefererId($relObj->copy($deepCopy));
  1641. }
  1642. foreach($this->getKataoInvoices() as $relObj) {
  1643. $copyObj->addKataoInvoice($relObj->copy($deepCopy));
  1644. }
  1645. foreach($this->getKataoMemberDeposits() as $relObj) {
  1646. $copyObj->addKataoMemberDeposit($relObj->copy($deepCopy));
  1647. }
  1648. foreach($this->getKataoMemberNodes() as $relObj) {
  1649. $copyObj->addKataoMemberNode($relObj->copy($deepCopy));
  1650. }
  1651. foreach($this->getKataoAssocMemberGroups() as $relObj) {
  1652. $copyObj->addKataoAssocMemberGroup($relObj->copy($deepCopy));
  1653. }
  1654. } // if ($deepCopy)
  1655. $copyObj->setNew(true);
  1656. $copyObj->setId(NULL); // this is a pkey column, so set to default value
  1657. }
  1658. /**
  1659. * Makes a copy of this object that will be inserted as a new row in table when saved.
  1660. * It creates a new object filling in the simple attributes, but skipping any primary
  1661. * keys that are defined for the table.
  1662. *
  1663. * If desired, this method can also make copies of all associated (fkey referrers)
  1664. * objects.
  1665. *
  1666. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  1667. * @return KataoMember Clone of current object.
  1668. * @throws PropelException
  1669. */
  1670. public function copy($deepCopy = false)
  1671. {
  1672. // we use get_class(), because this might be a subclass
  1673. $clazz = get_class($this);
  1674. $copyObj = new $clazz();
  1675. $this->copyInto($copyObj, $deepCopy);
  1676. return $copyObj;
  1677. }
  1678. /**
  1679. * Returns a peer instance associated with this om.
  1680. *
  1681. * Since Peer classes are not to have any instance attributes, this method returns the
  1682. * same instance for all member of this class. The method could therefore
  1683. * be static, but this would prevent one from overriding the behavior.
  1684. *
  1685. * @return KataoMemberPeer
  1686. */
  1687. public function getPeer()
  1688. {
  1689. if (self::$peer === null) {
  1690. self::$peer = new KataoMemberPeer();
  1691. }
  1692. return self::$peer;
  1693. }
  1694. /**
  1695. * Declares an association between this object and a KataoNode object.
  1696. *
  1697. * @param KataoNode $v
  1698. * @return void
  1699. * @throws PropelException
  1700. */
  1701. public function setKataoNodeRelatedByKataoNodeId($v)
  1702. {
  1703. if ($v === null) {
  1704. $this->setKataoNodeId(NULL);
  1705. } else {
  1706. $this->setKataoNodeId($v->getId());
  1707. }
  1708. $this->aKataoNodeRelatedByKataoNodeId = $v;
  1709. }
  1710. /**
  1711. * Get the associated KataoNode object
  1712. *
  1713. * @param Connection Optional Connection object.
  1714. * @return KataoNode The associated KataoNode object.
  1715. * @throws PropelException
  1716. */
  1717. public function getKataoNodeRelatedByKataoNodeId($con = null)
  1718. {
  1719. if ($this->aKataoNodeRelatedByKataoNodeId === null && ($this->katao_node_id !== null)) {
  1720. // include the related Peer class
  1721. $this->aKataoNodeRelatedByKataoNodeId = KataoNodePeer::retrieveByPK($this->katao_node_id, $con);
  1722. /* The following can be used instead of the line above to
  1723. guarantee the related object contains a reference
  1724. to this object, but this level of coupling
  1725. may be undesirable in many circumstances.
  1726. As it can lead to a db query with many results that may
  1727. never be used.
  1728. $obj = KataoNodePeer::retrieveByPK($this->katao_node_id, $con);
  1729. $obj->addKataoNodesRelatedByKataoNodeId($this);
  1730. */
  1731. }
  1732. return $this->aKataoNodeRelatedByKataoNodeId;
  1733. }
  1734. /**
  1735. * Declares an association between this object and a KataoNode object.
  1736. *
  1737. * @param KataoNode $v
  1738. * @return void
  1739. * @throws PropelException
  1740. */
  1741. public function setKataoNodeRelatedByNextKataoNodeId($v)
  1742. {
  1743. if ($v === null) {
  1744. $this->setNextKataoNodeId(NULL);
  1745. } else {
  1746. $this->setNextKataoNodeId($v->getId());
  1747. }
  1748. $this->aKataoNodeRelatedByNextKataoNodeId = $v;
  1749. }
  1750. /**
  1751. * Get the associated KataoNode object
  1752. *
  1753. * @param Connection Optional Connection object.
  1754. * @return KataoNode The associated KataoNode object.
  1755. * @throws PropelException
  1756. */
  1757. public function getKataoNodeRelatedByNextKataoNodeId($con = null)
  1758. {
  1759. if ($this->aKataoNodeRelatedByNextKataoNodeId === null && ($this->next_katao_node_id !== null)) {
  1760. // include the related Peer class
  1761. $this->aKataoNodeRelatedByNextKataoNodeId = KataoNodePeer::retrieveByPK($this->next_katao_node_id, $con);
  1762. /* The following can be used instead of the line above to
  1763. guarantee the related object contains a reference
  1764. to this object, but this level of coupling
  1765. may be undesirable in many circumstances.
  1766. As it can lead to a db query with many results that may
  1767. never be used.
  1768. $obj = KataoNodePeer::retrieveByPK($this->next_katao_node_id, $con);
  1769. $obj->addKataoNodesRelatedByNextKataoNodeId($this);
  1770. */
  1771. }
  1772. return $this->aKataoNodeRelatedByNextKataoNodeId;
  1773. }
  1774. /**
  1775. * Declares an association between this object and a KataoMember object.
  1776. *
  1777. * @param KataoMember $v
  1778. * @return void
  1779. * @throws PropelException
  1780. */
  1781. public function setKataoMemberRelatedByKataoMemberId($v)
  1782. {
  1783. if ($v === null) {
  1784. $this->setKataoMemberId(NULL);
  1785. } else {
  1786. $this->setKataoMemberId($v->getId());
  1787. }
  1788. $this->aKataoMemberRelatedByKataoMemberId = $v;
  1789. }
  1790. /**
  1791. * Get the associated KataoMember object
  1792. *
  1793. * @param Connection Optional Connection object.
  1794. * @return KataoMember The associated KataoMember object.
  1795. * @throws PropelException
  1796. */
  1797. public function getKataoMemberRelatedByKataoMemberId($con = null)
  1798. {
  1799. if ($this->aKataoMemberRelatedByKataoMemberId === null && ($this->katao_member_id !== null)) {
  1800. // include the related Peer class
  1801. $this->aKataoMemberRelatedByKataoMemberId = KataoMemberPeer::retrieveByPK($this->katao_member_id, $con);
  1802. /* The following can be used instead of the line above to
  1803. guarantee the related object contains a reference
  1804. to this object, but this level of coupling
  1805. may be undesirable in many circumstances.
  1806. As it can lead to a db query with many results that may
  1807. never be used.
  1808. $obj = KataoMemberPeer::retrieveByPK($this->katao_member_id, $con);
  1809. $obj->addKataoMembersRelatedByKataoMemberId($this);
  1810. */
  1811. }
  1812. return $this->aKataoMemberRelatedByKataoMemberId;
  1813. }
  1814. /**
  1815. * Temporary storage of collKataoConfigs to save a possible db hit in
  1816. * the event objects are add to the collection, but the
  1817. * complete collection is never requested.
  1818. * @return void
  1819. */
  1820. public function initKataoConfigs()
  1821. {
  1822. if ($this->collKataoConfigs === null) {
  1823. $this->collKataoConfigs = array();
  1824. }
  1825. }
  1826. /**
  1827. * If this collection has already been initialized with
  1828. * an identical criteria, it returns the collection.
  1829. * Otherwise if this KataoMember has previously
  1830. * been saved, it will retrieve related KataoConfigs from storage.
  1831. * If this KataoMember is new, it will return
  1832. * an empty collection or the current collection, the criteria
  1833. * is ignored on a new object.
  1834. *
  1835. * @param Connection $con
  1836. * @param Criteria $criteria
  1837. * @throws PropelException
  1838. */
  1839. public function getKataoConfigs($criteria = null, $con = null)
  1840. {
  1841. // include the Peer class
  1842. if ($criteria === null) {
  1843. $criteria = new Criteria();
  1844. }
  1845. elseif ($criteria instanceof Criteria)
  1846. {
  1847. $criteria = clone $criteria;
  1848. }
  1849. if ($this->collKataoConfigs === null) {
  1850. if ($this->isNew()) {
  1851. $this->collKataoConfigs = array();
  1852. } else {
  1853. $criteria->add(KataoConfigPeer::KATAO_MEMBER_ID, $this->getId());
  1854. KataoConfigPeer::addSelectColumns($criteria);
  1855. $this->collKataoConfigs = KataoConfigPeer::doSelect($criteria, $con);
  1856. }
  1857. } else {
  1858. // criteria has no effect for a new object
  1859. if (!$this->isNew()) {
  1860. // the following code is to determine if a new query is
  1861. // called for. If the criteria is the same as the last
  1862. // one, just return the collection.
  1863. $criteria->add(KataoConfigPeer::KATAO_MEMBER_ID, $this->getId());
  1864. KataoConfigPeer::addSelectColumns($criteria);
  1865. if (!isset($this->lastKataoConfigCriteria) || !$this->lastKataoConfigCriteria->equals($criteria)) {
  1866. $this->collKataoConfigs = KataoConfigPeer::doSelect($criteria, $con);
  1867. }
  1868. }
  1869. }
  1870. $this->lastKataoConfigCriteria = $criteria;
  1871. return $this->collKataoConfigs;
  1872. }
  1873. /**
  1874. * Returns the number of related KataoConfigs.
  1875. *
  1876. * @param Criteria $criteria
  1877. * @param boolean $distinct
  1878. * @param Connection $con
  1879. * @throws PropelException
  1880. */
  1881. public function countKataoConfigs($criteria = null, $distinct = false, $con = null)
  1882. {
  1883. // include the Peer class
  1884. if ($criteria === null) {
  1885. $criteria = new Criteria();
  1886. }
  1887. elseif ($criteria instanceof Criteria)
  1888. {
  1889. $criteria = clone $criteria;
  1890. }
  1891. $criteria->add(KataoConfigPeer::KATAO_MEMBER_ID, $this->getId());
  1892. return KataoConfigPeer::doCount($criteria, $distinct, $con);
  1893. }
  1894. /**
  1895. * Method called to associate a KataoConfig object to this object
  1896. * through the KataoConfig foreign key attribute
  1897. *
  1898. * @param KataoConfig $l KataoConfig
  1899. * @return void
  1900. * @throws PropelException
  1901. */
  1902. public function addKataoConfig(KataoConfig $l)
  1903. {
  1904. $this->collKataoConfigs[] = $l;
  1905. $l->setKataoMember($this);
  1906. }
  1907. /**
  1908. * Temporary storage of collKataoUsers to save a possible db hit in
  1909. * the event objects are add to the collection, but the
  1910. * complete collection is never requested.
  1911. * @return void
  1912. */
  1913. public function initKataoUsers()
  1914. {
  1915. if ($this->collKataoUsers === null) {
  1916. $this->collKataoUsers = array();
  1917. }
  1918. }
  1919. /**
  1920. * If this collection has already been initialized with
  1921. * an identical criteria, it returns the collection.
  1922. * Otherwise if this KataoMember has previously
  1923. * been saved, it will retrieve related KataoUsers from storage.
  1924. * If this KataoMember is new, it will return
  1925. * an empty collection or the current collection, the criteria
  1926. * is ignored on a new object.
  1927. *
  1928. * @param Connection $con
  1929. * @param Criteria $criteria
  1930. * @throws PropelException
  1931. */
  1932. public function getKataoUsers($criteria = null, $con = null)
  1933. {
  1934. // include the Peer class
  1935. if ($criteria === null) {
  1936. $criteria = new Criteria();
  1937. }
  1938. elseif ($criteria instanceof Criteria)
  1939. {
  1940. $criteria = clone $criteria;
  1941. }
  1942. if ($this->collKataoUsers === null) {
  1943. if ($this->isNew()) {
  1944. $this->collKataoUsers = array();
  1945. } else {
  1946. $criteria->add(KataoUserPeer::KATAO_MEMBER_ID, $this->getId());
  1947. KataoUserPeer::addSelectColumns($criteria);
  1948. $this->collKataoUsers = KataoUserPeer::doSelect($criteria, $con);
  1949. }
  1950. } else {
  1951. // criteria has no effect for a new object
  1952. if (!$this->isNew()) {
  1953. // the following code is to determine if a new query is
  1954. // called for. If the criteria is the same as the last
  1955. // one, just return the collection.
  1956. $criteria->add(KataoUserPeer::KATAO_MEMBER_ID, $this->getId());
  1957. KataoUserPeer::addSelectColumns($criteria);
  1958. if (!isset($this->lastKataoUserCriteria) || !$this->lastKataoUserCriteria->equals($criteria)) {
  1959. $this->collKataoUsers = KataoUserPeer::doSelect($criteria, $con);
  1960. }
  1961. }
  1962. }
  1963. $this->lastKataoUserCriteria = $criteria;
  1964. return $this->collKataoUsers;
  1965. }
  1966. /**
  1967. * Returns the number of related KataoUsers.
  1968. *
  1969. * @param Criteria $criteria
  1970. * @param boolean $distinct
  1971. * @param Connection $con
  1972. * @throws PropelException
  1973. */
  1974. public function countKataoUsers($criteria = null, $distinct = false, $con = null)
  1975. {
  1976. // include the Peer class
  1977. if ($criteria === null) {
  1978. $criteria = new Criteria();
  1979. }
  1980. elseif ($criteria instanceof Criteria)
  1981. {
  1982. $criteria = clone $criteria;
  1983. }
  1984. $criteria->add(KataoUserPeer::KATAO_MEMBER_ID, $this->getId());
  1985. return KataoUserPeer::doCount($criteria, $distinct, $con);
  1986. }
  1987. /**
  1988. * Method called to associate a KataoUser object to this object
  1989. * through the KataoUser foreign key attribute
  1990. *
  1991. * @param KataoUser $l KataoUser
  1992. * @return void
  1993. * @throws PropelException
  1994. */
  1995. public function addKataoUser(KataoUser $l)
  1996. {
  1997. $this->collKataoUsers[] = $l;
  1998. $l->setKataoMember($this);
  1999. }
  2000. /**
  2001. * If this collection has already been initialized with
  2002. * an identical criteria, it returns the collection.
  2003. * Otherwise if this KataoMember is new, it will return
  2004. * an empty collection; or if this KataoMember has previously
  2005. * been saved, it will retrieve related KataoUsers from storage.
  2006. *
  2007. * This method is protected by default in order to keep the public
  2008. * api reasonable. You can provide public methods for those you
  2009. * actually need in KataoMember.
  2010. */
  2011. public function getKataoUsersJoinKataoSupplier($criteria = null, $con = null)
  2012. {
  2013. // include the Peer class
  2014. if ($criteria === null) {
  2015. $criteria = new Criteria();
  2016. }
  2017. elseif ($criteria instanceof Criteria)
  2018. {
  2019. $criteria = clone $criteria;
  2020. }
  2021. if ($this->collKataoUsers === null) {
  2022. if ($this->isNew()) {
  2023. $this->collKataoUsers = array();
  2024. } else {
  2025. $criteria->add(KataoUserPeer::KATAO_MEMBER_ID, $this->getId());
  2026. $this->collKataoUsers = KataoUserPeer::doSelectJoinKataoSupplier($criteria, $con);
  2027. }
  2028. } else {
  2029. // the following code is to determine if a new query is
  2030. // called for. If the criteria is the same as the last
  2031. // one, just return the collection.
  2032. $criteria->add(KataoUserPeer::KATAO_MEMBER_ID, $this->getId());
  2033. if (!isset($this->lastKataoUserCriteria) || !$this->lastKataoUserCriteria->equals($criteria)) {
  2034. $this->collKataoUsers = KataoUserPeer::doSelectJoinKataoSupplier($criteria, $con);
  2035. }
  2036. }
  2037. $this->lastKataoUserCriteria = $criteria;
  2038. return $this->collKataoUsers;
  2039. }
  2040. /**
  2041. * Temporary storage of collKataoMembersRelatedByKataoMemberId to save a possible db hit in
  2042. * the event objects are add to the collection, but the
  2043. * complete collection is never requested.
  2044. * @return void
  2045. */
  2046. public function initKataoMembersRelatedByKataoMemberId()
  2047. {
  2048. if ($this->collKataoMembersRelatedByKataoMemberId === null) {
  2049. $this->collKataoMembersRelatedByKataoMemberId = array();
  2050. }
  2051. }
  2052. /**
  2053. * If this collection has already been initialized with
  2054. * an identical criteria, it returns the collection.
  2055. * Otherwise if this KataoMember has previously
  2056. * been saved, it will retrieve related KataoMembersRelatedByKataoMemberId from storage.
  2057. * If this KataoMember is new, it will return
  2058. * an empty collection or the current collection, the criteria
  2059. * is ignored on a new object.
  2060. *
  2061. * @param Connection $con
  2062. * @param Criteria $criteria
  2063. * @throws PropelException
  2064. */
  2065. public function getKataoMembersRelatedByKataoMemberId($criteria = null, $con = null)
  2066. {
  2067. // include the Peer class
  2068. if ($criteria === null) {
  2069. $criteria = new Criteria();
  2070. }
  2071. elseif ($criteria instanceof Criteria)
  2072. {
  2073. $criteria = clone $criteria;
  2074. }
  2075. if ($this->collKataoMembersRelatedByKataoMemberId === null) {
  2076. if ($this->isNew()) {
  2077. $this->collKataoMembersRelatedByKataoMemberId = array();
  2078. } else {
  2079. $criteria->add(KataoMemberPeer::KATAO_MEMBER_ID, $this->getId());
  2080. KataoMemberPeer::addSelectColumns($criteria);
  2081. $this->collKataoMembersRelatedByKataoMemberId = KataoMemberPeer::doSelect($criteria, $con);
  2082. }
  2083. } else {
  2084. // criteria has no effect for a new object
  2085. if (!$this->isNew()) {
  2086. // the following code is to determine if a new query is
  2087. // called for. If the criteria is the same as the last
  2088. // one, just return the collection.
  2089. $criteria->add(KataoMemberPeer::KATAO_MEMBER_ID, $this->getId());
  2090. KataoMemberPeer::addSelectColumns($criteria);
  2091. if (!isset($this->lastKataoMemberRelatedByKataoMemberIdCriteria) || !$this->lastKataoMemberRelatedByKataoMemberIdCriteria->equals($criteria)) {
  2092. $this->collKataoMembersRelatedByKataoMemberId = KataoMemberPeer::doSelect($criteria, $con);
  2093. }
  2094. }
  2095. }
  2096. $this->lastKataoMemberRelatedByKataoMemberIdCriteria = $criteria;
  2097. return $this->collKataoMembersRelatedByKataoMemberId;
  2098. }
  2099. /**
  2100. * Returns the number of related KataoMembersRelatedByKataoMemberId.
  2101. *
  2102. * @param Criteria $criteria
  2103. * @param boolean $distinct
  2104. * @param Connection $con
  2105. * @throws PropelException
  2106. */
  2107. public function countKataoMembersRelatedByKataoMemberId($criteria = null, $distinct = false, $con = null)
  2108. {
  2109. // include the Peer class
  2110. if ($criteria === null) {
  2111. $criteria = new Criteria();
  2112. }
  2113. elseif ($criteria instanceof Criteria)
  2114. {
  2115. $criteria = clone $criteria;
  2116. }
  2117. $criteria->add(KataoMemberPeer::KATAO_MEMBER_ID, $this->getId());
  2118. return KataoMemberPeer::doCount($criteria, $distinct, $con);
  2119. }
  2120. /**
  2121. * Method called to associate a KataoMember object to this object
  2122. * through the KataoMember foreign key attribute
  2123. *
  2124. * @param KataoMember $l KataoMember
  2125. * @return void
  2126. * @throws PropelException
  2127. */
  2128. public function addKataoMemberRelatedByKataoMemberId(KataoMember $l)
  2129. {
  2130. $this->collKataoMembersRelatedByKataoMemberId[] = $l;
  2131. $l->setKataoMemberRelatedByKataoMemberId($this);
  2132. }
  2133. /**
  2134. * If this collection has already been initialized with
  2135. * an identical criteria, it returns the collection.
  2136. * Otherwise if this KataoMember is new, it will return
  2137. * an empty collection; or if this KataoMember has previously
  2138. * been saved, it will retrieve related KataoMembersRelatedByKataoMemberId from storage.
  2139. *
  2140. * This method is protected by default in order to keep the public
  2141. * api reasonable. You can provide public methods for those you
  2142. * actually need in KataoMember.
  2143. */
  2144. public function getKataoMembersRelatedByKataoMemberIdJoinKataoNodeRelatedByKataoNodeId($criteria = null, $con = null)
  2145. {
  2146. // include the Peer class
  2147. if ($criteria === null) {
  2148. $criteria = new Criteria();
  2149. }
  2150. elseif ($criteria instanceof Criteria)
  2151. {
  2152. $criteria = clone $criteria;
  2153. }
  2154. if ($this->collKataoMembersRelatedByKataoMemberId === null) {
  2155. if ($this->isNew()) {
  2156. $this->collKataoMembersRelatedByKataoMemberId = array();
  2157. } else {
  2158. $criteria->add(KataoMemberPeer::KATAO_MEMBER_ID, $this->getId());
  2159. $this->collKataoMembersRelatedByKataoMemberId = KataoMemberPeer::doSelectJoinKataoNodeRelatedByKataoNodeId($criteria, $con);
  2160. }
  2161. } else {
  2162. // the following code is to determine if a new query is
  2163. // called for. If the criteria is the same as the last
  2164. // one, just return the collection.
  2165. $criteria->add(KataoMemberPeer::KATAO_MEMBER_ID, $this->getId());
  2166. if (!isset($this->lastKataoMemberRelatedByKataoMemberIdCriteria) || !$this->lastKataoMemberRelatedByKataoMemberIdCriteria->equals($criteria)) {
  2167. $this->collKataoMembersRelatedByKataoMemberId = KataoMemberPeer::doSelectJoinKataoNodeRelatedByKataoNodeId($criteria, $con);
  2168. }
  2169. }
  2170. $this->lastKataoMemberRelatedByKataoMemberIdCriteria = $criteria;
  2171. return $this->collKataoMembersRelatedByKataoMemberId;
  2172. }
  2173. /**
  2174. * If this collection has already been initialized with
  2175. * an identical criteria, it returns the collection.
  2176. * Otherwise if this KataoMember is new, it will return
  2177. * an empty collection; or if this KataoMember has previously
  2178. * been saved, it will retrieve related KataoMembersRelatedByKataoMemberId from storage.
  2179. *
  2180. * This method is protected by default in order to keep the public
  2181. * api reasonable. You can provide public methods for those you
  2182. * actually need in KataoMember.
  2183. */
  2184. public function getKataoMembersRelatedByKataoMemberIdJoinKataoNodeRelatedByNextKataoNodeId($criteria = null, $con = null)
  2185. {
  2186. // include the Peer class
  2187. if ($criteria === null) {
  2188. $criteria = new Criteria();
  2189. }
  2190. elseif ($criteria instanceof Criteria)
  2191. {
  2192. $criteria = clone $criteria;
  2193. }
  2194. if ($this->collKataoMembersRelatedByKataoMemberId === null) {
  2195. if ($this->isNew()) {
  2196. $this->collKataoMembersRelatedByKataoMemberId = array();
  2197. } else {
  2198. $criteria->add(KataoMemberPeer::KATAO_MEMBER_ID, $this->getId());
  2199. $this->collKataoMembersRelatedByKataoMemberId = KataoMemberPeer::doSelectJoinKataoNodeRelatedByNextKataoNodeId($criteria, $con);
  2200. }
  2201. } else {
  2202. // the following code is to determine if a new query is
  2203. // called for. If the criteria is the same as the last
  2204. // one, just return the collection.
  2205. $criteria->add(KataoMemberPeer::KATAO_MEMBER_ID, $this->getId());
  2206. if (!isset($this->lastKataoMemberRelatedByKataoMemberIdCriteria) || !$this->lastKataoMemberRelatedByKataoMemberIdCriteria->equals($criteria)) {
  2207. $this->collKataoMembersRelatedByKataoMemberId = KataoMemberPeer::doSelectJoinKataoNodeRelatedByNextKataoNodeId($criteria, $con);
  2208. }
  2209. }
  2210. $this->lastKataoMemberRelatedByKataoMemberIdCriteria = $criteria;
  2211. return $this->collKataoMembersRelatedByKataoMemberId;
  2212. }
  2213. /**
  2214. * Temporary storage of collKataoSuppliersRelatedByMemberId to save a possible db hit in
  2215. * the event objects are add to the collection, but the
  2216. * complete collection is never requested.
  2217. * @return void
  2218. */
  2219. public function initKataoSuppliersRelatedByMemberId()
  2220. {
  2221. if ($this->collKataoSuppliersRelatedByMemberId === null) {
  2222. $this->collKataoSuppliersRelatedByMemberId = array();
  2223. }
  2224. }
  2225. /**
  2226. * If this collection has already been initialized with
  2227. * an identical criteria, it returns the collection.
  2228. * Otherwise if this KataoMember has previously
  2229. * been saved, it will retrieve related KataoSuppliersRelatedByMemberId from storage.
  2230. * If this KataoMember is new, it will return
  2231. * an empty collection or the current collection, the criteria
  2232. * is ignored on a new object.
  2233. *
  2234. * @param Connection $con
  2235. * @param Criteria $criteria
  2236. * @throws PropelException
  2237. */
  2238. public function getKataoSuppliersRelatedByMemberId($criteria = null, $con = null)
  2239. {
  2240. // include the Peer class
  2241. if ($criteria === null) {
  2242. $criteria = new Criteria();
  2243. }
  2244. elseif ($criteria instanceof Criteria)
  2245. {
  2246. $criteria = clone $criteria;
  2247. }
  2248. if ($this->collKataoSuppliersRelatedByMemberId === null) {
  2249. if ($this->isNew()) {
  2250. $this->collKataoSuppliersRelatedByMemberId = array();
  2251. } else {
  2252. $criteria->add(KataoSupplierPeer::MEMBER_ID, $this->getId());
  2253. KataoSupplierPeer::addSelectColumns($criteria);
  2254. $this->collKataoSuppliersRelatedByMemberId = KataoSupplierPeer::doSelect($criteria, $con);
  2255. }
  2256. } else {
  2257. // criteria has no effect for a new object
  2258. if (!$this->isNew()) {
  2259. // the following code is to determine if a new query is
  2260. // called for. If the criteria is the same as the last
  2261. // one, just return the collection.
  2262. $criteria->add(KataoSupplierPeer::MEMBER_ID, $this->getId());
  2263. KataoSupplierPeer::addSelectColumns($criteria);
  2264. if (!isset($this->lastKataoSupplierRelatedByMemberIdCriteria) || !$this->lastKataoSupplierRelatedByMemberIdCriteria->equals($criteria)) {
  2265. $this->collKataoSuppliersRelatedByMemberId = KataoSupplierPeer::doSelect($criteria, $con);
  2266. }
  2267. }
  2268. }
  2269. $this->lastKataoSupplierRelatedByMemberIdCriteria = $criteria;
  2270. return $this->collKataoSuppliersRelatedByMemberId;
  2271. }
  2272. /**
  2273. * Returns the number of related KataoSuppliersRelatedByMemberId.
  2274. *
  2275. * @param Criteria $criteria
  2276. * @param boolean $distinct
  2277. * @param Connection $con
  2278. * @throws PropelException
  2279. */
  2280. public function countKataoSuppliersRelatedByMemberId($criteria = null, $distinct = false, $con = null)
  2281. {
  2282. // include the Peer class
  2283. if ($criteria === null) {
  2284. $criteria = new Criteria();
  2285. }
  2286. elseif ($criteria instanceof Criteria)
  2287. {
  2288. $criteria = clone $criteria;
  2289. }
  2290. $criteria->add(KataoSupplierPeer::MEMBER_ID, $this->getId());
  2291. return KataoSupplierPeer::doCount($criteria, $distinct, $con);
  2292. }
  2293. /**
  2294. * Method called to associate a KataoSupplier object to this object
  2295. * through the KataoSupplier foreign key attribute
  2296. *
  2297. * @param KataoSupplier $l KataoSupplier
  2298. * @return void
  2299. * @throws PropelException
  2300. */
  2301. public function addKataoSupplierRelatedByMemberId(KataoSupplier $l)
  2302. {
  2303. $this->collKataoSuppliersRelatedByMemberId[] = $l;
  2304. $l->setKataoMemberRelatedByMemberId($this);
  2305. }
  2306. /**
  2307. * Temporary storage of collKataoSuppliersRelatedByRefererId to save a possible db hit in
  2308. * the event objects are add to the collection, but the
  2309. * complete collection is never requested.
  2310. * @return void
  2311. */
  2312. public function initKataoSuppliersRelatedByRefererId()
  2313. {
  2314. if ($this->collKataoSuppliersRelatedByRefererId === null) {
  2315. $this->collKataoSuppliersRelatedByRefererId = array();
  2316. }
  2317. }
  2318. /**
  2319. * If this collection has already been initialized with
  2320. * an identical criteria, it returns the collection.
  2321. * Otherwise if this KataoMember has previously
  2322. * been saved, it will retrieve related KataoSuppliersRelatedByRefererId from storage.
  2323. * If this KataoMember is new, it will return
  2324. * an empty collection or the current collection, the criteria
  2325. * is ignored on a new object.
  2326. *
  2327. * @param Connection $con
  2328. * @param Criteria $criteria
  2329. * @throws PropelException
  2330. */
  2331. public function getKataoSuppliersRelatedByRefererId($criteria = null, $con = null)
  2332. {
  2333. // include the Peer class
  2334. if ($criteria === null) {
  2335. $criteria = new Criteria();
  2336. }
  2337. elseif ($criteria instanceof Criteria)
  2338. {
  2339. $criteria = clone $criteria;
  2340. }
  2341. if ($this->collKataoSuppliersRelatedByRefererId === null) {
  2342. if ($this->isNew()) {
  2343. $this->collKataoSuppliersRelatedByRefererId = array();
  2344. } else {
  2345. $criteria->add(KataoSupplierPeer::REFERER_ID, $this->getId());
  2346. KataoSupplierPeer::addSelectColumns($criteria);
  2347. $this->collKataoSuppliersRelatedByRefererId = KataoSupplierPeer::doSelect($criteria, $con);
  2348. }
  2349. } else {
  2350. // criteria has no effect for a new object
  2351. if (!$this->isNew()) {
  2352. // the following code is to determine if a new query is
  2353. // called for. If the criteria is the same as the last
  2354. // one, just return the collection.
  2355. $criteria->add(KataoSupplierPeer::REFERER_ID, $this->getId());
  2356. KataoSupplierPeer::addSelectColumns($criteria);
  2357. if (!isset($this->lastKataoSupplierRelatedByRefererIdCriteria) || !$this->lastKataoSupplierRelatedByRefererIdCriteria->equals($criteria)) {
  2358. $this->collKataoSuppliersRelatedByRefererId = KataoSupplierPeer::doSelect($criteria, $con);
  2359. }
  2360. }
  2361. }
  2362. $this->lastKataoSupplierRelatedByRefererIdCriteria = $criteria;
  2363. return $this->collKataoSuppliersRelatedByRefererId;
  2364. }
  2365. /**
  2366. * Returns the number of related KataoSuppliersRelatedByRefererId.
  2367. *
  2368. * @param Criteria $criteria
  2369. * @param boolean $distinct
  2370. * @param Connection $con
  2371. * @throws PropelException
  2372. */
  2373. public function countKataoSuppliersRelatedByRefererId($criteria = null, $distinct = false, $con = null)
  2374. {
  2375. // include the Peer class
  2376. if ($criteria === null) {
  2377. $criteria = new Criteria();
  2378. }
  2379. elseif ($criteria instanceof Criteria)
  2380. {
  2381. $criteria = clone $criteria;
  2382. }
  2383. $criteria->add(KataoSupplierPeer::REFERER_ID, $this->getId());
  2384. return KataoSupplierPeer::doCount($criteria, $distinct, $con);
  2385. }
  2386. /**
  2387. * Method called to associate a KataoSupplier object to this object
  2388. * through the KataoSupplier foreign key attribute
  2389. *
  2390. * @param KataoSupplier $l KataoSupplier
  2391. * @return void
  2392. * @throws PropelException
  2393. */
  2394. public function addKataoSupplierRelatedByRefererId(KataoSupplier $l)
  2395. {
  2396. $this->collKataoSuppliersRelatedByRefererId[] = $l;
  2397. $l->setKataoMemberRelatedByRefererId($this);
  2398. }
  2399. /**
  2400. * Temporary storage of collKataoInvoices to save a possible db hit in
  2401. * the event objects are add to the collection, but the
  2402. * complete collection is never requested.
  2403. * @return void
  2404. */
  2405. public function initKataoInvoices()
  2406. {
  2407. if ($this->collKataoInvoices === null) {
  2408. $this->collKataoInvoices = array();
  2409. }
  2410. }
  2411. /**
  2412. * If this collection has already been initialized with
  2413. * an identical criteria, it returns the collection.
  2414. * Otherwise if this KataoMember has previously
  2415. * been saved, it will retrieve related KataoInvoices from storage.
  2416. * If this KataoMember is new, it will return
  2417. * an empty collection or the current collection, the criteria
  2418. * is ignored on a new object.
  2419. *
  2420. * @param Connection $con
  2421. * @param Criteria $criteria
  2422. * @throws PropelException
  2423. */
  2424. public function getKataoInvoices($criteria = null, $con = null)
  2425. {
  2426. // include the Peer class
  2427. if ($criteria === null) {
  2428. $criteria = new Criteria();
  2429. }
  2430. elseif ($criteria instanceof Criteria)
  2431. {
  2432. $criteria = clone $criteria;
  2433. }
  2434. if ($this->collKataoInvoices === null) {
  2435. if ($this->isNew()) {
  2436. $this->collKataoInvoices = array();
  2437. } else {
  2438. $criteria->add(KataoInvoicePeer::KATAO_MEMBER_ID, $this->getId());
  2439. KataoInvoicePeer::addSelectColumns($criteria);
  2440. $this->collKataoInvoices = KataoInvoicePeer::doSelect($criteria, $con);
  2441. }
  2442. } else {
  2443. // criteria has no effect for a new object
  2444. if (!$this->isNew()) {
  2445. // the following code is to determine if a new query is
  2446. // called for. If the criteria is the same as the last
  2447. // one, just return the collection.
  2448. $criteria->add(KataoInvoicePeer::KATAO_MEMBER_ID, $this->getId());
  2449. KataoInvoicePeer::addSelectColumns($criteria);
  2450. if (!isset($this->lastKataoInvoiceCriteria) || !$this->lastKataoInvoiceCriteria->equals($criteria)) {
  2451. $this->collKataoInvoices = KataoInvoicePeer::doSelect($criteria, $con);
  2452. }
  2453. }
  2454. }
  2455. $this->lastKataoInvoiceCriteria = $criteria;
  2456. return $this->collKataoInvoices;
  2457. }
  2458. /**
  2459. * Returns the number of related KataoInvoices.
  2460. *
  2461. * @param Criteria $criteria
  2462. * @param boolean $distinct
  2463. * @param Connection $con
  2464. * @throws PropelException
  2465. */
  2466. public function countKataoInvoices($criteria = null, $distinct = false, $con = null)
  2467. {
  2468. // include the Peer class
  2469. if ($criteria === null) {
  2470. $criteria = new Criteria();
  2471. }
  2472. elseif ($criteria instanceof Criteria)
  2473. {
  2474. $criteria = clone $criteria;
  2475. }
  2476. $criteria->add(KataoInvoicePeer::KATAO_MEMBER_ID, $this->getId());
  2477. return KataoInvoicePeer::doCount($criteria, $distinct, $con);
  2478. }
  2479. /**
  2480. * Method called to associate a KataoInvoice object to this object
  2481. * through the KataoInvoice foreign key attribute
  2482. *
  2483. * @param KataoInvoice $l KataoInvoice
  2484. * @return void
  2485. * @throws PropelException
  2486. */
  2487. public function addKataoInvoice(KataoInvoice $l)
  2488. {
  2489. $this->collKataoInvoices[] = $l;
  2490. $l->setKataoMember($this);
  2491. }
  2492. /**
  2493. * If this collection has already been initialized with
  2494. * an identical criteria, it returns the collection.
  2495. * Otherwise if this KataoMember is new, it will return
  2496. * an empty collection; or if this KataoMember has previously
  2497. * been saved, it will retrieve related KataoInvoices from storage.
  2498. *
  2499. * This method is protected by default in order to keep the public
  2500. * api reasonable. You can provide public methods for those you
  2501. * actually need in KataoMember.
  2502. */
  2503. public function getKataoInvoicesJoinKataoPeriod($criteria = null, $con = null)
  2504. {
  2505. // include the Peer class
  2506. if ($criteria === null) {
  2507. $criteria = new Criteria();
  2508. }
  2509. elseif ($criteria instanceof Criteria)
  2510. {
  2511. $criteria = clone $criteria;
  2512. }
  2513. if ($this->collKataoInvoices === null) {
  2514. if ($this->isNew()) {
  2515. $this->collKataoInvoices = array();
  2516. } else {
  2517. $criteria->add(KataoInvoicePeer::KATAO_MEMBER_ID, $this->getId());
  2518. $this->collKataoInvoices = KataoInvoicePeer::doSelectJoinKataoPeriod($criteria, $con);
  2519. }
  2520. } else {
  2521. // the following code is to determine if a new query is
  2522. // called for. If the criteria is the same as the last
  2523. // one, just return the collection.
  2524. $criteria->add(KataoInvoicePeer::KATAO_MEMBER_ID, $this->getId());
  2525. if (!isset($this->lastKataoInvoiceCriteria) || !$this->lastKataoInvoiceCriteria->equals($criteria)) {
  2526. $this->collKataoInvoices = KataoInvoicePeer::doSelectJoinKataoPeriod($criteria, $con);
  2527. }
  2528. }
  2529. $this->lastKataoInvoiceCriteria = $criteria;
  2530. return $this->collKataoInvoices;
  2531. }
  2532. /**
  2533. * If this collection has already been initialized with
  2534. * an identical criteria, it returns the collection.
  2535. * Otherwise if this KataoMember is new, it will return
  2536. * an empty collection; or if this KataoMember has previously
  2537. * been saved, it will retrieve related KataoInvoices from storage.
  2538. *
  2539. * This method is protected by default in order to keep the public
  2540. * api reasonable. You can provide public methods for those you
  2541. * actually need in KataoMember.
  2542. */
  2543. public function getKataoInvoicesJoinKataoNode($criteria = null, $con = null)
  2544. {
  2545. // include the Peer class
  2546. if ($criteria === null) {
  2547. $criteria = new Criteria();
  2548. }
  2549. elseif ($criteria instanceof Criteria)
  2550. {
  2551. $criteria = clone $criteria;
  2552. }
  2553. if ($this->collKataoInvoices === null) {
  2554. if ($this->isNew()) {
  2555. $this->collKataoInvoices = array();
  2556. } else {
  2557. $criteria->add(KataoInvoicePeer::KATAO_MEMBER_ID, $this->getId());
  2558. $this->collKataoInvoices = KataoInvoicePeer::doSelectJoinKataoNode($criteria, $con);
  2559. }
  2560. } else {
  2561. // the following code is to determine if a new query is
  2562. // called for. If the criteria is the same as the last
  2563. // one, just return the collection.
  2564. $criteria->add(KataoInvoicePeer::KATAO_MEMBER_ID, $this->getId());
  2565. if (!isset($this->lastKataoInvoiceCriteria) || !$this->lastKataoInvoiceCriteria->equals($criteria)) {
  2566. $this->collKataoInvoices = KataoInvoicePeer::doSelectJoinKataoNode($criteria, $con);
  2567. }
  2568. }
  2569. $this->lastKataoInvoiceCriteria = $criteria;
  2570. return $this->collKataoInvoices;
  2571. }
  2572. /**
  2573. * If this collection has already been initialized with
  2574. * an identical criteria, it returns the collection.
  2575. * Otherwise if this KataoMember is new, it will return
  2576. * an empty collection; or if this KataoMember has previously
  2577. * been saved, it will retrieve related KataoInvoices from storage.
  2578. *
  2579. * This method is protected by default in order to keep the public
  2580. * api reasonable. You can provide public methods for those you
  2581. * actually need in KataoMember.
  2582. */
  2583. public function getKataoInvoicesJoinKataoCart($criteria = null, $con = null)
  2584. {
  2585. // include the Peer class
  2586. if ($criteria === null) {
  2587. $criteria = new Criteria();
  2588. }
  2589. elseif ($criteria instanceof Criteria)
  2590. {
  2591. $criteria = clone $criteria;
  2592. }
  2593. if ($this->collKataoInvoices === null) {
  2594. if ($this->isNew()) {
  2595. $this->collKataoInvoices = array();
  2596. } else {
  2597. $criteria->add(KataoInvoicePeer::KATAO_MEMBER_ID, $this->getId());
  2598. $this->collKataoInvoices = KataoInvoicePeer::doSelectJoinKataoCart($criteria, $con);
  2599. }
  2600. } else {
  2601. // the following code is to determine if a new query is
  2602. // called for. If the criteria is the same as the last
  2603. // one, just return the collection.
  2604. $criteria->add(KataoInvoicePeer::KATAO_MEMBER_ID, $this->getId());
  2605. if (!isset($this->lastKataoInvoiceCriteria) || !$this->lastKataoInvoiceCriteria->equals($criteria)) {
  2606. $this->collKataoInvoices = KataoInvoicePeer::doSelectJoinKataoCart($criteria, $con);
  2607. }
  2608. }
  2609. $this->lastKataoInvoiceCriteria = $criteria;
  2610. return $this->collKataoInvoices;
  2611. }
  2612. /**
  2613. * Temporary storage of collKataoMemberDeposits to save a possible db hit in
  2614. * the event objects are add to the collection, but the
  2615. * complete collection is never requested.
  2616. * @return void
  2617. */
  2618. public function initKataoMemberDeposits()
  2619. {
  2620. if ($this->collKataoMemberDeposits === null) {
  2621. $this->collKataoMemberDeposits = array();
  2622. }
  2623. }
  2624. /**
  2625. * If this collection has already been initialized with
  2626. * an identical criteria, it returns the collection.
  2627. * Otherwise if this KataoMember has previously
  2628. * been saved, it will retrieve related KataoMemberDeposits from storage.
  2629. * If this KataoMember is new, it will return
  2630. * an empty collection or the current collection, the criteria
  2631. * is ignored on a new object.
  2632. *
  2633. * @param Connection $con
  2634. * @param Criteria $criteria
  2635. * @throws PropelException
  2636. */
  2637. public function getKataoMemberDeposits($criteria = null, $con = null)
  2638. {
  2639. // include the Peer class
  2640. if ($criteria === null) {
  2641. $criteria = new Criteria();
  2642. }
  2643. elseif ($criteria instanceof Criteria)
  2644. {
  2645. $criteria = clone $criteria;
  2646. }
  2647. if ($this->collKataoMemberDeposits === null) {
  2648. if ($this->isNew()) {
  2649. $this->collKataoMemberDeposits = array();
  2650. } else {
  2651. $criteria->add(KataoMemberDepositPeer::KATAO_MEMBER_ID, $this->getId());
  2652. KataoMemberDepositPeer::addSelectColumns($criteria);
  2653. $this->collKataoMemberDeposits = KataoMemberDepositPeer::doSelect($criteria, $con);
  2654. }
  2655. } else {
  2656. // criteria has no effect for a new object
  2657. if (!$this->isNew()) {
  2658. // the following code is to determine if a new query is
  2659. // called for. If the criteria is the same as the last
  2660. // one, just return the collection.
  2661. $criteria->add(KataoMemberDepositPeer::KATAO_MEMBER_ID, $this->getId());
  2662. KataoMemberDepositPeer::addSelectColumns($criteria);
  2663. if (!isset($this->lastKataoMemberDepositCriteria) || !$this->lastKataoMemberDepositCriteria->equals($criteria)) {
  2664. $this->collKataoMemberDeposits = KataoMemberDepositPeer::doSelect($criteria, $con);
  2665. }
  2666. }
  2667. }
  2668. $this->lastKataoMemberDepositCriteria = $criteria;
  2669. return $this->collKataoMemberDeposits;
  2670. }
  2671. /**
  2672. * Returns the number of related KataoMemberDeposits.
  2673. *
  2674. * @param Criteria $criteria
  2675. * @param boolean $distinct
  2676. * @param Connection $con
  2677. * @throws PropelException
  2678. */
  2679. public function countKataoMemberDeposits($criteria = null, $distinct = false, $con = null)
  2680. {
  2681. // include the Peer class
  2682. if ($criteria === null) {
  2683. $criteria = new Criteria();
  2684. }
  2685. elseif ($criteria instanceof Criteria)
  2686. {
  2687. $criteria = clone $criteria;
  2688. }
  2689. $criteria->add(KataoMemberDepositPeer::KATAO_MEMBER_ID, $this->getId());
  2690. return KataoMemberDepositPeer::doCount($criteria, $distinct, $con);
  2691. }
  2692. /**
  2693. * Method called to associate a KataoMemberDeposit object to this object
  2694. * through the KataoMemberDeposit foreign key attribute
  2695. *
  2696. * @param KataoMemberDeposit $l KataoMemberDeposit
  2697. * @return void
  2698. * @throws PropelException
  2699. */
  2700. public function addKataoMemberDeposit(KataoMemberDeposit $l)
  2701. {
  2702. $this->collKataoMemberDeposits[] = $l;
  2703. $l->setKataoMember($this);
  2704. }
  2705. /**
  2706. * Temporary storage of collKataoMemberNodes to save a possible db hit in
  2707. * the event objects are add to the collection, but the
  2708. * complete collection is never requested.
  2709. * @return void
  2710. */
  2711. public function initKataoMemberNodes()
  2712. {
  2713. if ($this->collKataoMemberNodes === null) {
  2714. $this->collKataoMemberNodes = array();
  2715. }
  2716. }
  2717. /**
  2718. * If this collection has already been initialized with
  2719. * an identical criteria, it returns the collection.
  2720. * Otherwise if this KataoMember has previously
  2721. * been saved, it will retrieve related KataoMemberNodes from storage.
  2722. * If this KataoMember is new, it will return
  2723. * an empty collection or the current collection, the criteria
  2724. * is ignored on a new object.
  2725. *
  2726. * @param Connection $con
  2727. * @param Criteria $criteria
  2728. * @throws PropelException
  2729. */
  2730. public function getKataoMemberNodes($criteria = null, $con = null)
  2731. {
  2732. // include the Peer class
  2733. if ($criteria === null) {
  2734. $criteria = new Criteria();
  2735. }
  2736. elseif ($criteria instanceof Criteria)
  2737. {
  2738. $criteria = clone $criteria;
  2739. }
  2740. if ($this->collKataoMemberNodes === null) {
  2741. if ($this->isNew()) {
  2742. $this->collKataoMemberNodes = array();
  2743. } else {
  2744. $criteria->add(KataoMemberNodePeer::KATAO_MEMBER_ID, $this->getId());
  2745. KataoMemberNodePeer::addSelectColumns($criteria);
  2746. $this->collKataoMemberNodes = KataoMemberNodePeer::doSelect($criteria, $con);
  2747. }
  2748. } else {
  2749. // criteria has no effect for a new object
  2750. if (!$this->isNew()) {
  2751. // the following code is to determine if a new query is
  2752. // called for. If the criteria is the same as the last
  2753. // one, just return the collection.
  2754. $criteria->add(KataoMemberNodePeer::KATAO_MEMBER_ID, $this->getId());
  2755. KataoMemberNodePeer::addSelectColumns($criteria);
  2756. if (!isset($this->lastKataoMemberNodeCriteria) || !$this->lastKataoMemberNodeCriteria->equals($criteria)) {
  2757. $this->collKataoMemberNodes = KataoMemberNodePeer::doSelect($criteria, $con);
  2758. }
  2759. }
  2760. }
  2761. $this->lastKataoMemberNodeCriteria = $criteria;
  2762. return $this->collKataoMemberNodes;
  2763. }
  2764. /**
  2765. * Returns the number of related KataoMemberNodes.
  2766. *
  2767. * @param Criteria $criteria
  2768. * @param boolean $distinct
  2769. * @param Connection $con
  2770. * @throws PropelException
  2771. */
  2772. public function countKataoMemberNodes($criteria = null, $distinct = false, $con = null)
  2773. {
  2774. // include the Peer class
  2775. if ($criteria === null) {
  2776. $criteria = new Criteria();
  2777. }
  2778. elseif ($criteria instanceof Criteria)
  2779. {
  2780. $criteria = clone $criteria;
  2781. }
  2782. $criteria->add(KataoMemberNodePeer::KATAO_MEMBER_ID, $this->getId());
  2783. return KataoMemberNodePeer::doCount($criteria, $distinct, $con);
  2784. }
  2785. /**
  2786. * Method called to associate a KataoMemberNode object to this object
  2787. * through the KataoMemberNode foreign key attribute
  2788. *
  2789. * @param KataoMemberNode $l KataoMemberNode
  2790. * @return void
  2791. * @throws PropelException
  2792. */
  2793. public function addKataoMemberNode(KataoMemberNode $l)
  2794. {
  2795. $this->collKataoMemberNodes[] = $l;
  2796. $l->setKataoMember($this);
  2797. }
  2798. /**
  2799. * If this collection has already been initialized with
  2800. * an identical criteria, it returns the collection.
  2801. * Otherwise if this KataoMember is new, it will return
  2802. * an empty collection; or if this KataoMember has previously
  2803. * been saved, it will retrieve related KataoMemberNodes from storage.
  2804. *
  2805. * This method is protected by default in order to keep the public
  2806. * api reasonable. You can provide public methods for those you
  2807. * actually need in KataoMember.
  2808. */
  2809. public function getKataoMemberNodesJoinKataoNode($criteria = null, $con = null)
  2810. {
  2811. // include the Peer class
  2812. if ($criteria === null) {
  2813. $criteria = new Criteria();
  2814. }
  2815. elseif ($criteria instanceof Criteria)
  2816. {
  2817. $criteria = clone $criteria;
  2818. }
  2819. if ($this->collKataoMemberNodes === null) {
  2820. if ($this->isNew()) {
  2821. $this->collKataoMemberNodes = array();
  2822. } else {
  2823. $criteria->add(KataoMemberNodePeer::KATAO_MEMBER_ID, $this->getId());
  2824. $this->collKataoMemberNodes = KataoMemberNodePeer::doSelectJoinKataoNode($criteria, $con);
  2825. }
  2826. } else {
  2827. // the following code is to determine if a new query is
  2828. // called for. If the criteria is the same as the last
  2829. // one, just return the collection.
  2830. $criteria->add(KataoMemberNodePeer::KATAO_MEMBER_ID, $this->getId());
  2831. if (!isset($this->lastKataoMemberNodeCriteria) || !$this->lastKataoMemberNodeCriteria->equals($criteria)) {
  2832. $this->collKataoMemberNodes = KataoMemberNodePeer::doSelectJoinKataoNode($criteria, $con);
  2833. }
  2834. }
  2835. $this->lastKataoMemberNodeCriteria = $criteria;
  2836. return $this->collKataoMemberNodes;
  2837. }
  2838. /**
  2839. * Temporary storage of collKataoAssocMemberGroups to save a possible db hit in
  2840. * the event objects are add to the collection, but the
  2841. * complete collection is never requested.
  2842. * @return void
  2843. */
  2844. public function initKataoAssocMemberGroups()
  2845. {
  2846. if ($this->collKataoAssocMemberGroups === null) {
  2847. $this->collKataoAssocMemberGroups = array();
  2848. }
  2849. }
  2850. /**
  2851. * If this collection has already been initialized with
  2852. * an identical criteria, it returns the collection.
  2853. * Otherwise if this KataoMember has previously
  2854. * been saved, it will retrieve related KataoAssocMemberGroups from storage.
  2855. * If this KataoMember is new, it will return
  2856. * an empty collection or the current collection, the criteria
  2857. * is ignored on a new object.
  2858. *
  2859. * @param Connection $con
  2860. * @param Criteria $criteria
  2861. * @throws PropelException
  2862. */
  2863. public function getKataoAssocMemberGroups($criteria = null, $con = null)
  2864. {
  2865. // include the Peer class
  2866. if ($criteria === null) {
  2867. $criteria = new Criteria();
  2868. }
  2869. elseif ($criteria instanceof Criteria)
  2870. {
  2871. $criteria = clone $criteria;
  2872. }
  2873. if ($this->collKataoAssocMemberGroups === null) {
  2874. if ($this->isNew()) {
  2875. $this->collKataoAssocMemberGroups = array();
  2876. } else {
  2877. $criteria->add(KataoAssocMemberGroupPeer::MEMBER_ID, $this->getId());
  2878. KataoAssocMemberGroupPeer::addSelectColumns($criteria);
  2879. $this->collKataoAssocMemberGroups = KataoAssocMemberGroupPeer::doSelect($criteria, $con);
  2880. }
  2881. } else {
  2882. // criteria has no effect for a new object
  2883. if (!$this->isNew()) {
  2884. // the following code is to determine if a new query is
  2885. // called for. If the criteria is the same as the last
  2886. // one, just return the collection.
  2887. $criteria->add(KataoAssocMemberGroupPeer::MEMBER_ID, $this->getId());
  2888. KataoAssocMemberGroupPeer::addSelectColumns($criteria);
  2889. if (!isset($this->lastKataoAssocMemberGroupCriteria) || !$this->lastKataoAssocMemberGroupCriteria->equals($criteria)) {
  2890. $this->collKataoAssocMemberGroups = KataoAssocMemberGroupPeer::doSelect($criteria, $con);
  2891. }
  2892. }
  2893. }
  2894. $this->lastKataoAssocMemberGroupCriteria = $criteria;
  2895. return $this->collKataoAssocMemberGroups;
  2896. }
  2897. /**
  2898. * Returns the number of related KataoAssocMemberGroups.
  2899. *
  2900. * @param Criteria $criteria
  2901. * @param boolean $distinct
  2902. * @param Connection $con
  2903. * @throws PropelException
  2904. */
  2905. public function countKataoAssocMemberGroups($criteria = null, $distinct = false, $con = null)
  2906. {
  2907. // include the Peer class
  2908. if ($criteria === null) {
  2909. $criteria = new Criteria();
  2910. }
  2911. elseif ($criteria instanceof Criteria)
  2912. {
  2913. $criteria = clone $criteria;
  2914. }
  2915. $criteria->add(KataoAssocMemberGroupPeer::MEMBER_ID, $this->getId());
  2916. return KataoAssocMemberGroupPeer::doCount($criteria, $distinct, $con);
  2917. }
  2918. /**
  2919. * Method called to associate a KataoAssocMemberGroup object to this object
  2920. * through the KataoAssocMemberGroup foreign key attribute
  2921. *
  2922. * @param KataoAssocMemberGroup $l KataoAssocMemberGroup
  2923. * @return void
  2924. * @throws PropelException
  2925. */
  2926. public function addKataoAssocMemberGroup(KataoAssocMemberGroup $l)
  2927. {
  2928. $this->collKataoAssocMemberGroups[] = $l;
  2929. $l->setKataoMember($this);
  2930. }
  2931. /**
  2932. * If this collection has already been initialized with
  2933. * an identical criteria, it returns the collection.
  2934. * Otherwise if this KataoMember is new, it will return
  2935. * an empty collection; or if this KataoMember has previously
  2936. * been saved, it will retrieve related KataoAssocMemberGroups from storage.
  2937. *
  2938. * This method is protected by default in order to keep the public
  2939. * api reasonable. You can provide public methods for those you
  2940. * actually need in KataoMember.
  2941. */
  2942. public function getKataoAssocMemberGroupsJoinKataoMemberGroup($criteria = null, $con = null)
  2943. {
  2944. // include the Peer class
  2945. if ($criteria === null) {
  2946. $criteria = new Criteria();
  2947. }
  2948. elseif ($criteria instanceof Criteria)
  2949. {
  2950. $criteria = clone $criteria;
  2951. }
  2952. if ($this->collKataoAssocMemberGroups === null) {
  2953. if ($this->isNew()) {
  2954. $this->collKataoAssocMemberGroups = array();
  2955. } else {
  2956. $criteria->add(KataoAssocMemberGroupPeer::MEMBER_ID, $this->getId());
  2957. $this->collKataoAssocMemberGroups = KataoAssocMemberGroupPeer::doSelectJoinKataoMemberGroup($criteria, $con);
  2958. }
  2959. } else {
  2960. // the following code is to determine if a new query is
  2961. // called for. If the criteria is the same as the last
  2962. // one, just return the collection.
  2963. $criteria->add(KataoAssocMemberGroupPeer::MEMBER_ID, $this->getId());
  2964. if (!isset($this->lastKataoAssocMemberGroupCriteria) || !$this->lastKataoAssocMemberGroupCriteria->equals($criteria)) {
  2965. $this->collKataoAssocMemberGroups = KataoAssocMemberGroupPeer::doSelectJoinKataoMemberGroup($criteria, $con);
  2966. }
  2967. }
  2968. $this->lastKataoAssocMemberGroupCriteria = $criteria;
  2969. return $this->collKataoAssocMemberGroups;
  2970. }
  2971. public function __call($method, $arguments)
  2972. {
  2973. if (!$callable = sfMixer::getCallable('BaseKataoMember:'.$method))
  2974. {
  2975. throw new sfException(sprintf('Call to undefined method BaseKataoMember::%s', $method));
  2976. }
  2977. array_unshift($arguments, $this);
  2978. return call_user_func_array($callable, $arguments);
  2979. }
  2980. } // BaseKataoMember