PageRenderTime 54ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 1ms

/package/app/app/alpha/lib/model/om/BasePartner.php

https://bitbucket.org/pandaos/kaltura
PHP | 3481 lines | 1856 code | 469 blank | 1156 comment | 350 complexity | e4ee6eb1ede6c91f64fa76835d27570f MD5 | raw file
Possible License(s): AGPL-3.0, GPL-3.0, BSD-3-Clause, LGPL-2.1, GPL-2.0, LGPL-3.0, JSON, MPL-2.0-no-copyleft-exception, Apache-2.0

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /**
  3. * Base class that represents a row from the 'partner' table.
  4. *
  5. *
  6. *
  7. * @package Core
  8. * @subpackage model.om
  9. */
  10. abstract class BasePartner extends BaseObject implements Persistent {
  11. /**
  12. * The Peer class.
  13. * Instance provides a convenient way of calling static methods on a class
  14. * that calling code may not be able to identify.
  15. * @var PartnerPeer
  16. */
  17. protected static $peer;
  18. /**
  19. * The value for the id field.
  20. * @var int
  21. */
  22. protected $id;
  23. /**
  24. * The value for the partner_name field.
  25. * @var string
  26. */
  27. protected $partner_name;
  28. /**
  29. * The value for the partner_alias field.
  30. * @var string
  31. */
  32. protected $partner_alias;
  33. /**
  34. * The value for the url1 field.
  35. * @var string
  36. */
  37. protected $url1;
  38. /**
  39. * The value for the url2 field.
  40. * @var string
  41. */
  42. protected $url2;
  43. /**
  44. * The value for the secret field.
  45. * @var string
  46. */
  47. protected $secret;
  48. /**
  49. * The value for the admin_secret field.
  50. * @var string
  51. */
  52. protected $admin_secret;
  53. /**
  54. * The value for the max_number_of_hits_per_day field.
  55. * Note: this column has a database default value of: -1
  56. * @var int
  57. */
  58. protected $max_number_of_hits_per_day;
  59. /**
  60. * The value for the appear_in_search field.
  61. * Note: this column has a database default value of: 2
  62. * @var int
  63. */
  64. protected $appear_in_search;
  65. /**
  66. * The value for the debug_level field.
  67. * Note: this column has a database default value of: 0
  68. * @var int
  69. */
  70. protected $debug_level;
  71. /**
  72. * The value for the invalid_login_count field.
  73. * Note: this column has a database default value of: 0
  74. * @var int
  75. */
  76. protected $invalid_login_count;
  77. /**
  78. * The value for the created_at field.
  79. * @var string
  80. */
  81. protected $created_at;
  82. /**
  83. * The value for the updated_at field.
  84. * @var string
  85. */
  86. protected $updated_at;
  87. /**
  88. * The value for the anonymous_kuser_id field.
  89. * @var int
  90. */
  91. protected $anonymous_kuser_id;
  92. /**
  93. * The value for the ks_max_expiry_in_seconds field.
  94. * Note: this column has a database default value of: 86400
  95. * @var int
  96. */
  97. protected $ks_max_expiry_in_seconds;
  98. /**
  99. * The value for the create_user_on_demand field.
  100. * Note: this column has a database default value of: 1
  101. * @var int
  102. */
  103. protected $create_user_on_demand;
  104. /**
  105. * The value for the prefix field.
  106. * @var string
  107. */
  108. protected $prefix;
  109. /**
  110. * The value for the admin_name field.
  111. * @var string
  112. */
  113. protected $admin_name;
  114. /**
  115. * The value for the admin_email field.
  116. * @var string
  117. */
  118. protected $admin_email;
  119. /**
  120. * The value for the description field.
  121. * @var string
  122. */
  123. protected $description;
  124. /**
  125. * The value for the commercial_use field.
  126. * Note: this column has a database default value of: 0
  127. * @var int
  128. */
  129. protected $commercial_use;
  130. /**
  131. * The value for the moderate_content field.
  132. * Note: this column has a database default value of: 0
  133. * @var int
  134. */
  135. protected $moderate_content;
  136. /**
  137. * The value for the notify field.
  138. * Note: this column has a database default value of: 0
  139. * @var int
  140. */
  141. protected $notify;
  142. /**
  143. * The value for the custom_data field.
  144. * @var string
  145. */
  146. protected $custom_data;
  147. /**
  148. * The value for the service_config_id field.
  149. * @var string
  150. */
  151. protected $service_config_id;
  152. /**
  153. * The value for the status field.
  154. * Note: this column has a database default value of: 1
  155. * @var int
  156. */
  157. protected $status;
  158. /**
  159. * The value for the content_categories field.
  160. * @var string
  161. */
  162. protected $content_categories;
  163. /**
  164. * The value for the type field.
  165. * Note: this column has a database default value of: 1
  166. * @var int
  167. */
  168. protected $type;
  169. /**
  170. * The value for the phone field.
  171. * @var string
  172. */
  173. protected $phone;
  174. /**
  175. * The value for the describe_yourself field.
  176. * @var string
  177. */
  178. protected $describe_yourself;
  179. /**
  180. * The value for the adult_content field.
  181. * Note: this column has a database default value of: 0
  182. * @var int
  183. */
  184. protected $adult_content;
  185. /**
  186. * The value for the partner_package field.
  187. * Note: this column has a database default value of: 1
  188. * @var int
  189. */
  190. protected $partner_package;
  191. /**
  192. * The value for the usage_percent field.
  193. * Note: this column has a database default value of: 0
  194. * @var int
  195. */
  196. protected $usage_percent;
  197. /**
  198. * The value for the storage_usage field.
  199. * Note: this column has a database default value of: 0
  200. * @var int
  201. */
  202. protected $storage_usage;
  203. /**
  204. * The value for the eighty_percent_warning field.
  205. * @var int
  206. */
  207. protected $eighty_percent_warning;
  208. /**
  209. * The value for the usage_limit_warning field.
  210. * @var int
  211. */
  212. protected $usage_limit_warning;
  213. /**
  214. * The value for the monitor_usage field.
  215. * Note: this column has a database default value of: 1
  216. * @var int
  217. */
  218. protected $monitor_usage;
  219. /**
  220. * The value for the priority_group_id field.
  221. * @var int
  222. */
  223. protected $priority_group_id;
  224. /**
  225. * The value for the partner_group_type field.
  226. * Note: this column has a database default value of: 1
  227. * @var int
  228. */
  229. protected $partner_group_type;
  230. /**
  231. * The value for the partner_parent_id field.
  232. * @var int
  233. */
  234. protected $partner_parent_id;
  235. /**
  236. * The value for the kmc_version field.
  237. * Note: this column has a database default value of: '1'
  238. * @var string
  239. */
  240. protected $kmc_version;
  241. /**
  242. * @var kuser
  243. */
  244. protected $akuser;
  245. /**
  246. * @var array adminKuser[] Collection to store aggregation of adminKuser objects.
  247. */
  248. protected $colladminKusers;
  249. /**
  250. * @var Criteria The criteria used to select the current contents of colladminKusers.
  251. */
  252. private $lastadminKuserCriteria = null;
  253. /**
  254. * Flag to prevent endless save loop, if this object is referenced
  255. * by another object which falls in this transaction.
  256. * @var boolean
  257. */
  258. protected $alreadyInSave = false;
  259. /**
  260. * Flag to prevent endless validation loop, if this object is referenced
  261. * by another object which falls in this transaction.
  262. * @var boolean
  263. */
  264. protected $alreadyInValidation = false;
  265. /**
  266. * Store columns old values before the changes
  267. * @var array
  268. */
  269. protected $oldColumnsValues = array();
  270. /**
  271. * @return array
  272. */
  273. public function getColumnsOldValues()
  274. {
  275. return $this->oldColumnsValues;
  276. }
  277. /**
  278. * Applies default values to this object.
  279. * This method should be called from the object's constructor (or
  280. * equivalent initialization method).
  281. * @see __construct()
  282. */
  283. public function applyDefaultValues()
  284. {
  285. $this->max_number_of_hits_per_day = -1;
  286. $this->appear_in_search = 2;
  287. $this->debug_level = 0;
  288. $this->invalid_login_count = 0;
  289. $this->ks_max_expiry_in_seconds = 86400;
  290. $this->create_user_on_demand = 1;
  291. $this->commercial_use = 0;
  292. $this->moderate_content = 0;
  293. $this->notify = 0;
  294. $this->status = 1;
  295. $this->type = 1;
  296. $this->adult_content = 0;
  297. $this->partner_package = 1;
  298. $this->usage_percent = 0;
  299. $this->storage_usage = 0;
  300. $this->monitor_usage = 1;
  301. $this->partner_group_type = 1;
  302. $this->kmc_version = '1';
  303. }
  304. /**
  305. * Initializes internal state of BasePartner object.
  306. * @see applyDefaults()
  307. */
  308. public function __construct()
  309. {
  310. parent::__construct();
  311. $this->applyDefaultValues();
  312. }
  313. /**
  314. * Get the [id] column value.
  315. *
  316. * @return int
  317. */
  318. public function getId()
  319. {
  320. return $this->id;
  321. }
  322. /**
  323. * Get the [partner_name] column value.
  324. *
  325. * @return string
  326. */
  327. public function getPartnerName()
  328. {
  329. return $this->partner_name;
  330. }
  331. /**
  332. * Get the [partner_alias] column value.
  333. *
  334. * @return string
  335. */
  336. public function getPartnerAlias()
  337. {
  338. return $this->partner_alias;
  339. }
  340. /**
  341. * Get the [url1] column value.
  342. *
  343. * @return string
  344. */
  345. public function getUrl1()
  346. {
  347. return $this->url1;
  348. }
  349. /**
  350. * Get the [url2] column value.
  351. *
  352. * @return string
  353. */
  354. public function getUrl2()
  355. {
  356. return $this->url2;
  357. }
  358. /**
  359. * Get the [secret] column value.
  360. *
  361. * @return string
  362. */
  363. public function getSecret()
  364. {
  365. return $this->secret;
  366. }
  367. /**
  368. * Get the [admin_secret] column value.
  369. *
  370. * @return string
  371. */
  372. public function getAdminSecret()
  373. {
  374. return $this->admin_secret;
  375. }
  376. /**
  377. * Get the [max_number_of_hits_per_day] column value.
  378. *
  379. * @return int
  380. */
  381. public function getMaxNumberOfHitsPerDay()
  382. {
  383. return $this->max_number_of_hits_per_day;
  384. }
  385. /**
  386. * Get the [appear_in_search] column value.
  387. *
  388. * @return int
  389. */
  390. public function getAppearInSearch()
  391. {
  392. return $this->appear_in_search;
  393. }
  394. /**
  395. * Get the [debug_level] column value.
  396. *
  397. * @return int
  398. */
  399. public function getDebugLevel()
  400. {
  401. return $this->debug_level;
  402. }
  403. /**
  404. * Get the [invalid_login_count] column value.
  405. *
  406. * @return int
  407. */
  408. public function getInvalidLoginCount()
  409. {
  410. return $this->invalid_login_count;
  411. }
  412. /**
  413. * Get the [optionally formatted] temporal [created_at] column value.
  414. *
  415. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  416. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  417. *
  418. * @param string $format The date/time format string (either date()-style or strftime()-style).
  419. * If format is NULL, then the raw unix timestamp integer will be returned.
  420. * @return mixed Formatted date/time value as string or (integer) unix timestamp (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
  421. * @throws PropelException - if unable to parse/validate the date/time value.
  422. */
  423. public function getCreatedAt($format = 'Y-m-d H:i:s')
  424. {
  425. if ($this->created_at === null) {
  426. return null;
  427. }
  428. if ($this->created_at === '0000-00-00 00:00:00') {
  429. // while technically this is not a default value of NULL,
  430. // this seems to be closest in meaning.
  431. return null;
  432. } else {
  433. try {
  434. $dt = new DateTime($this->created_at);
  435. } catch (Exception $x) {
  436. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
  437. }
  438. }
  439. if ($format === null) {
  440. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  441. return (int) $dt->format('U');
  442. } elseif (strpos($format, '%') !== false) {
  443. return strftime($format, $dt->format('U'));
  444. } else {
  445. return $dt->format($format);
  446. }
  447. }
  448. /**
  449. * Get the [optionally formatted] temporal [updated_at] column value.
  450. *
  451. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  452. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  453. *
  454. * @param string $format The date/time format string (either date()-style or strftime()-style).
  455. * If format is NULL, then the raw unix timestamp integer will be returned.
  456. * @return mixed Formatted date/time value as string or (integer) unix timestamp (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00
  457. * @throws PropelException - if unable to parse/validate the date/time value.
  458. */
  459. public function getUpdatedAt($format = 'Y-m-d H:i:s')
  460. {
  461. if ($this->updated_at === null) {
  462. return null;
  463. }
  464. if ($this->updated_at === '0000-00-00 00:00:00') {
  465. // while technically this is not a default value of NULL,
  466. // this seems to be closest in meaning.
  467. return null;
  468. } else {
  469. try {
  470. $dt = new DateTime($this->updated_at);
  471. } catch (Exception $x) {
  472. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
  473. }
  474. }
  475. if ($format === null) {
  476. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  477. return (int) $dt->format('U');
  478. } elseif (strpos($format, '%') !== false) {
  479. return strftime($format, $dt->format('U'));
  480. } else {
  481. return $dt->format($format);
  482. }
  483. }
  484. /**
  485. * Get the [anonymous_kuser_id] column value.
  486. *
  487. * @return int
  488. */
  489. public function getAnonymousKuserId()
  490. {
  491. return $this->anonymous_kuser_id;
  492. }
  493. /**
  494. * Get the [ks_max_expiry_in_seconds] column value.
  495. *
  496. * @return int
  497. */
  498. public function getKsMaxExpiryInSeconds()
  499. {
  500. return $this->ks_max_expiry_in_seconds;
  501. }
  502. /**
  503. * Get the [create_user_on_demand] column value.
  504. *
  505. * @return int
  506. */
  507. public function getCreateUserOnDemand()
  508. {
  509. return $this->create_user_on_demand;
  510. }
  511. /**
  512. * Get the [prefix] column value.
  513. *
  514. * @return string
  515. */
  516. public function getPrefix()
  517. {
  518. return $this->prefix;
  519. }
  520. /**
  521. * Get the [admin_name] column value.
  522. *
  523. * @return string
  524. */
  525. public function getAdminName()
  526. {
  527. return $this->admin_name;
  528. }
  529. /**
  530. * Get the [admin_email] column value.
  531. *
  532. * @return string
  533. */
  534. public function getAdminEmail()
  535. {
  536. return $this->admin_email;
  537. }
  538. /**
  539. * Get the [description] column value.
  540. *
  541. * @return string
  542. */
  543. public function getDescription()
  544. {
  545. return $this->description;
  546. }
  547. /**
  548. * Get the [commercial_use] column value.
  549. *
  550. * @return int
  551. */
  552. public function getCommercialUse()
  553. {
  554. return $this->commercial_use;
  555. }
  556. /**
  557. * Get the [moderate_content] column value.
  558. *
  559. * @return int
  560. */
  561. public function getModerateContent()
  562. {
  563. return $this->moderate_content;
  564. }
  565. /**
  566. * Get the [notify] column value.
  567. *
  568. * @return int
  569. */
  570. public function getNotify()
  571. {
  572. return $this->notify;
  573. }
  574. /**
  575. * Get the [custom_data] column value.
  576. *
  577. * @return string
  578. */
  579. public function getCustomData()
  580. {
  581. return $this->custom_data;
  582. }
  583. /**
  584. * Get the [service_config_id] column value.
  585. *
  586. * @return string
  587. */
  588. public function getServiceConfigId()
  589. {
  590. return $this->service_config_id;
  591. }
  592. /**
  593. * Get the [status] column value.
  594. *
  595. * @return int
  596. */
  597. public function getStatus()
  598. {
  599. return $this->status;
  600. }
  601. /**
  602. * Get the [content_categories] column value.
  603. *
  604. * @return string
  605. */
  606. public function getContentCategories()
  607. {
  608. return $this->content_categories;
  609. }
  610. /**
  611. * Get the [type] column value.
  612. *
  613. * @return int
  614. */
  615. public function getType()
  616. {
  617. return $this->type;
  618. }
  619. /**
  620. * Get the [phone] column value.
  621. *
  622. * @return string
  623. */
  624. public function getPhone()
  625. {
  626. return $this->phone;
  627. }
  628. /**
  629. * Get the [describe_yourself] column value.
  630. *
  631. * @return string
  632. */
  633. public function getDescribeYourself()
  634. {
  635. return $this->describe_yourself;
  636. }
  637. /**
  638. * Get the [adult_content] column value.
  639. *
  640. * @return int
  641. */
  642. public function getAdultContent()
  643. {
  644. return $this->adult_content;
  645. }
  646. /**
  647. * Get the [partner_package] column value.
  648. *
  649. * @return int
  650. */
  651. public function getPartnerPackage()
  652. {
  653. return $this->partner_package;
  654. }
  655. /**
  656. * Get the [usage_percent] column value.
  657. *
  658. * @return int
  659. */
  660. public function getUsagePercent()
  661. {
  662. return $this->usage_percent;
  663. }
  664. /**
  665. * Get the [storage_usage] column value.
  666. *
  667. * @return int
  668. */
  669. public function getStorageUsage()
  670. {
  671. return $this->storage_usage;
  672. }
  673. /**
  674. * Get the [eighty_percent_warning] column value.
  675. *
  676. * @return int
  677. */
  678. public function getEightyPercentWarning()
  679. {
  680. return $this->eighty_percent_warning;
  681. }
  682. /**
  683. * Get the [usage_limit_warning] column value.
  684. *
  685. * @return int
  686. */
  687. public function getUsageLimitWarning()
  688. {
  689. return $this->usage_limit_warning;
  690. }
  691. /**
  692. * Get the [monitor_usage] column value.
  693. *
  694. * @return int
  695. */
  696. public function getMonitorUsage()
  697. {
  698. return $this->monitor_usage;
  699. }
  700. /**
  701. * Get the [priority_group_id] column value.
  702. *
  703. * @return int
  704. */
  705. public function getPriorityGroupId()
  706. {
  707. return $this->priority_group_id;
  708. }
  709. /**
  710. * Get the [partner_group_type] column value.
  711. *
  712. * @return int
  713. */
  714. public function getPartnerGroupType()
  715. {
  716. return $this->partner_group_type;
  717. }
  718. /**
  719. * Get the [partner_parent_id] column value.
  720. *
  721. * @return int
  722. */
  723. public function getPartnerParentId()
  724. {
  725. return $this->partner_parent_id;
  726. }
  727. /**
  728. * Get the [kmc_version] column value.
  729. *
  730. * @return string
  731. */
  732. public function getKmcVersion()
  733. {
  734. return $this->kmc_version;
  735. }
  736. /**
  737. * Set the value of [id] column.
  738. *
  739. * @param int $v new value
  740. * @return Partner The current object (for fluent API support)
  741. */
  742. public function setId($v)
  743. {
  744. if(!isset($this->oldColumnsValues[PartnerPeer::ID]))
  745. $this->oldColumnsValues[PartnerPeer::ID] = $this->id;
  746. if ($v !== null) {
  747. $v = (int) $v;
  748. }
  749. if ($this->id !== $v) {
  750. $this->id = $v;
  751. $this->modifiedColumns[] = PartnerPeer::ID;
  752. }
  753. return $this;
  754. } // setId()
  755. /**
  756. * Set the value of [partner_name] column.
  757. *
  758. * @param string $v new value
  759. * @return Partner The current object (for fluent API support)
  760. */
  761. public function setPartnerName($v)
  762. {
  763. if(!isset($this->oldColumnsValues[PartnerPeer::PARTNER_NAME]))
  764. $this->oldColumnsValues[PartnerPeer::PARTNER_NAME] = $this->partner_name;
  765. if ($v !== null) {
  766. $v = (string) $v;
  767. }
  768. if ($this->partner_name !== $v) {
  769. $this->partner_name = $v;
  770. $this->modifiedColumns[] = PartnerPeer::PARTNER_NAME;
  771. }
  772. return $this;
  773. } // setPartnerName()
  774. /**
  775. * Set the value of [partner_alias] column.
  776. *
  777. * @param string $v new value
  778. * @return Partner The current object (for fluent API support)
  779. */
  780. public function setPartnerAlias($v)
  781. {
  782. if(!isset($this->oldColumnsValues[PartnerPeer::PARTNER_ALIAS]))
  783. $this->oldColumnsValues[PartnerPeer::PARTNER_ALIAS] = $this->partner_alias;
  784. if ($v !== null) {
  785. $v = (string) $v;
  786. }
  787. if ($this->partner_alias !== $v) {
  788. $this->partner_alias = $v;
  789. $this->modifiedColumns[] = PartnerPeer::PARTNER_ALIAS;
  790. }
  791. return $this;
  792. } // setPartnerAlias()
  793. /**
  794. * Set the value of [url1] column.
  795. *
  796. * @param string $v new value
  797. * @return Partner The current object (for fluent API support)
  798. */
  799. public function setUrl1($v)
  800. {
  801. if(!isset($this->oldColumnsValues[PartnerPeer::URL1]))
  802. $this->oldColumnsValues[PartnerPeer::URL1] = $this->url1;
  803. if ($v !== null) {
  804. $v = (string) $v;
  805. }
  806. if ($this->url1 !== $v) {
  807. $this->url1 = $v;
  808. $this->modifiedColumns[] = PartnerPeer::URL1;
  809. }
  810. return $this;
  811. } // setUrl1()
  812. /**
  813. * Set the value of [url2] column.
  814. *
  815. * @param string $v new value
  816. * @return Partner The current object (for fluent API support)
  817. */
  818. public function setUrl2($v)
  819. {
  820. if(!isset($this->oldColumnsValues[PartnerPeer::URL2]))
  821. $this->oldColumnsValues[PartnerPeer::URL2] = $this->url2;
  822. if ($v !== null) {
  823. $v = (string) $v;
  824. }
  825. if ($this->url2 !== $v) {
  826. $this->url2 = $v;
  827. $this->modifiedColumns[] = PartnerPeer::URL2;
  828. }
  829. return $this;
  830. } // setUrl2()
  831. /**
  832. * Set the value of [secret] column.
  833. *
  834. * @param string $v new value
  835. * @return Partner The current object (for fluent API support)
  836. */
  837. public function setSecret($v)
  838. {
  839. if(!isset($this->oldColumnsValues[PartnerPeer::SECRET]))
  840. $this->oldColumnsValues[PartnerPeer::SECRET] = $this->secret;
  841. if ($v !== null) {
  842. $v = (string) $v;
  843. }
  844. if ($this->secret !== $v) {
  845. $this->secret = $v;
  846. $this->modifiedColumns[] = PartnerPeer::SECRET;
  847. }
  848. return $this;
  849. } // setSecret()
  850. /**
  851. * Set the value of [admin_secret] column.
  852. *
  853. * @param string $v new value
  854. * @return Partner The current object (for fluent API support)
  855. */
  856. public function setAdminSecret($v)
  857. {
  858. if(!isset($this->oldColumnsValues[PartnerPeer::ADMIN_SECRET]))
  859. $this->oldColumnsValues[PartnerPeer::ADMIN_SECRET] = $this->admin_secret;
  860. if ($v !== null) {
  861. $v = (string) $v;
  862. }
  863. if ($this->admin_secret !== $v) {
  864. $this->admin_secret = $v;
  865. $this->modifiedColumns[] = PartnerPeer::ADMIN_SECRET;
  866. }
  867. return $this;
  868. } // setAdminSecret()
  869. /**
  870. * Set the value of [max_number_of_hits_per_day] column.
  871. *
  872. * @param int $v new value
  873. * @return Partner The current object (for fluent API support)
  874. */
  875. public function setMaxNumberOfHitsPerDay($v)
  876. {
  877. if(!isset($this->oldColumnsValues[PartnerPeer::MAX_NUMBER_OF_HITS_PER_DAY]))
  878. $this->oldColumnsValues[PartnerPeer::MAX_NUMBER_OF_HITS_PER_DAY] = $this->max_number_of_hits_per_day;
  879. if ($v !== null) {
  880. $v = (int) $v;
  881. }
  882. if ($this->max_number_of_hits_per_day !== $v || $this->isNew()) {
  883. $this->max_number_of_hits_per_day = $v;
  884. $this->modifiedColumns[] = PartnerPeer::MAX_NUMBER_OF_HITS_PER_DAY;
  885. }
  886. return $this;
  887. } // setMaxNumberOfHitsPerDay()
  888. /**
  889. * Set the value of [appear_in_search] column.
  890. *
  891. * @param int $v new value
  892. * @return Partner The current object (for fluent API support)
  893. */
  894. public function setAppearInSearch($v)
  895. {
  896. if(!isset($this->oldColumnsValues[PartnerPeer::APPEAR_IN_SEARCH]))
  897. $this->oldColumnsValues[PartnerPeer::APPEAR_IN_SEARCH] = $this->appear_in_search;
  898. if ($v !== null) {
  899. $v = (int) $v;
  900. }
  901. if ($this->appear_in_search !== $v || $this->isNew()) {
  902. $this->appear_in_search = $v;
  903. $this->modifiedColumns[] = PartnerPeer::APPEAR_IN_SEARCH;
  904. }
  905. return $this;
  906. } // setAppearInSearch()
  907. /**
  908. * Set the value of [debug_level] column.
  909. *
  910. * @param int $v new value
  911. * @return Partner The current object (for fluent API support)
  912. */
  913. public function setDebugLevel($v)
  914. {
  915. if(!isset($this->oldColumnsValues[PartnerPeer::DEBUG_LEVEL]))
  916. $this->oldColumnsValues[PartnerPeer::DEBUG_LEVEL] = $this->debug_level;
  917. if ($v !== null) {
  918. $v = (int) $v;
  919. }
  920. if ($this->debug_level !== $v || $this->isNew()) {
  921. $this->debug_level = $v;
  922. $this->modifiedColumns[] = PartnerPeer::DEBUG_LEVEL;
  923. }
  924. return $this;
  925. } // setDebugLevel()
  926. /**
  927. * Set the value of [invalid_login_count] column.
  928. *
  929. * @param int $v new value
  930. * @return Partner The current object (for fluent API support)
  931. */
  932. public function setInvalidLoginCount($v)
  933. {
  934. if(!isset($this->oldColumnsValues[PartnerPeer::INVALID_LOGIN_COUNT]))
  935. $this->oldColumnsValues[PartnerPeer::INVALID_LOGIN_COUNT] = $this->invalid_login_count;
  936. if ($v !== null) {
  937. $v = (int) $v;
  938. }
  939. if ($this->invalid_login_count !== $v || $this->isNew()) {
  940. $this->invalid_login_count = $v;
  941. $this->modifiedColumns[] = PartnerPeer::INVALID_LOGIN_COUNT;
  942. }
  943. return $this;
  944. } // setInvalidLoginCount()
  945. /**
  946. * Sets the value of [created_at] column to a normalized version of the date/time value specified.
  947. *
  948. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  949. * be treated as NULL for temporal objects.
  950. * @return Partner The current object (for fluent API support)
  951. */
  952. public function setCreatedAt($v)
  953. {
  954. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  955. // -- which is unexpected, to say the least.
  956. if ($v === null || $v === '') {
  957. $dt = null;
  958. } elseif ($v instanceof DateTime) {
  959. $dt = $v;
  960. } else {
  961. // some string/numeric value passed; we normalize that so that we can
  962. // validate it.
  963. try {
  964. if (is_numeric($v)) { // if it's a unix timestamp
  965. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  966. // We have to explicitly specify and then change the time zone because of a
  967. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  968. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  969. } else {
  970. $dt = new DateTime($v);
  971. }
  972. } catch (Exception $x) {
  973. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  974. }
  975. }
  976. if ( $this->created_at !== null || $dt !== null ) {
  977. // (nested ifs are a little easier to read in this case)
  978. $currNorm = ($this->created_at !== null && $tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;
  979. $newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;
  980. if ( ($currNorm !== $newNorm) // normalized values don't match
  981. )
  982. {
  983. $this->created_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);
  984. $this->modifiedColumns[] = PartnerPeer::CREATED_AT;
  985. }
  986. } // if either are not null
  987. return $this;
  988. } // setCreatedAt()
  989. /**
  990. * Sets the value of [updated_at] column to a normalized version of the date/time value specified.
  991. *
  992. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  993. * be treated as NULL for temporal objects.
  994. * @return Partner The current object (for fluent API support)
  995. */
  996. public function setUpdatedAt($v)
  997. {
  998. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  999. // -- which is unexpected, to say the least.
  1000. if ($v === null || $v === '') {
  1001. $dt = null;
  1002. } elseif ($v instanceof DateTime) {
  1003. $dt = $v;
  1004. } else {
  1005. // some string/numeric value passed; we normalize that so that we can
  1006. // validate it.
  1007. try {
  1008. if (is_numeric($v)) { // if it's a unix timestamp
  1009. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  1010. // We have to explicitly specify and then change the time zone because of a
  1011. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  1012. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  1013. } else {
  1014. $dt = new DateTime($v);
  1015. }
  1016. } catch (Exception $x) {
  1017. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  1018. }
  1019. }
  1020. if ( $this->updated_at !== null || $dt !== null ) {
  1021. // (nested ifs are a little easier to read in this case)
  1022. $currNorm = ($this->updated_at !== null && $tmpDt = new DateTime($this->updated_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;
  1023. $newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;
  1024. if ( ($currNorm !== $newNorm) // normalized values don't match
  1025. )
  1026. {
  1027. $this->updated_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);
  1028. $this->modifiedColumns[] = PartnerPeer::UPDATED_AT;
  1029. }
  1030. } // if either are not null
  1031. return $this;
  1032. } // setUpdatedAt()
  1033. /**
  1034. * Set the value of [anonymous_kuser_id] column.
  1035. *
  1036. * @param int $v new value
  1037. * @return Partner The current object (for fluent API support)
  1038. */
  1039. public function setAnonymousKuserId($v)
  1040. {
  1041. if(!isset($this->oldColumnsValues[PartnerPeer::ANONYMOUS_KUSER_ID]))
  1042. $this->oldColumnsValues[PartnerPeer::ANONYMOUS_KUSER_ID] = $this->anonymous_kuser_id;
  1043. if ($v !== null) {
  1044. $v = (int) $v;
  1045. }
  1046. if ($this->anonymous_kuser_id !== $v) {
  1047. $this->anonymous_kuser_id = $v;
  1048. $this->modifiedColumns[] = PartnerPeer::ANONYMOUS_KUSER_ID;
  1049. }
  1050. if ($this->akuser !== null && $this->akuser->getId() !== $v) {
  1051. $this->akuser = null;
  1052. }
  1053. return $this;
  1054. } // setAnonymousKuserId()
  1055. /**
  1056. * Set the value of [ks_max_expiry_in_seconds] column.
  1057. *
  1058. * @param int $v new value
  1059. * @return Partner The current object (for fluent API support)
  1060. */
  1061. public function setKsMaxExpiryInSeconds($v)
  1062. {
  1063. if(!isset($this->oldColumnsValues[PartnerPeer::KS_MAX_EXPIRY_IN_SECONDS]))
  1064. $this->oldColumnsValues[PartnerPeer::KS_MAX_EXPIRY_IN_SECONDS] = $this->ks_max_expiry_in_seconds;
  1065. if ($v !== null) {
  1066. $v = (int) $v;
  1067. }
  1068. if ($this->ks_max_expiry_in_seconds !== $v || $this->isNew()) {
  1069. $this->ks_max_expiry_in_seconds = $v;
  1070. $this->modifiedColumns[] = PartnerPeer::KS_MAX_EXPIRY_IN_SECONDS;
  1071. }
  1072. return $this;
  1073. } // setKsMaxExpiryInSeconds()
  1074. /**
  1075. * Set the value of [create_user_on_demand] column.
  1076. *
  1077. * @param int $v new value
  1078. * @return Partner The current object (for fluent API support)
  1079. */
  1080. public function setCreateUserOnDemand($v)
  1081. {
  1082. if(!isset($this->oldColumnsValues[PartnerPeer::CREATE_USER_ON_DEMAND]))
  1083. $this->oldColumnsValues[PartnerPeer::CREATE_USER_ON_DEMAND] = $this->create_user_on_demand;
  1084. if ($v !== null) {
  1085. $v = (int) $v;
  1086. }
  1087. if ($this->create_user_on_demand !== $v || $this->isNew()) {
  1088. $this->create_user_on_demand = $v;
  1089. $this->modifiedColumns[] = PartnerPeer::CREATE_USER_ON_DEMAND;
  1090. }
  1091. return $this;
  1092. } // setCreateUserOnDemand()
  1093. /**
  1094. * Set the value of [prefix] column.
  1095. *
  1096. * @param string $v new value
  1097. * @return Partner The current object (for fluent API support)
  1098. */
  1099. public function setPrefix($v)
  1100. {
  1101. if(!isset($this->oldColumnsValues[PartnerPeer::PREFIX]))
  1102. $this->oldColumnsValues[PartnerPeer::PREFIX] = $this->prefix;
  1103. if ($v !== null) {
  1104. $v = (string) $v;
  1105. }
  1106. if ($this->prefix !== $v) {
  1107. $this->prefix = $v;
  1108. $this->modifiedColumns[] = PartnerPeer::PREFIX;
  1109. }
  1110. return $this;
  1111. } // setPrefix()
  1112. /**
  1113. * Set the value of [admin_name] column.
  1114. *
  1115. * @param string $v new value
  1116. * @return Partner The current object (for fluent API support)
  1117. */
  1118. public function setAdminName($v)
  1119. {
  1120. if(!isset($this->oldColumnsValues[PartnerPeer::ADMIN_NAME]))
  1121. $this->oldColumnsValues[PartnerPeer::ADMIN_NAME] = $this->admin_name;
  1122. if ($v !== null) {
  1123. $v = (string) $v;
  1124. }
  1125. if ($this->admin_name !== $v) {
  1126. $this->admin_name = $v;
  1127. $this->modifiedColumns[] = PartnerPeer::ADMIN_NAME;
  1128. }
  1129. return $this;
  1130. } // setAdminName()
  1131. /**
  1132. * Set the value of [admin_email] column.
  1133. *
  1134. * @param string $v new value
  1135. * @return Partner The current object (for fluent API support)
  1136. */
  1137. public function setAdminEmail($v)
  1138. {
  1139. if(!isset($this->oldColumnsValues[PartnerPeer::ADMIN_EMAIL]))
  1140. $this->oldColumnsValues[PartnerPeer::ADMIN_EMAIL] = $this->admin_email;
  1141. if ($v !== null) {
  1142. $v = (string) $v;
  1143. }
  1144. if ($this->admin_email !== $v) {
  1145. $this->admin_email = $v;
  1146. $this->modifiedColumns[] = PartnerPeer::ADMIN_EMAIL;
  1147. }
  1148. return $this;
  1149. } // setAdminEmail()
  1150. /**
  1151. * Set the value of [description] column.
  1152. *
  1153. * @param string $v new value
  1154. * @return Partner The current object (for fluent API support)
  1155. */
  1156. public function setDescription($v)
  1157. {
  1158. if(!isset($this->oldColumnsValues[PartnerPeer::DESCRIPTION]))
  1159. $this->oldColumnsValues[PartnerPeer::DESCRIPTION] = $this->description;
  1160. if ($v !== null) {
  1161. $v = (string) $v;
  1162. }
  1163. if ($this->description !== $v) {
  1164. $this->description = $v;
  1165. $this->modifiedColumns[] = PartnerPeer::DESCRIPTION;
  1166. }
  1167. return $this;
  1168. } // setDescription()
  1169. /**
  1170. * Set the value of [commercial_use] column.
  1171. *
  1172. * @param int $v new value
  1173. * @return Partner The current object (for fluent API support)
  1174. */
  1175. public function setCommercialUse($v)
  1176. {
  1177. if(!isset($this->oldColumnsValues[PartnerPeer::COMMERCIAL_USE]))
  1178. $this->oldColumnsValues[PartnerPeer::COMMERCIAL_USE] = $this->commercial_use;
  1179. if ($v !== null) {
  1180. $v = (int) $v;
  1181. }
  1182. if ($this->commercial_use !== $v || $this->isNew()) {
  1183. $this->commercial_use = $v;
  1184. $this->modifiedColumns[] = PartnerPeer::COMMERCIAL_USE;
  1185. }
  1186. return $this;
  1187. } // setCommercialUse()
  1188. /**
  1189. * Set the value of [moderate_content] column.
  1190. *
  1191. * @param int $v new value
  1192. * @return Partner The current object (for fluent API support)
  1193. */
  1194. public function setModerateContent($v)
  1195. {
  1196. if(!isset($this->oldColumnsValues[PartnerPeer::MODERATE_CONTENT]))
  1197. $this->oldColumnsValues[PartnerPeer::MODERATE_CONTENT] = $this->moderate_content;
  1198. if ($v !== null) {
  1199. $v = (int) $v;
  1200. }
  1201. if ($this->moderate_content !== $v || $this->isNew()) {
  1202. $this->moderate_content = $v;
  1203. $this->modifiedColumns[] = PartnerPeer::MODERATE_CONTENT;
  1204. }
  1205. return $this;
  1206. } // setModerateContent()
  1207. /**
  1208. * Set the value of [notify] column.
  1209. *
  1210. * @param int $v new value
  1211. * @return Partner The current object (for fluent API support)
  1212. */
  1213. public function setNotify($v)
  1214. {
  1215. if(!isset($this->oldColumnsValues[PartnerPeer::NOTIFY]))
  1216. $this->oldColumnsValues[PartnerPeer::NOTIFY] = $this->notify;
  1217. if ($v !== null) {
  1218. $v = (int) $v;
  1219. }
  1220. if ($this->notify !== $v || $this->isNew()) {
  1221. $this->notify = $v;
  1222. $this->modifiedColumns[] = PartnerPeer::NOTIFY;
  1223. }
  1224. return $this;
  1225. } // setNotify()
  1226. /**
  1227. * Set the value of [custom_data] column.
  1228. *
  1229. * @param string $v new value
  1230. * @return Partner The current object (for fluent API support)
  1231. */
  1232. public function setCustomData($v)
  1233. {
  1234. if ($v !== null) {
  1235. $v = (string) $v;
  1236. }
  1237. if ($this->custom_data !== $v) {
  1238. $this->custom_data = $v;
  1239. $this->modifiedColumns[] = PartnerPeer::CUSTOM_DATA;
  1240. }
  1241. return $this;
  1242. } // setCustomData()
  1243. /**
  1244. * Set the value of [service_config_id] column.
  1245. *
  1246. * @param string $v new value
  1247. * @return Partner The current object (for fluent API support)
  1248. */
  1249. public function setServiceConfigId($v)
  1250. {
  1251. if(!isset($this->oldColumnsValues[PartnerPeer::SERVICE_CONFIG_ID]))
  1252. $this->oldColumnsValues[PartnerPeer::SERVICE_CONFIG_ID] = $this->service_config_id;
  1253. if ($v !== null) {
  1254. $v = (string) $v;
  1255. }
  1256. if ($this->service_config_id !== $v) {
  1257. $this->service_config_id = $v;
  1258. $this->modifiedColumns[] = PartnerPeer::SERVICE_CONFIG_ID;
  1259. }
  1260. return $this;
  1261. } // setServiceConfigId()
  1262. /**
  1263. * Set the value of [status] column.
  1264. *
  1265. * @param int $v new value
  1266. * @return Partner The current object (for fluent API support)
  1267. */
  1268. public function setStatus($v)
  1269. {
  1270. if(!isset($this->oldColumnsValues[PartnerPeer::STATUS]))
  1271. $this->oldColumnsValues[PartnerPeer::STATUS] = $this->status;
  1272. if ($v !== null) {
  1273. $v = (int) $v;
  1274. }
  1275. if ($this->status !== $v || $this->isNew()) {
  1276. $this->status = $v;
  1277. $this->modifiedColumns[] = PartnerPeer::STATUS;
  1278. }
  1279. return $this;
  1280. } // setStatus()
  1281. /**
  1282. * Set the value of [content_categories] column.
  1283. *
  1284. * @param string $v new value
  1285. * @return Partner The current object (for fluent API support)
  1286. */
  1287. public function setContentCategories($v)
  1288. {
  1289. if(!isset($this->oldColumnsValues[PartnerPeer::CONTENT_CATEGORIES]))
  1290. $this->oldColumnsValues[PartnerPeer::CONTENT_CATEGORIES] = $this->content_categories;
  1291. if ($v !== null) {
  1292. $v = (string) $v;
  1293. }
  1294. if ($this->content_categories !== $v) {
  1295. $this->content_categories = $v;
  1296. $this->modifiedColumns[] = PartnerPeer::CONTENT_CATEGORIES;
  1297. }
  1298. return $this;
  1299. } // setContentCategories()
  1300. /**
  1301. * Set the value of [type] column.
  1302. *
  1303. * @param int $v new value
  1304. * @return Partner The current object (for fluent API support)
  1305. */
  1306. public function setType($v)
  1307. {
  1308. if(!isset($this->oldColumnsValues[PartnerPeer::TYPE]))
  1309. $this->oldColumnsValues[PartnerPeer::TYPE] = $this->type;
  1310. if ($v !== null) {
  1311. $v = (int) $v;
  1312. }
  1313. if ($this->type !== $v || $this->isNew()) {
  1314. $this->type = $v;
  1315. $this->modifiedColumns[] = PartnerPeer::TYPE;
  1316. }
  1317. return $this;
  1318. } // setType()
  1319. /**
  1320. * Set the value of [phone] column.
  1321. *
  1322. * @param string $v new value
  1323. * @return Partner The current object (for fluent API support)
  1324. */
  1325. public function setPhone($v)
  1326. {
  1327. if(!isset($this->oldColumnsValues[PartnerPeer::PHONE]))
  1328. $this->oldColumnsValues[PartnerPeer::PHONE] = $this->phone;
  1329. if ($v !== null) {
  1330. $v = (string) $v;
  1331. }
  1332. if ($this->phone !== $v) {
  1333. $this->phone = $v;
  1334. $this->modifiedColumns[] = PartnerPeer::PHONE;
  1335. }
  1336. return $this;
  1337. } // setPhone()
  1338. /**
  1339. * Set the value of [describe_yourself] column.
  1340. *
  1341. * @param string $v new value
  1342. * @return Partner The current object (for fluent API support)
  1343. */
  1344. public function setDescribeYourself($v)
  1345. {
  1346. if(!isset($this->oldColumnsValues[PartnerPeer::DESCRIBE_YOURSELF]))
  1347. $this->oldColumnsValues[PartnerPeer::DESCRIBE_YOURSELF] = $this->describe_yourself;
  1348. if ($v !== null) {
  1349. $v = (string) $v;
  1350. }
  1351. if ($this->describe_yourself !== $v) {
  1352. $this->describe_yourself = $v;
  1353. $this->modifiedColumns[] = PartnerPeer::DESCRIBE_YOURSELF;
  1354. }
  1355. return $this;
  1356. } // setDescribeYourself()
  1357. /**
  1358. * Set the value of [adult_content] column.
  1359. *
  1360. * @param int $v new value
  1361. * @return Partner The current object (for fluent API support)
  1362. */
  1363. public function setAdultContent($v)
  1364. {
  1365. if(!isset($this->oldColumnsValues[PartnerPeer::ADULT_CONTENT]))
  1366. $this->oldColumnsValues[PartnerPeer::ADULT_CONTENT] = $this->adult_content;
  1367. if ($v !== null) {
  1368. $v = (int) $v;
  1369. }
  1370. if ($this->adult_content !== $v || $this->isNew()) {
  1371. $this->adult_content = $v;
  1372. $this->modifiedColumns[] = PartnerPeer::ADULT_CONTENT;
  1373. }
  1374. return $this;
  1375. } // setAdultContent()
  1376. /**
  1377. * Set the value of [partner_package] column.
  1378. *
  1379. * @param int $v new value
  1380. * @return Partner The current object (for fluent API support)
  1381. */
  1382. public function setPartnerPackage($v)
  1383. {
  1384. if(!isset($this->oldColumnsValues[PartnerPeer::PARTNER_PACKAGE]))
  1385. $this->oldColumnsValues[PartnerPeer::PARTNER_PACKAGE] = $this->partner_package;
  1386. if ($v !== null) {
  1387. $v = (int) $v;
  1388. }
  1389. if ($this->partner_package !== $v || $this->isNew()) {
  1390. $this->partner_package = $v;
  1391. $this->modifiedColumns[] = PartnerPeer::PARTNER_PACKAGE;
  1392. }
  1393. return $this;
  1394. } // setPartnerPackage()
  1395. /**
  1396. * Set the value of [usage_percent] column.
  1397. *
  1398. * @param int $v new value
  1399. * @return Partner The current object (for fluent API support)
  1400. */
  1401. public function setUsagePercent($v)
  1402. {
  1403. if(!isset($this->oldColumnsValues[PartnerPeer::USAGE_PERCENT]))
  1404. $this->oldColumnsValues[PartnerPeer::USAGE_PERCENT] = $this->usage_percent;
  1405. if ($v !== null) {
  1406. $v = (int) $v;
  1407. }
  1408. if ($this->usage_percent !== $v || $this->isNew()) {
  1409. $this->usage_percent = $v;
  1410. $this->modifiedColumns[] = PartnerPeer::USAGE_PERCENT;
  1411. }
  1412. return $this;
  1413. } // setUsagePercent()
  1414. /**
  1415. * Set the value of [storage_usage] column.
  1416. *
  1417. * @param int $v new value
  1418. * @return Partner The current object (for fluent API support)
  1419. */
  1420. public function setStorageUsage($v)
  1421. {
  1422. if(!isset($this->oldColumnsValues[PartnerPeer::STORAGE_USAGE]))
  1423. $this->oldColumnsValues[PartnerPeer::STORAGE_USAGE] = $this->storage_usage;
  1424. if ($v !== null) {
  1425. $v = (int) $v;
  1426. }
  1427. if ($this->storage_usage !== $v || $this->isNew()) {
  1428. $this->storage_usage = $v;
  1429. $this->modifiedColumns[] = PartnerPeer::STORAGE_USAGE;
  1430. }
  1431. return $this;
  1432. } // setStorageUsage()
  1433. /**
  1434. * Set the value of [eighty_percent_warning] column.
  1435. *
  1436. * @param int $v new value
  1437. * @return Partner The current object (for fluent API support)
  1438. */
  1439. public function setEightyPercentWarning($v)
  1440. {
  1441. if(!isset($this->oldColumnsValues[PartnerPeer::EIGHTY_PERCENT_WARNING]))
  1442. $this->oldColumnsValues[PartnerPeer::EIGHTY_PERCENT_WARNING] = $this->eighty_percent_warning;
  1443. if ($v !== null) {
  1444. $v = (int) $v;
  1445. }
  1446. if ($this->eighty_percent_warning !== $v) {
  1447. $this->eighty_percent_warning = $v;
  1448. $this->modifiedColumns[] = PartnerPeer::EIGHTY_PERCENT_WARNING;
  1449. }
  1450. return $this;
  1451. } // setEightyPercentWarning()
  1452. /**
  1453. * Set the value of [usage_limit_warning] column.
  1454. *
  1455. * @param int $v new value
  1456. * @return Partner The current object (for fluent API support)
  1457. */
  1458. public function setUsageLimitWarning($v)
  1459. {
  1460. if(!isset($this->oldColumnsValues[PartnerPeer::USAGE_LIMIT_WARNING]))
  1461. $this->oldColumnsValues[PartnerPeer::USAGE_LIMIT_WARNING] = $this->usage_limit_warning;
  1462. if ($v !== null) {
  1463. $v = (int) $v;
  1464. }
  1465. if ($this->usage_limit_warning !== $v) {
  1466. $this->usage_limit_warning = $v;
  1467. $this->modifiedColumns[] = PartnerPeer::USAGE_LIMIT_WARNING;
  1468. }
  1469. return $this;
  1470. } // setUsageLimitWarning()
  1471. /**
  1472. * Set the value of [monitor_usage] column.
  1473. *
  1474. * @param int $v new value
  1475. * @return Partner The current object (for fluent API support)
  1476. */
  1477. public function setMonitorUsage($v)
  1478. {
  1479. if(!isset($this->oldColumnsValues[PartnerPeer::MONITOR_USAGE]))
  1480. $this->oldColumnsValues[PartnerPeer::MONITOR_USAGE] = $this->monitor_usage;
  1481. if ($v !== null) {
  1482. $v = (int) $v;
  1483. }
  1484. if ($this->monitor_usage !== $v || $this->isNew()) {
  1485. $this->monitor_usage = $v;
  1486. $this->modifiedColumns[] = PartnerPeer::MONITOR_USAGE;
  1487. }
  1488. return $this;
  1489. } // setMonitorUsage()
  1490. /**
  1491. * Set the value of [priority_group_id] column.
  1492. *
  1493. * @param int $v new value
  1494. * @return Partner The current object (for fluent API support)
  1495. */
  1496. public function setPriorityGroupId($v)
  1497. {
  1498. if(!isset($this->oldColumnsValues[PartnerPeer::PRIORITY_GROUP_ID]))
  1499. $this->oldColumnsValues[PartnerPeer::PRIORITY_GROUP_ID] = $this->priority_group_id;
  1500. if ($v !== null) {
  1501. $v = (int) $v;
  1502. }
  1503. if ($this->priority_group_id !== $v) {
  1504. $this->priority_group_id = $v;
  1505. $this->modifiedColumns[] = PartnerPeer::PRIORITY_GROUP_ID;
  1506. }
  1507. return $this;
  1508. } // setPriorityGroupId()
  1509. /**
  1510. * Set the value of [partner_group_type] column.
  1511. *
  1512. * @param int $v new value
  1513. * @return Partner The current object (for fluent API support)
  1514. */
  1515. public function setPartnerGroupType($v)
  1516. {
  1517. if(!isset($this->oldColumnsValues[PartnerPeer::PARTNER_GROUP_TYPE]))
  1518. $this->oldColumnsValues[PartnerPeer::PARTNER_GROUP_TYPE] = $this->partner_group_type;
  1519. if ($v !== null) {
  1520. $v = (int) $v;
  1521. }
  1522. if ($this->partner_group_type !== $v || $this->isNew()) {
  1523. $this->partner_group_type = $v;
  1524. $this->modifiedColumns[] = PartnerPeer::PARTNER_GROUP_TYPE;
  1525. }
  1526. return $this;
  1527. } // setPartnerGroupType()
  1528. /**
  1529. * Set the value of [partner_parent_id] column.
  1530. *
  1531. * @param int $v new value
  1532. * @return Partner The current object (for fluent API support)
  1533. */
  1534. public function setPartnerParentId($v)
  1535. {
  1536. if(!isset($this->oldColumnsValues[PartnerPeer::PARTNER_PARENT_ID]))
  1537. $this->oldColumnsValues[PartnerPeer::PARTNER_PARENT_ID] = $this->partner_parent_id;
  1538. if ($v !== null) {
  1539. $v = (int) $v;
  1540. }
  1541. if ($this->partner_parent_id !== $v) {
  1542. $this->partner_parent_id = $v;
  1543. $this->modifiedColumns[] = PartnerPeer::PARTNER_PARENT_ID;
  1544. }
  1545. return $this;
  1546. } // setPartnerParentId()
  1547. /**
  1548. * Set the value of [kmc_version] column.
  1549. *
  1550. * @param string $v new value
  1551. * @return Partner The current object (for fluent API support)
  1552. */
  1553. public function setKmcVersion($v)
  1554. {
  1555. if(!isset($this->oldColumnsValues[PartnerPeer::KMC_VERSION]))
  1556. $this->oldColumnsValues[PartnerPeer::KMC_VERSION] = $this->kmc_version;
  1557. if ($v !== null) {
  1558. $v = (string) $v;
  1559. }
  1560. if ($this->kmc_version !== $v || $this->isNew()) {
  1561. $this->kmc_version = $v;
  1562. $this->modifiedColumns[] = PartnerPeer::KMC_VERSION;
  1563. }
  1564. return $this;
  1565. } // setKmcVersion()
  1566. /**
  1567. * Indicates whether the columns in this object are only set to default values.
  1568. *
  1569. * This method can be used in conjunction with isModified() to indicate whether an object is both
  1570. * modified _and_ has some values set which are non-default.
  1571. *
  1572. * @return boolean Whether the columns in this object are only been set with default values.
  1573. */
  1574. public function hasOnlyDefaultValues()
  1575. {
  1576. if ($this->max_number_of_hits_per_day !== -1) {
  1577. return false;
  1578. }
  1579. if ($this->appear_in_search !== 2) {
  1580. return false;
  1581. }
  1582. if ($this->debug_level !== 0) {
  1583. return false;
  1584. }
  1585. if ($this->invalid_login_count !== 0) {
  1586. return false;
  1587. }
  1588. if ($this->ks_max_expiry_in_seconds !== 86400) {
  1589. return false;
  1590. }
  1591. if ($this->create_user_on_demand !== 1) {
  1592. return false;
  1593. }
  1594. if ($this->commercial_use !== 0) {
  1595. return false;
  1596. }
  1597. if ($this->moderate_content !== 0) {
  1598. return false;
  1599. }
  1600. if ($this->notify !== 0) {
  1601. return false;
  1602. }
  1603. if ($this->status !== 1) {
  1604. return false;
  1605. }
  1606. if ($this->type !== 1) {
  1607. return false;
  1608. }
  1609. if ($this->adult_content !== 0) {
  1610. return false;
  1611. }
  1612. if ($this->partner_package !== 1) {
  1613. return false;
  1614. }
  1615. if ($this->usage_percent !== 0) {
  1616. return false;
  1617. }
  1618. if ($this->storage_usage !== 0) {
  1619. return false;
  1620. }
  1621. if ($this->monitor_usage !== 1) {
  1622. return false;
  1623. }
  1624. if ($this->partner_group_type !== 1) {
  1625. return false;
  1626. }
  1627. if ($this->kmc_version !== '1') {
  1628. return false;
  1629. }
  1630. // otherwise, everything was equal, so return TRUE
  1631. return true;
  1632. } // hasOnlyDefaultValues()
  1633. /**
  1634. * Hydrates (populates) the object variables with values from the database resultset.
  1635. *
  1636. * An offset (0-based "start column") is specified so that objects can be hydrated
  1637. * with a subset of the columns in the resultset rows. This is needed, for example,
  1638. * for results of JOIN queries where the resultset row includes columns from two or
  1639. * more tables.
  1640. *
  1641. * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM)
  1642. * @param int $startcol 0-based offset column which indicates which restultset column to start with.
  1643. * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
  1644. * @return int next starting column
  1645. * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
  1646. */
  1647. public function hydrate($row, $startcol = 0, $rehydrate = false)
  1648. {
  1649. try {
  1650. $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
  1651. $this->partner_name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
  1652. $this->partner_alias = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
  1653. $this->url1 = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
  1654. $this->url2 = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
  1655. $this->secret = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
  1656. $this->admin_secret = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
  1657. $this->max_number_of_hits_per_day = ($row[$startcol + 7] !== null) ? (int) $row[$startcol + 7] : null;
  1658. $this->appear_in_search = ($row[$startcol + 8] !== null) ? (int) $row[$startcol + 8] : null;
  1659. $this->debug_level = ($row[$startcol + 9] !== null) ? (int) $row[$startcol + 9] : null;
  1660. $this->invalid_login_count = ($row[$startcol + 10] !== null) ? (int) $row[$startcol + 10] : null;
  1661. $this->created_at = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
  1662. $this->updated_at = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
  1663. $this->anonymous_kuser_id = ($row[$startcol + 13] !== null) ? (int) $row[$startcol + 13] : null;
  1664. $this->ks_max_expiry_in_seconds = ($row[$startcol + 14] !== null) ? (int) $row[$startcol + 14] : null;
  1665. $this->create_user_on_demand = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null;
  1666. $this->prefix = ($row[$startcol + 16] !== null) ? (string) $row[$startcol + 16] : null;
  1667. $this->admin_name = ($row[$startcol + 17] !== null) ? (string) $row[$startcol + 17] : null;
  1668. $this->admin_email = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null;
  1669. $this->description = ($row[$startcol + 19] !== null) ? (string) $row[$startcol + 19] : null;
  1670. $this->commercial_use = ($row[$startcol + 20] !== null) ? (int) $row[$startcol + 20] : null;
  1671. $this->moderate_content = ($row[$startcol + 21] !== null) ? (int) $row[$startcol + 21] : null;
  1672. $this->notify = ($row[$startcol + 22] !== null) ? (int) $row[$startcol + 22] : null;
  1673. $this->custom_data = ($row[$startcol + 23] !== null) ? (string) $row[$startcol + 23] : null;
  1674. $this->service_config_id = ($row[$startcol + 24] !== null) ? (string) $row[$startcol + 24] : null;
  1675. $this->status = ($row[$startcol + 25] !== null) ? (int) $row[$startcol + 25] : null;
  1676. $this->content_categories = ($row[$startcol + 26] !== null) ? (string) $row[$startcol + 26] : null;
  1677. $this->type = ($row[$startcol + 27] !== null) ? (int) $row[$startcol + 27] : null;
  1678. $this->phone = ($row[$startcol + 28] !== null) ? (string) $row[$startcol + 28] : null;
  1679. $this->describe_yourself = ($row[$startcol + 29] !== null) ? (string) $row[$startcol + 29] : null;
  1680. $this->adult_content = ($row[$startcol + 30] !== null) ? (int) $row[$startcol + 30] : null;
  1681. $this->partner_package = ($row[$startcol + 31] !== null) ? (int) $row[$startcol + 31] : null;
  1682. $this->usage_percent = ($row[$startcol + 32] !== null) ? (int) $row[$startcol + 32] : null;
  1683. $this->storage_usage = ($row[$startcol + 33] !== null) ? (int) $row[$startcol + 33] : null;
  1684. $this->eighty_percent_warning = ($row[$startcol + 34] !== null) ? (int) $row[$startcol + 34] : null;
  1685. $this->usage_limit_warning = ($row[$startcol + 35] !== null) ? (int) $row[$startcol + 35] : null;
  1686. $this->monitor_usage = ($row[$startcol + 36] !== null) ? (int) $row[$startcol + 36] : null;
  1687. $this->priority_group_id = ($row[$startcol + 37] !== null) ? (int) $row[$startcol + 37] : null;
  1688. $this->partner_group_type = ($row[$startcol + 38] !== null) ? (int) $row[$startcol + 38] : null;
  1689. $this->partner_parent_id = ($row[$startcol + 39] !== null) ? (int) $row[$startcol + 39] : null;
  1690. $this->kmc_version = ($row[$startcol + 40] !== null) ? (string) $row[$startcol + 40] : null;
  1691. $this->resetModified();
  1692. $this->setNew(false);
  1693. if ($rehydrate) {
  1694. $this->ensureConsistency();
  1695. }
  1696. // FIXME - using NUM_COLUMNS may be clearer.
  1697. return $startcol + 41; // 41 = PartnerPeer::NUM_COLUMNS - PartnerPeer::NUM_LAZY_LOAD_COLUMNS).
  1698. } catch (Exception $e) {
  1699. throw new PropelException("Error populating Partner object", $e);
  1700. }
  1701. }
  1702. /**
  1703. * Checks and repairs the internal consistency of the object.
  1704. *
  1705. * This method is executed after an already-instantiated object is re-hydrated
  1706. * from the database. It exists to check any foreign keys to make sure that
  1707. * the objects related to the current object are correct based on foreign key.
  1708. *
  1709. * You can override this method in the stub class, but you should always invoke
  1710. * the base method from the overridden method (i.e. parent::ensureConsistency()),
  1711. * in case your model changes.
  1712. *
  1713. * @throws PropelException
  1714. */
  1715. public function ensureConsistency()
  1716. {
  1717. if ($this->akuser !== null && $this->

Large files files are truncated, but you can click here to view the full file