PageRenderTime 62ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 1ms

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

https://bitbucket.org/pandaos/kaltura
PHP | 3284 lines | 1741 code | 436 blank | 1107 comment | 330 complexity | 463de14e05e5aa8c5927354590ee2a02 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
  1. <?php
  2. /**
  3. * Base class that represents a row from the 'flavor_params_output' table.
  4. *
  5. *
  6. *
  7. * @package Core
  8. * @subpackage model.om
  9. */
  10. abstract class BaseassetParamsOutput 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 assetParamsOutputPeer
  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 flavor_params_id field.
  25. * @var int
  26. */
  27. protected $flavor_params_id;
  28. /**
  29. * The value for the flavor_params_version field.
  30. * @var int
  31. */
  32. protected $flavor_params_version;
  33. /**
  34. * The value for the partner_id field.
  35. * @var int
  36. */
  37. protected $partner_id;
  38. /**
  39. * The value for the entry_id field.
  40. * @var string
  41. */
  42. protected $entry_id;
  43. /**
  44. * The value for the flavor_asset_id field.
  45. * @var string
  46. */
  47. protected $flavor_asset_id;
  48. /**
  49. * The value for the flavor_asset_version field.
  50. * @var string
  51. */
  52. protected $flavor_asset_version;
  53. /**
  54. * The value for the name field.
  55. * Note: this column has a database default value of: ''
  56. * @var string
  57. */
  58. protected $name;
  59. /**
  60. * The value for the tags field.
  61. * @var string
  62. */
  63. protected $tags;
  64. /**
  65. * The value for the description field.
  66. * Note: this column has a database default value of: ''
  67. * @var string
  68. */
  69. protected $description;
  70. /**
  71. * The value for the ready_behavior field.
  72. * @var int
  73. */
  74. protected $ready_behavior;
  75. /**
  76. * The value for the created_at field.
  77. * @var string
  78. */
  79. protected $created_at;
  80. /**
  81. * The value for the updated_at field.
  82. * @var string
  83. */
  84. protected $updated_at;
  85. /**
  86. * The value for the deleted_at field.
  87. * @var string
  88. */
  89. protected $deleted_at;
  90. /**
  91. * The value for the is_default field.
  92. * Note: this column has a database default value of: 0
  93. * @var int
  94. */
  95. protected $is_default;
  96. /**
  97. * The value for the format field.
  98. * @var string
  99. */
  100. protected $format;
  101. /**
  102. * The value for the video_codec field.
  103. * @var string
  104. */
  105. protected $video_codec;
  106. /**
  107. * The value for the video_bitrate field.
  108. * Note: this column has a database default value of: 0
  109. * @var int
  110. */
  111. protected $video_bitrate;
  112. /**
  113. * The value for the audio_codec field.
  114. * @var string
  115. */
  116. protected $audio_codec;
  117. /**
  118. * The value for the audio_bitrate field.
  119. * @var int
  120. */
  121. protected $audio_bitrate;
  122. /**
  123. * The value for the audio_channels field.
  124. * @var int
  125. */
  126. protected $audio_channels;
  127. /**
  128. * The value for the audio_sample_rate field.
  129. * @var int
  130. */
  131. protected $audio_sample_rate;
  132. /**
  133. * The value for the audio_resolution field.
  134. * @var int
  135. */
  136. protected $audio_resolution;
  137. /**
  138. * The value for the width field.
  139. * Note: this column has a database default value of: 0
  140. * @var int
  141. */
  142. protected $width;
  143. /**
  144. * The value for the height field.
  145. * Note: this column has a database default value of: 0
  146. * @var int
  147. */
  148. protected $height;
  149. /**
  150. * The value for the frame_rate field.
  151. * @var double
  152. */
  153. protected $frame_rate;
  154. /**
  155. * The value for the gop_size field.
  156. * Note: this column has a database default value of: 0
  157. * @var int
  158. */
  159. protected $gop_size;
  160. /**
  161. * The value for the two_pass field.
  162. * Note: this column has a database default value of: false
  163. * @var boolean
  164. */
  165. protected $two_pass;
  166. /**
  167. * The value for the conversion_engines field.
  168. * @var string
  169. */
  170. protected $conversion_engines;
  171. /**
  172. * The value for the conversion_engines_extra_params field.
  173. * @var string
  174. */
  175. protected $conversion_engines_extra_params;
  176. /**
  177. * The value for the custom_data field.
  178. * @var string
  179. */
  180. protected $custom_data;
  181. /**
  182. * The value for the command_lines field.
  183. * @var string
  184. */
  185. protected $command_lines;
  186. /**
  187. * The value for the file_ext field.
  188. * @var string
  189. */
  190. protected $file_ext;
  191. /**
  192. * The value for the deinterlice field.
  193. * @var int
  194. */
  195. protected $deinterlice;
  196. /**
  197. * The value for the rotate field.
  198. * @var int
  199. */
  200. protected $rotate;
  201. /**
  202. * The value for the operators field.
  203. * @var string
  204. */
  205. protected $operators;
  206. /**
  207. * The value for the engine_version field.
  208. * @var int
  209. */
  210. protected $engine_version;
  211. /**
  212. * The value for the type field.
  213. * Note: this column has a database default value of: 0
  214. * @var int
  215. */
  216. protected $type;
  217. /**
  218. * @var assetParams
  219. */
  220. protected $aassetParams;
  221. /**
  222. * @var entry
  223. */
  224. protected $aentry;
  225. /**
  226. * @var asset
  227. */
  228. protected $aasset;
  229. /**
  230. * Flag to prevent endless save loop, if this object is referenced
  231. * by another object which falls in this transaction.
  232. * @var boolean
  233. */
  234. protected $alreadyInSave = false;
  235. /**
  236. * Flag to prevent endless validation loop, if this object is referenced
  237. * by another object which falls in this transaction.
  238. * @var boolean
  239. */
  240. protected $alreadyInValidation = false;
  241. /**
  242. * Store columns old values before the changes
  243. * @var array
  244. */
  245. protected $oldColumnsValues = array();
  246. /**
  247. * @return array
  248. */
  249. public function getColumnsOldValues()
  250. {
  251. return $this->oldColumnsValues;
  252. }
  253. /**
  254. * Applies default values to this object.
  255. * This method should be called from the object's constructor (or
  256. * equivalent initialization method).
  257. * @see __construct()
  258. */
  259. public function applyDefaultValues()
  260. {
  261. $this->name = '';
  262. $this->description = '';
  263. $this->is_default = 0;
  264. $this->video_bitrate = 0;
  265. $this->width = 0;
  266. $this->height = 0;
  267. $this->gop_size = 0;
  268. $this->two_pass = false;
  269. $this->type = 0;
  270. }
  271. /**
  272. * Initializes internal state of BaseassetParamsOutput object.
  273. * @see applyDefaults()
  274. */
  275. public function __construct()
  276. {
  277. parent::__construct();
  278. $this->applyDefaultValues();
  279. }
  280. /**
  281. * Get the [id] column value.
  282. *
  283. * @return int
  284. */
  285. public function getId()
  286. {
  287. return $this->id;
  288. }
  289. /**
  290. * Get the [flavor_params_id] column value.
  291. *
  292. * @return int
  293. */
  294. public function getFlavorParamsId()
  295. {
  296. return $this->flavor_params_id;
  297. }
  298. /**
  299. * Get the [flavor_params_version] column value.
  300. *
  301. * @return int
  302. */
  303. public function getFlavorParamsVersion()
  304. {
  305. return $this->flavor_params_version;
  306. }
  307. /**
  308. * Get the [partner_id] column value.
  309. *
  310. * @return int
  311. */
  312. public function getPartnerId()
  313. {
  314. return $this->partner_id;
  315. }
  316. /**
  317. * Get the [entry_id] column value.
  318. *
  319. * @return string
  320. */
  321. public function getEntryId()
  322. {
  323. return $this->entry_id;
  324. }
  325. /**
  326. * Get the [flavor_asset_id] column value.
  327. *
  328. * @return string
  329. */
  330. public function getFlavorAssetId()
  331. {
  332. return $this->flavor_asset_id;
  333. }
  334. /**
  335. * Get the [flavor_asset_version] column value.
  336. *
  337. * @return string
  338. */
  339. public function getFlavorAssetVersion()
  340. {
  341. return $this->flavor_asset_version;
  342. }
  343. /**
  344. * Get the [name] column value.
  345. *
  346. * @return string
  347. */
  348. public function getName()
  349. {
  350. return $this->name;
  351. }
  352. /**
  353. * Get the [tags] column value.
  354. *
  355. * @return string
  356. */
  357. public function getTags()
  358. {
  359. return $this->tags;
  360. }
  361. /**
  362. * Get the [description] column value.
  363. *
  364. * @return string
  365. */
  366. public function getDescription()
  367. {
  368. return $this->description;
  369. }
  370. /**
  371. * Get the [ready_behavior] column value.
  372. *
  373. * @return int
  374. */
  375. public function getReadyBehavior()
  376. {
  377. return $this->ready_behavior;
  378. }
  379. /**
  380. * Get the [optionally formatted] temporal [created_at] column value.
  381. *
  382. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  383. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  384. *
  385. * @param string $format The date/time format string (either date()-style or strftime()-style).
  386. * If format is NULL, then the raw unix timestamp integer will be returned.
  387. * @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
  388. * @throws PropelException - if unable to parse/validate the date/time value.
  389. */
  390. public function getCreatedAt($format = 'Y-m-d H:i:s')
  391. {
  392. if ($this->created_at === null) {
  393. return null;
  394. }
  395. if ($this->created_at === '0000-00-00 00:00:00') {
  396. // while technically this is not a default value of NULL,
  397. // this seems to be closest in meaning.
  398. return null;
  399. } else {
  400. try {
  401. $dt = new DateTime($this->created_at);
  402. } catch (Exception $x) {
  403. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->created_at, true), $x);
  404. }
  405. }
  406. if ($format === null) {
  407. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  408. return (int) $dt->format('U');
  409. } elseif (strpos($format, '%') !== false) {
  410. return strftime($format, $dt->format('U'));
  411. } else {
  412. return $dt->format($format);
  413. }
  414. }
  415. /**
  416. * Get the [optionally formatted] temporal [updated_at] column value.
  417. *
  418. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  419. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  420. *
  421. * @param string $format The date/time format string (either date()-style or strftime()-style).
  422. * If format is NULL, then the raw unix timestamp integer will be returned.
  423. * @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
  424. * @throws PropelException - if unable to parse/validate the date/time value.
  425. */
  426. public function getUpdatedAt($format = 'Y-m-d H:i:s')
  427. {
  428. if ($this->updated_at === null) {
  429. return null;
  430. }
  431. if ($this->updated_at === '0000-00-00 00:00:00') {
  432. // while technically this is not a default value of NULL,
  433. // this seems to be closest in meaning.
  434. return null;
  435. } else {
  436. try {
  437. $dt = new DateTime($this->updated_at);
  438. } catch (Exception $x) {
  439. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->updated_at, true), $x);
  440. }
  441. }
  442. if ($format === null) {
  443. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  444. return (int) $dt->format('U');
  445. } elseif (strpos($format, '%') !== false) {
  446. return strftime($format, $dt->format('U'));
  447. } else {
  448. return $dt->format($format);
  449. }
  450. }
  451. /**
  452. * Get the [optionally formatted] temporal [deleted_at] column value.
  453. *
  454. * This accessor only only work with unix epoch dates. Consider enabling the propel.useDateTimeClass
  455. * option in order to avoid converstions to integers (which are limited in the dates they can express).
  456. *
  457. * @param string $format The date/time format string (either date()-style or strftime()-style).
  458. * If format is NULL, then the raw unix timestamp integer will be returned.
  459. * @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
  460. * @throws PropelException - if unable to parse/validate the date/time value.
  461. */
  462. public function getDeletedAt($format = 'Y-m-d H:i:s')
  463. {
  464. if ($this->deleted_at === null) {
  465. return null;
  466. }
  467. if ($this->deleted_at === '0000-00-00 00:00:00') {
  468. // while technically this is not a default value of NULL,
  469. // this seems to be closest in meaning.
  470. return null;
  471. } else {
  472. try {
  473. $dt = new DateTime($this->deleted_at);
  474. } catch (Exception $x) {
  475. throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->deleted_at, true), $x);
  476. }
  477. }
  478. if ($format === null) {
  479. // We cast here to maintain BC in API; obviously we will lose data if we're dealing with pre-/post-epoch dates.
  480. return (int) $dt->format('U');
  481. } elseif (strpos($format, '%') !== false) {
  482. return strftime($format, $dt->format('U'));
  483. } else {
  484. return $dt->format($format);
  485. }
  486. }
  487. /**
  488. * Get the [is_default] column value.
  489. *
  490. * @return int
  491. */
  492. public function getIsDefault()
  493. {
  494. return $this->is_default;
  495. }
  496. /**
  497. * Get the [format] column value.
  498. *
  499. * @return string
  500. */
  501. public function getFormat()
  502. {
  503. return $this->format;
  504. }
  505. /**
  506. * Get the [video_codec] column value.
  507. *
  508. * @return string
  509. */
  510. public function getVideoCodec()
  511. {
  512. return $this->video_codec;
  513. }
  514. /**
  515. * Get the [video_bitrate] column value.
  516. *
  517. * @return int
  518. */
  519. public function getVideoBitrate()
  520. {
  521. return $this->video_bitrate;
  522. }
  523. /**
  524. * Get the [audio_codec] column value.
  525. *
  526. * @return string
  527. */
  528. public function getAudioCodec()
  529. {
  530. return $this->audio_codec;
  531. }
  532. /**
  533. * Get the [audio_bitrate] column value.
  534. *
  535. * @return int
  536. */
  537. public function getAudioBitrate()
  538. {
  539. return $this->audio_bitrate;
  540. }
  541. /**
  542. * Get the [audio_channels] column value.
  543. *
  544. * @return int
  545. */
  546. public function getAudioChannels()
  547. {
  548. return $this->audio_channels;
  549. }
  550. /**
  551. * Get the [audio_sample_rate] column value.
  552. *
  553. * @return int
  554. */
  555. public function getAudioSampleRate()
  556. {
  557. return $this->audio_sample_rate;
  558. }
  559. /**
  560. * Get the [audio_resolution] column value.
  561. *
  562. * @return int
  563. */
  564. public function getAudioResolution()
  565. {
  566. return $this->audio_resolution;
  567. }
  568. /**
  569. * Get the [width] column value.
  570. *
  571. * @return int
  572. */
  573. public function getWidth()
  574. {
  575. return $this->width;
  576. }
  577. /**
  578. * Get the [height] column value.
  579. *
  580. * @return int
  581. */
  582. public function getHeight()
  583. {
  584. return $this->height;
  585. }
  586. /**
  587. * Get the [frame_rate] column value.
  588. *
  589. * @return double
  590. */
  591. public function getFrameRate()
  592. {
  593. return $this->frame_rate;
  594. }
  595. /**
  596. * Get the [gop_size] column value.
  597. *
  598. * @return int
  599. */
  600. public function getGopSize()
  601. {
  602. return $this->gop_size;
  603. }
  604. /**
  605. * Get the [two_pass] column value.
  606. *
  607. * @return boolean
  608. */
  609. public function getTwoPass()
  610. {
  611. return $this->two_pass;
  612. }
  613. /**
  614. * Get the [conversion_engines] column value.
  615. *
  616. * @return string
  617. */
  618. public function getConversionEngines()
  619. {
  620. return $this->conversion_engines;
  621. }
  622. /**
  623. * Get the [conversion_engines_extra_params] column value.
  624. *
  625. * @return string
  626. */
  627. public function getConversionEnginesExtraParams()
  628. {
  629. return $this->conversion_engines_extra_params;
  630. }
  631. /**
  632. * Get the [custom_data] column value.
  633. *
  634. * @return string
  635. */
  636. public function getCustomData()
  637. {
  638. return $this->custom_data;
  639. }
  640. /**
  641. * Get the [command_lines] column value.
  642. *
  643. * @return string
  644. */
  645. public function getCommandLines()
  646. {
  647. return $this->command_lines;
  648. }
  649. /**
  650. * Get the [file_ext] column value.
  651. *
  652. * @return string
  653. */
  654. public function getFileExt()
  655. {
  656. return $this->file_ext;
  657. }
  658. /**
  659. * Get the [deinterlice] column value.
  660. *
  661. * @return int
  662. */
  663. public function getDeinterlice()
  664. {
  665. return $this->deinterlice;
  666. }
  667. /**
  668. * Get the [rotate] column value.
  669. *
  670. * @return int
  671. */
  672. public function getRotate()
  673. {
  674. return $this->rotate;
  675. }
  676. /**
  677. * Get the [operators] column value.
  678. *
  679. * @return string
  680. */
  681. public function getOperators()
  682. {
  683. return $this->operators;
  684. }
  685. /**
  686. * Get the [engine_version] column value.
  687. *
  688. * @return int
  689. */
  690. public function getEngineVersion()
  691. {
  692. return $this->engine_version;
  693. }
  694. /**
  695. * Get the [type] column value.
  696. *
  697. * @return int
  698. */
  699. public function getType()
  700. {
  701. return $this->type;
  702. }
  703. /**
  704. * Set the value of [id] column.
  705. *
  706. * @param int $v new value
  707. * @return assetParamsOutput The current object (for fluent API support)
  708. */
  709. public function setId($v)
  710. {
  711. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::ID]))
  712. $this->oldColumnsValues[assetParamsOutputPeer::ID] = $this->id;
  713. if ($v !== null) {
  714. $v = (int) $v;
  715. }
  716. if ($this->id !== $v) {
  717. $this->id = $v;
  718. $this->modifiedColumns[] = assetParamsOutputPeer::ID;
  719. }
  720. return $this;
  721. } // setId()
  722. /**
  723. * Set the value of [flavor_params_id] column.
  724. *
  725. * @param int $v new value
  726. * @return assetParamsOutput The current object (for fluent API support)
  727. */
  728. public function setFlavorParamsId($v)
  729. {
  730. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::FLAVOR_PARAMS_ID]))
  731. $this->oldColumnsValues[assetParamsOutputPeer::FLAVOR_PARAMS_ID] = $this->flavor_params_id;
  732. if ($v !== null) {
  733. $v = (int) $v;
  734. }
  735. if ($this->flavor_params_id !== $v) {
  736. $this->flavor_params_id = $v;
  737. $this->modifiedColumns[] = assetParamsOutputPeer::FLAVOR_PARAMS_ID;
  738. }
  739. if ($this->aassetParams !== null && $this->aassetParams->getId() !== $v) {
  740. $this->aassetParams = null;
  741. }
  742. return $this;
  743. } // setFlavorParamsId()
  744. /**
  745. * Set the value of [flavor_params_version] column.
  746. *
  747. * @param int $v new value
  748. * @return assetParamsOutput The current object (for fluent API support)
  749. */
  750. public function setFlavorParamsVersion($v)
  751. {
  752. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::FLAVOR_PARAMS_VERSION]))
  753. $this->oldColumnsValues[assetParamsOutputPeer::FLAVOR_PARAMS_VERSION] = $this->flavor_params_version;
  754. if ($v !== null) {
  755. $v = (int) $v;
  756. }
  757. if ($this->flavor_params_version !== $v) {
  758. $this->flavor_params_version = $v;
  759. $this->modifiedColumns[] = assetParamsOutputPeer::FLAVOR_PARAMS_VERSION;
  760. }
  761. return $this;
  762. } // setFlavorParamsVersion()
  763. /**
  764. * Set the value of [partner_id] column.
  765. *
  766. * @param int $v new value
  767. * @return assetParamsOutput The current object (for fluent API support)
  768. */
  769. public function setPartnerId($v)
  770. {
  771. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::PARTNER_ID]))
  772. $this->oldColumnsValues[assetParamsOutputPeer::PARTNER_ID] = $this->partner_id;
  773. if ($v !== null) {
  774. $v = (int) $v;
  775. }
  776. if ($this->partner_id !== $v) {
  777. $this->partner_id = $v;
  778. $this->modifiedColumns[] = assetParamsOutputPeer::PARTNER_ID;
  779. }
  780. return $this;
  781. } // setPartnerId()
  782. /**
  783. * Set the value of [entry_id] column.
  784. *
  785. * @param string $v new value
  786. * @return assetParamsOutput The current object (for fluent API support)
  787. */
  788. public function setEntryId($v)
  789. {
  790. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::ENTRY_ID]))
  791. $this->oldColumnsValues[assetParamsOutputPeer::ENTRY_ID] = $this->entry_id;
  792. if ($v !== null) {
  793. $v = (string) $v;
  794. }
  795. if ($this->entry_id !== $v) {
  796. $this->entry_id = $v;
  797. $this->modifiedColumns[] = assetParamsOutputPeer::ENTRY_ID;
  798. }
  799. if ($this->aentry !== null && $this->aentry->getId() !== $v) {
  800. $this->aentry = null;
  801. }
  802. return $this;
  803. } // setEntryId()
  804. /**
  805. * Set the value of [flavor_asset_id] column.
  806. *
  807. * @param string $v new value
  808. * @return assetParamsOutput The current object (for fluent API support)
  809. */
  810. public function setFlavorAssetId($v)
  811. {
  812. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::FLAVOR_ASSET_ID]))
  813. $this->oldColumnsValues[assetParamsOutputPeer::FLAVOR_ASSET_ID] = $this->flavor_asset_id;
  814. if ($v !== null) {
  815. $v = (string) $v;
  816. }
  817. if ($this->flavor_asset_id !== $v) {
  818. $this->flavor_asset_id = $v;
  819. $this->modifiedColumns[] = assetParamsOutputPeer::FLAVOR_ASSET_ID;
  820. }
  821. if ($this->aasset !== null && $this->aasset->getId() !== $v) {
  822. $this->aasset = null;
  823. }
  824. return $this;
  825. } // setFlavorAssetId()
  826. /**
  827. * Set the value of [flavor_asset_version] column.
  828. *
  829. * @param string $v new value
  830. * @return assetParamsOutput The current object (for fluent API support)
  831. */
  832. public function setFlavorAssetVersion($v)
  833. {
  834. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::FLAVOR_ASSET_VERSION]))
  835. $this->oldColumnsValues[assetParamsOutputPeer::FLAVOR_ASSET_VERSION] = $this->flavor_asset_version;
  836. if ($v !== null) {
  837. $v = (string) $v;
  838. }
  839. if ($this->flavor_asset_version !== $v) {
  840. $this->flavor_asset_version = $v;
  841. $this->modifiedColumns[] = assetParamsOutputPeer::FLAVOR_ASSET_VERSION;
  842. }
  843. return $this;
  844. } // setFlavorAssetVersion()
  845. /**
  846. * Set the value of [name] column.
  847. *
  848. * @param string $v new value
  849. * @return assetParamsOutput The current object (for fluent API support)
  850. */
  851. public function setName($v)
  852. {
  853. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::NAME]))
  854. $this->oldColumnsValues[assetParamsOutputPeer::NAME] = $this->name;
  855. if ($v !== null) {
  856. $v = (string) $v;
  857. }
  858. if ($this->name !== $v || $this->isNew()) {
  859. $this->name = $v;
  860. $this->modifiedColumns[] = assetParamsOutputPeer::NAME;
  861. }
  862. return $this;
  863. } // setName()
  864. /**
  865. * Set the value of [tags] column.
  866. *
  867. * @param string $v new value
  868. * @return assetParamsOutput The current object (for fluent API support)
  869. */
  870. public function setTags($v)
  871. {
  872. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::TAGS]))
  873. $this->oldColumnsValues[assetParamsOutputPeer::TAGS] = $this->tags;
  874. if ($v !== null) {
  875. $v = (string) $v;
  876. }
  877. if ($this->tags !== $v) {
  878. $this->tags = $v;
  879. $this->modifiedColumns[] = assetParamsOutputPeer::TAGS;
  880. }
  881. return $this;
  882. } // setTags()
  883. /**
  884. * Set the value of [description] column.
  885. *
  886. * @param string $v new value
  887. * @return assetParamsOutput The current object (for fluent API support)
  888. */
  889. public function setDescription($v)
  890. {
  891. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::DESCRIPTION]))
  892. $this->oldColumnsValues[assetParamsOutputPeer::DESCRIPTION] = $this->description;
  893. if ($v !== null) {
  894. $v = (string) $v;
  895. }
  896. if ($this->description !== $v || $this->isNew()) {
  897. $this->description = $v;
  898. $this->modifiedColumns[] = assetParamsOutputPeer::DESCRIPTION;
  899. }
  900. return $this;
  901. } // setDescription()
  902. /**
  903. * Set the value of [ready_behavior] column.
  904. *
  905. * @param int $v new value
  906. * @return assetParamsOutput The current object (for fluent API support)
  907. */
  908. public function setReadyBehavior($v)
  909. {
  910. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::READY_BEHAVIOR]))
  911. $this->oldColumnsValues[assetParamsOutputPeer::READY_BEHAVIOR] = $this->ready_behavior;
  912. if ($v !== null) {
  913. $v = (int) $v;
  914. }
  915. if ($this->ready_behavior !== $v) {
  916. $this->ready_behavior = $v;
  917. $this->modifiedColumns[] = assetParamsOutputPeer::READY_BEHAVIOR;
  918. }
  919. return $this;
  920. } // setReadyBehavior()
  921. /**
  922. * Sets the value of [created_at] column to a normalized version of the date/time value specified.
  923. *
  924. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  925. * be treated as NULL for temporal objects.
  926. * @return assetParamsOutput The current object (for fluent API support)
  927. */
  928. public function setCreatedAt($v)
  929. {
  930. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  931. // -- which is unexpected, to say the least.
  932. if ($v === null || $v === '') {
  933. $dt = null;
  934. } elseif ($v instanceof DateTime) {
  935. $dt = $v;
  936. } else {
  937. // some string/numeric value passed; we normalize that so that we can
  938. // validate it.
  939. try {
  940. if (is_numeric($v)) { // if it's a unix timestamp
  941. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  942. // We have to explicitly specify and then change the time zone because of a
  943. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  944. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  945. } else {
  946. $dt = new DateTime($v);
  947. }
  948. } catch (Exception $x) {
  949. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  950. }
  951. }
  952. if ( $this->created_at !== null || $dt !== null ) {
  953. // (nested ifs are a little easier to read in this case)
  954. $currNorm = ($this->created_at !== null && $tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;
  955. $newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;
  956. if ( ($currNorm !== $newNorm) // normalized values don't match
  957. )
  958. {
  959. $this->created_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);
  960. $this->modifiedColumns[] = assetParamsOutputPeer::CREATED_AT;
  961. }
  962. } // if either are not null
  963. return $this;
  964. } // setCreatedAt()
  965. /**
  966. * Sets the value of [updated_at] column to a normalized version of the date/time value specified.
  967. *
  968. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  969. * be treated as NULL for temporal objects.
  970. * @return assetParamsOutput The current object (for fluent API support)
  971. */
  972. public function setUpdatedAt($v)
  973. {
  974. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  975. // -- which is unexpected, to say the least.
  976. if ($v === null || $v === '') {
  977. $dt = null;
  978. } elseif ($v instanceof DateTime) {
  979. $dt = $v;
  980. } else {
  981. // some string/numeric value passed; we normalize that so that we can
  982. // validate it.
  983. try {
  984. if (is_numeric($v)) { // if it's a unix timestamp
  985. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  986. // We have to explicitly specify and then change the time zone because of a
  987. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  988. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  989. } else {
  990. $dt = new DateTime($v);
  991. }
  992. } catch (Exception $x) {
  993. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  994. }
  995. }
  996. if ( $this->updated_at !== null || $dt !== null ) {
  997. // (nested ifs are a little easier to read in this case)
  998. $currNorm = ($this->updated_at !== null && $tmpDt = new DateTime($this->updated_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;
  999. $newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;
  1000. if ( ($currNorm !== $newNorm) // normalized values don't match
  1001. )
  1002. {
  1003. $this->updated_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);
  1004. $this->modifiedColumns[] = assetParamsOutputPeer::UPDATED_AT;
  1005. }
  1006. } // if either are not null
  1007. return $this;
  1008. } // setUpdatedAt()
  1009. /**
  1010. * Sets the value of [deleted_at] column to a normalized version of the date/time value specified.
  1011. *
  1012. * @param mixed $v string, integer (timestamp), or DateTime value. Empty string will
  1013. * be treated as NULL for temporal objects.
  1014. * @return assetParamsOutput The current object (for fluent API support)
  1015. */
  1016. public function setDeletedAt($v)
  1017. {
  1018. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::DELETED_AT]))
  1019. $this->oldColumnsValues[assetParamsOutputPeer::DELETED_AT] = $this->deleted_at;
  1020. // we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')
  1021. // -- which is unexpected, to say the least.
  1022. if ($v === null || $v === '') {
  1023. $dt = null;
  1024. } elseif ($v instanceof DateTime) {
  1025. $dt = $v;
  1026. } else {
  1027. // some string/numeric value passed; we normalize that so that we can
  1028. // validate it.
  1029. try {
  1030. if (is_numeric($v)) { // if it's a unix timestamp
  1031. $dt = new DateTime('@'.$v, new DateTimeZone('UTC'));
  1032. // We have to explicitly specify and then change the time zone because of a
  1033. // DateTime bug: http://bugs.php.net/bug.php?id=43003
  1034. $dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));
  1035. } else {
  1036. $dt = new DateTime($v);
  1037. }
  1038. } catch (Exception $x) {
  1039. throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
  1040. }
  1041. }
  1042. if ( $this->deleted_at !== null || $dt !== null ) {
  1043. // (nested ifs are a little easier to read in this case)
  1044. $currNorm = ($this->deleted_at !== null && $tmpDt = new DateTime($this->deleted_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;
  1045. $newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;
  1046. if ( ($currNorm !== $newNorm) // normalized values don't match
  1047. )
  1048. {
  1049. $this->deleted_at = ($dt ? $dt->format('Y-m-d H:i:s') : null);
  1050. $this->modifiedColumns[] = assetParamsOutputPeer::DELETED_AT;
  1051. }
  1052. } // if either are not null
  1053. return $this;
  1054. } // setDeletedAt()
  1055. /**
  1056. * Set the value of [is_default] column.
  1057. *
  1058. * @param int $v new value
  1059. * @return assetParamsOutput The current object (for fluent API support)
  1060. */
  1061. public function setIsDefault($v)
  1062. {
  1063. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::IS_DEFAULT]))
  1064. $this->oldColumnsValues[assetParamsOutputPeer::IS_DEFAULT] = $this->is_default;
  1065. if ($v !== null) {
  1066. $v = (int) $v;
  1067. }
  1068. if ($this->is_default !== $v || $this->isNew()) {
  1069. $this->is_default = $v;
  1070. $this->modifiedColumns[] = assetParamsOutputPeer::IS_DEFAULT;
  1071. }
  1072. return $this;
  1073. } // setIsDefault()
  1074. /**
  1075. * Set the value of [format] column.
  1076. *
  1077. * @param string $v new value
  1078. * @return assetParamsOutput The current object (for fluent API support)
  1079. */
  1080. public function setFormat($v)
  1081. {
  1082. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::FORMAT]))
  1083. $this->oldColumnsValues[assetParamsOutputPeer::FORMAT] = $this->format;
  1084. if ($v !== null) {
  1085. $v = (string) $v;
  1086. }
  1087. if ($this->format !== $v) {
  1088. $this->format = $v;
  1089. $this->modifiedColumns[] = assetParamsOutputPeer::FORMAT;
  1090. }
  1091. return $this;
  1092. } // setFormat()
  1093. /**
  1094. * Set the value of [video_codec] column.
  1095. *
  1096. * @param string $v new value
  1097. * @return assetParamsOutput The current object (for fluent API support)
  1098. */
  1099. public function setVideoCodec($v)
  1100. {
  1101. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::VIDEO_CODEC]))
  1102. $this->oldColumnsValues[assetParamsOutputPeer::VIDEO_CODEC] = $this->video_codec;
  1103. if ($v !== null) {
  1104. $v = (string) $v;
  1105. }
  1106. if ($this->video_codec !== $v) {
  1107. $this->video_codec = $v;
  1108. $this->modifiedColumns[] = assetParamsOutputPeer::VIDEO_CODEC;
  1109. }
  1110. return $this;
  1111. } // setVideoCodec()
  1112. /**
  1113. * Set the value of [video_bitrate] column.
  1114. *
  1115. * @param int $v new value
  1116. * @return assetParamsOutput The current object (for fluent API support)
  1117. */
  1118. public function setVideoBitrate($v)
  1119. {
  1120. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::VIDEO_BITRATE]))
  1121. $this->oldColumnsValues[assetParamsOutputPeer::VIDEO_BITRATE] = $this->video_bitrate;
  1122. if ($v !== null) {
  1123. $v = (int) $v;
  1124. }
  1125. if ($this->video_bitrate !== $v || $this->isNew()) {
  1126. $this->video_bitrate = $v;
  1127. $this->modifiedColumns[] = assetParamsOutputPeer::VIDEO_BITRATE;
  1128. }
  1129. return $this;
  1130. } // setVideoBitrate()
  1131. /**
  1132. * Set the value of [audio_codec] column.
  1133. *
  1134. * @param string $v new value
  1135. * @return assetParamsOutput The current object (for fluent API support)
  1136. */
  1137. public function setAudioCodec($v)
  1138. {
  1139. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::AUDIO_CODEC]))
  1140. $this->oldColumnsValues[assetParamsOutputPeer::AUDIO_CODEC] = $this->audio_codec;
  1141. if ($v !== null) {
  1142. $v = (string) $v;
  1143. }
  1144. if ($this->audio_codec !== $v) {
  1145. $this->audio_codec = $v;
  1146. $this->modifiedColumns[] = assetParamsOutputPeer::AUDIO_CODEC;
  1147. }
  1148. return $this;
  1149. } // setAudioCodec()
  1150. /**
  1151. * Set the value of [audio_bitrate] column.
  1152. *
  1153. * @param int $v new value
  1154. * @return assetParamsOutput The current object (for fluent API support)
  1155. */
  1156. public function setAudioBitrate($v)
  1157. {
  1158. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::AUDIO_BITRATE]))
  1159. $this->oldColumnsValues[assetParamsOutputPeer::AUDIO_BITRATE] = $this->audio_bitrate;
  1160. if ($v !== null) {
  1161. $v = (int) $v;
  1162. }
  1163. if ($this->audio_bitrate !== $v) {
  1164. $this->audio_bitrate = $v;
  1165. $this->modifiedColumns[] = assetParamsOutputPeer::AUDIO_BITRATE;
  1166. }
  1167. return $this;
  1168. } // setAudioBitrate()
  1169. /**
  1170. * Set the value of [audio_channels] column.
  1171. *
  1172. * @param int $v new value
  1173. * @return assetParamsOutput The current object (for fluent API support)
  1174. */
  1175. public function setAudioChannels($v)
  1176. {
  1177. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::AUDIO_CHANNELS]))
  1178. $this->oldColumnsValues[assetParamsOutputPeer::AUDIO_CHANNELS] = $this->audio_channels;
  1179. if ($v !== null) {
  1180. $v = (int) $v;
  1181. }
  1182. if ($this->audio_channels !== $v) {
  1183. $this->audio_channels = $v;
  1184. $this->modifiedColumns[] = assetParamsOutputPeer::AUDIO_CHANNELS;
  1185. }
  1186. return $this;
  1187. } // setAudioChannels()
  1188. /**
  1189. * Set the value of [audio_sample_rate] column.
  1190. *
  1191. * @param int $v new value
  1192. * @return assetParamsOutput The current object (for fluent API support)
  1193. */
  1194. public function setAudioSampleRate($v)
  1195. {
  1196. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::AUDIO_SAMPLE_RATE]))
  1197. $this->oldColumnsValues[assetParamsOutputPeer::AUDIO_SAMPLE_RATE] = $this->audio_sample_rate;
  1198. if ($v !== null) {
  1199. $v = (int) $v;
  1200. }
  1201. if ($this->audio_sample_rate !== $v) {
  1202. $this->audio_sample_rate = $v;
  1203. $this->modifiedColumns[] = assetParamsOutputPeer::AUDIO_SAMPLE_RATE;
  1204. }
  1205. return $this;
  1206. } // setAudioSampleRate()
  1207. /**
  1208. * Set the value of [audio_resolution] column.
  1209. *
  1210. * @param int $v new value
  1211. * @return assetParamsOutput The current object (for fluent API support)
  1212. */
  1213. public function setAudioResolution($v)
  1214. {
  1215. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::AUDIO_RESOLUTION]))
  1216. $this->oldColumnsValues[assetParamsOutputPeer::AUDIO_RESOLUTION] = $this->audio_resolution;
  1217. if ($v !== null) {
  1218. $v = (int) $v;
  1219. }
  1220. if ($this->audio_resolution !== $v) {
  1221. $this->audio_resolution = $v;
  1222. $this->modifiedColumns[] = assetParamsOutputPeer::AUDIO_RESOLUTION;
  1223. }
  1224. return $this;
  1225. } // setAudioResolution()
  1226. /**
  1227. * Set the value of [width] column.
  1228. *
  1229. * @param int $v new value
  1230. * @return assetParamsOutput The current object (for fluent API support)
  1231. */
  1232. public function setWidth($v)
  1233. {
  1234. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::WIDTH]))
  1235. $this->oldColumnsValues[assetParamsOutputPeer::WIDTH] = $this->width;
  1236. if ($v !== null) {
  1237. $v = (int) $v;
  1238. }
  1239. if ($this->width !== $v || $this->isNew()) {
  1240. $this->width = $v;
  1241. $this->modifiedColumns[] = assetParamsOutputPeer::WIDTH;
  1242. }
  1243. return $this;
  1244. } // setWidth()
  1245. /**
  1246. * Set the value of [height] column.
  1247. *
  1248. * @param int $v new value
  1249. * @return assetParamsOutput The current object (for fluent API support)
  1250. */
  1251. public function setHeight($v)
  1252. {
  1253. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::HEIGHT]))
  1254. $this->oldColumnsValues[assetParamsOutputPeer::HEIGHT] = $this->height;
  1255. if ($v !== null) {
  1256. $v = (int) $v;
  1257. }
  1258. if ($this->height !== $v || $this->isNew()) {
  1259. $this->height = $v;
  1260. $this->modifiedColumns[] = assetParamsOutputPeer::HEIGHT;
  1261. }
  1262. return $this;
  1263. } // setHeight()
  1264. /**
  1265. * Set the value of [frame_rate] column.
  1266. *
  1267. * @param double $v new value
  1268. * @return assetParamsOutput The current object (for fluent API support)
  1269. */
  1270. public function setFrameRate($v)
  1271. {
  1272. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::FRAME_RATE]))
  1273. $this->oldColumnsValues[assetParamsOutputPeer::FRAME_RATE] = $this->frame_rate;
  1274. if ($v !== null) {
  1275. $v = (double) $v;
  1276. }
  1277. if ($this->frame_rate !== $v) {
  1278. $this->frame_rate = $v;
  1279. $this->modifiedColumns[] = assetParamsOutputPeer::FRAME_RATE;
  1280. }
  1281. return $this;
  1282. } // setFrameRate()
  1283. /**
  1284. * Set the value of [gop_size] column.
  1285. *
  1286. * @param int $v new value
  1287. * @return assetParamsOutput The current object (for fluent API support)
  1288. */
  1289. public function setGopSize($v)
  1290. {
  1291. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::GOP_SIZE]))
  1292. $this->oldColumnsValues[assetParamsOutputPeer::GOP_SIZE] = $this->gop_size;
  1293. if ($v !== null) {
  1294. $v = (int) $v;
  1295. }
  1296. if ($this->gop_size !== $v || $this->isNew()) {
  1297. $this->gop_size = $v;
  1298. $this->modifiedColumns[] = assetParamsOutputPeer::GOP_SIZE;
  1299. }
  1300. return $this;
  1301. } // setGopSize()
  1302. /**
  1303. * Set the value of [two_pass] column.
  1304. *
  1305. * @param boolean $v new value
  1306. * @return assetParamsOutput The current object (for fluent API support)
  1307. */
  1308. public function setTwoPass($v)
  1309. {
  1310. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::TWO_PASS]))
  1311. $this->oldColumnsValues[assetParamsOutputPeer::TWO_PASS] = $this->two_pass;
  1312. if ($v !== null) {
  1313. $v = (boolean) $v;
  1314. }
  1315. if ($this->two_pass !== $v || $this->isNew()) {
  1316. $this->two_pass = $v;
  1317. $this->modifiedColumns[] = assetParamsOutputPeer::TWO_PASS;
  1318. }
  1319. return $this;
  1320. } // setTwoPass()
  1321. /**
  1322. * Set the value of [conversion_engines] column.
  1323. *
  1324. * @param string $v new value
  1325. * @return assetParamsOutput The current object (for fluent API support)
  1326. */
  1327. public function setConversionEngines($v)
  1328. {
  1329. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::CONVERSION_ENGINES]))
  1330. $this->oldColumnsValues[assetParamsOutputPeer::CONVERSION_ENGINES] = $this->conversion_engines;
  1331. if ($v !== null) {
  1332. $v = (string) $v;
  1333. }
  1334. if ($this->conversion_engines !== $v) {
  1335. $this->conversion_engines = $v;
  1336. $this->modifiedColumns[] = assetParamsOutputPeer::CONVERSION_ENGINES;
  1337. }
  1338. return $this;
  1339. } // setConversionEngines()
  1340. /**
  1341. * Set the value of [conversion_engines_extra_params] column.
  1342. *
  1343. * @param string $v new value
  1344. * @return assetParamsOutput The current object (for fluent API support)
  1345. */
  1346. public function setConversionEnginesExtraParams($v)
  1347. {
  1348. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::CONVERSION_ENGINES_EXTRA_PARAMS]))
  1349. $this->oldColumnsValues[assetParamsOutputPeer::CONVERSION_ENGINES_EXTRA_PARAMS] = $this->conversion_engines_extra_params;
  1350. if ($v !== null) {
  1351. $v = (string) $v;
  1352. }
  1353. if ($this->conversion_engines_extra_params !== $v) {
  1354. $this->conversion_engines_extra_params = $v;
  1355. $this->modifiedColumns[] = assetParamsOutputPeer::CONVERSION_ENGINES_EXTRA_PARAMS;
  1356. }
  1357. return $this;
  1358. } // setConversionEnginesExtraParams()
  1359. /**
  1360. * Set the value of [custom_data] column.
  1361. *
  1362. * @param string $v new value
  1363. * @return assetParamsOutput The current object (for fluent API support)
  1364. */
  1365. public function setCustomData($v)
  1366. {
  1367. if ($v !== null) {
  1368. $v = (string) $v;
  1369. }
  1370. if ($this->custom_data !== $v) {
  1371. $this->custom_data = $v;
  1372. $this->modifiedColumns[] = assetParamsOutputPeer::CUSTOM_DATA;
  1373. }
  1374. return $this;
  1375. } // setCustomData()
  1376. /**
  1377. * Set the value of [command_lines] column.
  1378. *
  1379. * @param string $v new value
  1380. * @return assetParamsOutput The current object (for fluent API support)
  1381. */
  1382. public function setCommandLines($v)
  1383. {
  1384. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::COMMAND_LINES]))
  1385. $this->oldColumnsValues[assetParamsOutputPeer::COMMAND_LINES] = $this->command_lines;
  1386. if ($v !== null) {
  1387. $v = (string) $v;
  1388. }
  1389. if ($this->command_lines !== $v) {
  1390. $this->command_lines = $v;
  1391. $this->modifiedColumns[] = assetParamsOutputPeer::COMMAND_LINES;
  1392. }
  1393. return $this;
  1394. } // setCommandLines()
  1395. /**
  1396. * Set the value of [file_ext] column.
  1397. *
  1398. * @param string $v new value
  1399. * @return assetParamsOutput The current object (for fluent API support)
  1400. */
  1401. public function setFileExt($v)
  1402. {
  1403. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::FILE_EXT]))
  1404. $this->oldColumnsValues[assetParamsOutputPeer::FILE_EXT] = $this->file_ext;
  1405. if ($v !== null) {
  1406. $v = (string) $v;
  1407. }
  1408. if ($this->file_ext !== $v) {
  1409. $this->file_ext = $v;
  1410. $this->modifiedColumns[] = assetParamsOutputPeer::FILE_EXT;
  1411. }
  1412. return $this;
  1413. } // setFileExt()
  1414. /**
  1415. * Set the value of [deinterlice] column.
  1416. *
  1417. * @param int $v new value
  1418. * @return assetParamsOutput The current object (for fluent API support)
  1419. */
  1420. public function setDeinterlice($v)
  1421. {
  1422. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::DEINTERLICE]))
  1423. $this->oldColumnsValues[assetParamsOutputPeer::DEINTERLICE] = $this->deinterlice;
  1424. if ($v !== null) {
  1425. $v = (int) $v;
  1426. }
  1427. if ($this->deinterlice !== $v) {
  1428. $this->deinterlice = $v;
  1429. $this->modifiedColumns[] = assetParamsOutputPeer::DEINTERLICE;
  1430. }
  1431. return $this;
  1432. } // setDeinterlice()
  1433. /**
  1434. * Set the value of [rotate] column.
  1435. *
  1436. * @param int $v new value
  1437. * @return assetParamsOutput The current object (for fluent API support)
  1438. */
  1439. public function setRotate($v)
  1440. {
  1441. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::ROTATE]))
  1442. $this->oldColumnsValues[assetParamsOutputPeer::ROTATE] = $this->rotate;
  1443. if ($v !== null) {
  1444. $v = (int) $v;
  1445. }
  1446. if ($this->rotate !== $v) {
  1447. $this->rotate = $v;
  1448. $this->modifiedColumns[] = assetParamsOutputPeer::ROTATE;
  1449. }
  1450. return $this;
  1451. } // setRotate()
  1452. /**
  1453. * Set the value of [operators] column.
  1454. *
  1455. * @param string $v new value
  1456. * @return assetParamsOutput The current object (for fluent API support)
  1457. */
  1458. public function setOperators($v)
  1459. {
  1460. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::OPERATORS]))
  1461. $this->oldColumnsValues[assetParamsOutputPeer::OPERATORS] = $this->operators;
  1462. if ($v !== null) {
  1463. $v = (string) $v;
  1464. }
  1465. if ($this->operators !== $v) {
  1466. $this->operators = $v;
  1467. $this->modifiedColumns[] = assetParamsOutputPeer::OPERATORS;
  1468. }
  1469. return $this;
  1470. } // setOperators()
  1471. /**
  1472. * Set the value of [engine_version] column.
  1473. *
  1474. * @param int $v new value
  1475. * @return assetParamsOutput The current object (for fluent API support)
  1476. */
  1477. public function setEngineVersion($v)
  1478. {
  1479. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::ENGINE_VERSION]))
  1480. $this->oldColumnsValues[assetParamsOutputPeer::ENGINE_VERSION] = $this->engine_version;
  1481. if ($v !== null) {
  1482. $v = (int) $v;
  1483. }
  1484. if ($this->engine_version !== $v) {
  1485. $this->engine_version = $v;
  1486. $this->modifiedColumns[] = assetParamsOutputPeer::ENGINE_VERSION;
  1487. }
  1488. return $this;
  1489. } // setEngineVersion()
  1490. /**
  1491. * Set the value of [type] column.
  1492. *
  1493. * @param int $v new value
  1494. * @return assetParamsOutput The current object (for fluent API support)
  1495. */
  1496. public function setType($v)
  1497. {
  1498. if(!isset($this->oldColumnsValues[assetParamsOutputPeer::TYPE]))
  1499. $this->oldColumnsValues[assetParamsOutputPeer::TYPE] = $this->type;
  1500. if ($v !== null) {
  1501. $v = (int) $v;
  1502. }
  1503. if ($this->type !== $v || $this->isNew()) {
  1504. $this->type = $v;
  1505. $this->modifiedColumns[] = assetParamsOutputPeer::TYPE;
  1506. }
  1507. return $this;
  1508. } // setType()
  1509. /**
  1510. * Indicates whether the columns in this object are only set to default values.
  1511. *
  1512. * This method can be used in conjunction with isModified() to indicate whether an object is both
  1513. * modified _and_ has some values set which are non-default.
  1514. *
  1515. * @return boolean Whether the columns in this object are only been set with default values.
  1516. */
  1517. public function hasOnlyDefaultValues()
  1518. {
  1519. if ($this->name !== '') {
  1520. return false;
  1521. }
  1522. if ($this->description !== '') {
  1523. return false;
  1524. }
  1525. if ($this->is_default !== 0) {
  1526. return false;
  1527. }
  1528. if ($this->video_bitrate !== 0) {
  1529. return false;
  1530. }
  1531. if ($this->width !== 0) {
  1532. return false;
  1533. }
  1534. if ($this->height !== 0) {
  1535. return false;
  1536. }
  1537. if ($this->gop_size !== 0) {
  1538. return false;
  1539. }
  1540. if ($this->two_pass !== false) {
  1541. return false;
  1542. }
  1543. if ($this->type !== 0) {
  1544. return false;
  1545. }
  1546. // otherwise, everything was equal, so return TRUE
  1547. return true;
  1548. } // hasOnlyDefaultValues()
  1549. /**
  1550. * Hydrates (populates) the object variables with values from the database resultset.
  1551. *
  1552. * An offset (0-based "start column") is specified so that objects can be hydrated
  1553. * with a subset of the columns in the resultset rows. This is needed, for example,
  1554. * for results of JOIN queries where the resultset row includes columns from two or
  1555. * more tables.
  1556. *
  1557. * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM)
  1558. * @param int $startcol 0-based offset column which indicates which restultset column to start with.
  1559. * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
  1560. * @return int next starting column
  1561. * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
  1562. */
  1563. public function hydrate($row, $startcol = 0, $rehydrate = false)
  1564. {
  1565. try {
  1566. $this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
  1567. $this->flavor_params_id = ($row[$startcol + 1] !== null) ? (int) $row[$startcol + 1] : null;
  1568. $this->flavor_params_version = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;
  1569. $this->partner_id = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
  1570. $this->entry_id = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
  1571. $this->flavor_asset_id = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
  1572. $this->flavor_asset_version = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
  1573. $this->name = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
  1574. $this->tags = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
  1575. $this->description = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
  1576. $this->ready_behavior = ($row[$startcol + 10] !== null) ? (int) $row[$startcol + 10] : null;
  1577. $this->created_at = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
  1578. $this->updated_at = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
  1579. $this->deleted_at = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
  1580. $this->is_default = ($row[$startcol + 14] !== null) ? (int) $row[$startcol + 14] : null;
  1581. $this->format = ($row[$startcol + 15] !== null) ? (string) $row[$startcol + 15] : null;
  1582. $this->video_codec = ($row[$startcol + 16] !== null) ? (string) $row[$startcol + 16] : null;
  1583. $this->video_bitrate = ($row[$startcol + 17] !== null) ? (int) $row[$startcol + 17] : null;
  1584. $this->audio_codec = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null;
  1585. $this->audio_bitrate = ($row[$startcol + 19] !== null) ? (int) $row[$startcol + 19] : null;
  1586. $this->audio_channels = ($row[$startcol + 20] !== null) ? (int) $row[$startcol + 20] : null;
  1587. $this->audio_sample_rate = ($row[$startcol + 21] !== null) ? (int) $row[$startcol + 21] : null;
  1588. $this->audio_resolution = ($row[$startcol + 22] !== null) ? (int) $row[$startcol + 22] : null;
  1589. $this->width = ($row[$startcol + 23] !== null) ? (int) $row[$startcol + 23] : null;
  1590. $this->height = ($row[$startcol + 24] !== null) ? (int) $row[$startcol + 24] : null;
  1591. $this->frame_rate = ($row[$startcol + 25] !== null) ? (double) $row[$startcol + 25] : null;
  1592. $this->gop_size = ($row[$startcol + 26] !== null) ? (int) $row[$startcol + 26] : null;
  1593. $this->two_pass = ($row[$startcol + 27] !== null) ? (boolean) $row[$startcol + 27] : null;
  1594. $this->conversion_engines = ($row[$startcol + 28] !== null) ? (string) $row[$startcol + 28] : null;
  1595. $this->conversion_engines_extra_params = ($row[$startcol + 29] !== null) ? (string) $row[$startcol + 29] : null;
  1596. $this->custom_data = ($row[$startcol + 30] !== null) ? (string) $row[$startcol + 30] : null;
  1597. $this->command_lines = ($row[$startcol + 31] !== null) ? (string) $row[$startcol + 31] : null;
  1598. $this->file_ext = ($row[$startcol + 32] !== null) ? (string) $row[$startcol + 32] : null;
  1599. $this->deinterlice = ($row[$startcol + 33] !== null) ? (int) $row[$startcol + 33] : null;
  1600. $this->rotate = ($row[$startcol + 34] !== null) ? (int) $row[$startcol + 34] : null;
  1601. $this->operators = ($row[$startcol + 35] !== null) ? (string) $row[$startcol + 35] : null;
  1602. $this->engine_version = ($row[$startcol + 36] !== null) ? (int) $row[$startcol + 36] : null;
  1603. $this->type = ($row[$startcol + 37] !== null) ? (int) $row[$startcol + 37] : null;
  1604. $this->resetModified();
  1605. $this->setNew(false);
  1606. if ($rehydrate) {
  1607. $this->ensureConsistency();
  1608. }
  1609. // FIXME - using NUM_COLUMNS may be clearer.
  1610. return $startcol + 38; // 38 = assetParamsOutputPeer::NUM_COLUMNS - assetParamsOutputPeer::NUM_LAZY_LOAD_COLUMNS).
  1611. } catch (Exception $e) {
  1612. throw new PropelException("Error populating assetParamsOutput object", $e);
  1613. }
  1614. }
  1615. /**
  1616. * Checks and repairs the internal consistency of the object.
  1617. *
  1618. * This method is executed after an already-instantiated object is re-hydrated
  1619. * from the database. It exists to check any foreign keys to make sure that
  1620. * the objects related to the current object are correct based on foreign key.
  1621. *
  1622. * You can override this method in the stub class, but you should always invoke
  1623. * the base method from the overridden method (i.e. parent::ensureConsistency()),
  1624. * in case your model changes.
  1625. *
  1626. * @throws PropelException
  1627. */
  1628. public function ensureConsistency()
  1629. {
  1630. if ($this->aassetParams !== null && $this->flavor_params_id !== $this->aassetParams->getId()) {
  1631. $this->aassetParams = null;
  1632. }
  1633. if ($this->aentry !== null && $this->entry_id !== $this->aentry->getId()) {
  1634. $this->aentry = null;
  1635. }
  1636. if ($this->aasset !== null && $this->flavor_asset_id !== $this->aasset->getId()) {
  1637. $this->aasset = null;
  1638. }
  1639. } // ensureConsistency
  1640. /**
  1641. * Reloads this object from datastore based on primary key and (optionally) resets all associated objects.
  1642. *
  1643. * This will only work if the object has been saved and has a valid primary key set.
  1644. *
  1645. * @param boolean $deep (optional) Whether to also de-associated any related objects.
  1646. * @param PropelPDO $con (optional) The PropelPDO connection to use.
  1647. * @return void
  1648. * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
  1649. */
  1650. public function reload($deep = false, PropelPDO $con = null)
  1651. {
  1652. if ($this->isDeleted()) {
  1653. throw new PropelException("Cannot reload a deleted object.");
  1654. }
  1655. if ($this->isNew()) {
  1656. throw new PropelException("Cannot reload an unsaved object.");
  1657. }
  1658. if ($con === null) {
  1659. $con = Propel::getConnection(assetParamsOutputPeer::DATABASE_NAME, Propel::CONNECTION_READ);
  1660. }
  1661. // We don't need to alter the object instance pool; we're just modifying this instance
  1662. // already in the pool.
  1663. assetParamsOutputPeer::setUseCriteriaFilter(false);
  1664. $stmt = assetParamsOutputPeer::doSelectStmt($this->buildPkeyCriteria(), $con);
  1665. assetParamsOutputPeer::setUseCriteriaFilter(true);
  1666. $row = $stmt->fetch(PDO::FETCH_NUM);
  1667. $stmt->closeCursor();
  1668. if (!$row) {
  1669. throw new PropelException('Cannot find matching row in the database to reload object values.');
  1670. }
  1671. $this->hydrate($row, 0, true); // rehydrate
  1672. if ($deep) { // also de-associate any related objects?
  1673. $this->aassetParams = null;
  1674. $this->aentry = null;
  1675. $this->aasset = null;
  1676. } // if (deep)
  1677. }
  1678. /**
  1679. * Removes this object from datastore and sets delete attribute.
  1680. *
  1681. * @param PropelPDO $con
  1682. * @return void
  1683. * @throws PropelException
  1684. * @see BaseObject::setDeleted()
  1685. * @see BaseObject::isDeleted()
  1686. */
  1687. public function delete(PropelPDO $con = null)
  1688. {
  1689. if ($this->isDeleted()) {
  1690. throw new PropelException("This object has already been deleted.");
  1691. }
  1692. if ($con === null) {
  1693. $con = Propel::getConnection(assetParamsOutputPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  1694. }
  1695. $con->beginTransaction();
  1696. try {
  1697. $ret = $this->preDelete($con);
  1698. if ($ret) {
  1699. assetParamsOutputPeer::doDelete($this, $con);
  1700. $this->postDelete($con);
  1701. $this->setDeleted(true);
  1702. $con->commit();
  1703. } else {
  1704. $con->commit();
  1705. }
  1706. } catch (PropelException $e) {
  1707. $con->rollBack();
  1708. throw $e;
  1709. }
  1710. }
  1711. /**
  1712. * Persists this object to the database.
  1713. *
  1714. * If the object is new, it inserts it; otherwise an update is performed.
  1715. * All modified related objects will also be persisted in the doSave()
  1716. * method. This method wraps all precipitate database operations in a
  1717. * single transaction.
  1718. *
  1719. * @param PropelPDO $con
  1720. * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
  1721. * @throws PropelException
  1722. * @see doSave()
  1723. */
  1724. public function save(PropelPDO $con = null)
  1725. {
  1726. if ($this->isDeleted()) {
  1727. throw new PropelException("You cannot save an object that has been deleted.");
  1728. }
  1729. if ($con === null) {
  1730. $con = Propel::getConnection(assetParamsOutputPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
  1731. }
  1732. $con->beginTransaction();
  1733. $isInsert = $this->isNew();
  1734. try {
  1735. $ret = $this->preSave($con);
  1736. if ($isInsert) {
  1737. $ret = $ret && $this->preInsert($con);
  1738. } else {
  1739. $ret = $ret && $this->preUpdate($con);
  1740. }
  1741. if ($ret) {
  1742. $affectedRows = $this->doSave($con);
  1743. if ($isInsert) {
  1744. $this->postInsert($con);
  1745. } else {
  1746. $this->postUpdate($con);
  1747. }
  1748. $this->postSave($con);
  1749. assetParamsOutputPeer::addInstanceToPool($this);
  1750. } else {
  1751. $affectedRows = 0;
  1752. }
  1753. $con->commit();
  1754. return $affectedRows;
  1755. } catch (PropelException $e) {
  1756. $con->rollBack();
  1757. throw $e;
  1758. }
  1759. }
  1760. /**
  1761. * Performs the work of inserting or updating the row in the database.
  1762. *
  1763. * If the object is new, it inserts it; otherwise an update is performed.
  1764. * All related objects are also updated in this method.
  1765. *
  1766. * @param PropelPDO $con
  1767. * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
  1768. * @throws PropelException
  1769. * @see save()
  1770. */
  1771. protected function doSave(PropelPDO $con)
  1772. {
  1773. $affectedRows = 0; // initialize var to track total num of affected rows
  1774. if (!$this->alreadyInSave) {
  1775. $this->alreadyInSave = true;
  1776. // We call the save method on the following object(s) if they
  1777. // were passed to this object by their coresponding set
  1778. // method. This object relates to these object(s) by a
  1779. // foreign key reference.
  1780. if ($this->aassetParams !== null) {
  1781. if ($this->aassetParams->isModified() || $this->aassetParams->isNew()) {
  1782. $affectedRows += $this->aassetParams->save($con);
  1783. }
  1784. $this->setassetParams($this->aassetParams);
  1785. }
  1786. if ($this->aentry !== null) {
  1787. if ($this->aentry->isModified() || $this->aentry->isNew()) {
  1788. $affectedRows += $this->aentry->save($con);
  1789. }
  1790. $this->setentry($this->aentry);
  1791. }
  1792. if ($this->aasset !== null) {
  1793. if ($this->aasset->isModified() || $this->aasset->isNew()) {
  1794. $affectedRows += $this->aasset->save($con);
  1795. }
  1796. $this->setasset($this->aasset);
  1797. }
  1798. if ($this->isNew() ) {
  1799. $this->modifiedColumns[] = assetParamsOutputPeer::ID;
  1800. }
  1801. // If this object has been modified, then save it to the database.
  1802. if ($this->isModified()) {
  1803. if ($this->isNew()) {
  1804. $pk = assetParamsOutputPeer::doInsert($this, $con);
  1805. $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
  1806. // should always be true here (even though technically
  1807. // BasePeer::doInsert() can insert multiple rows).
  1808. $this->setId($pk); //[IMV] update autoincrement primary key
  1809. $this->setNew(false);
  1810. } else {
  1811. $affectedRows += assetParamsOutputPeer::doUpdate($this, $con);
  1812. }
  1813. $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
  1814. }
  1815. $this->alreadyInSave = false;
  1816. }
  1817. return $affectedRows;
  1818. } // doSave()
  1819. /**
  1820. * Override in order to use the query cache.
  1821. * Cache invalidation keys are used to determine when cached queries are valid.
  1822. * Before returning a query result from the cache, the time of the cached query
  1823. * is compared to the time saved in the invalidation key.
  1824. * A cached query will only be used if it's newer than the matching invalidation key.
  1825. *
  1826. * @return array Array of keys that will should be updated when this object is modified.
  1827. */
  1828. public function getCacheInvalidationKeys()
  1829. {
  1830. return array();
  1831. }
  1832. /**
  1833. * Code to be run before persisting the object
  1834. * @param PropelPDO $con
  1835. * @return bloolean
  1836. */
  1837. public function preSave(PropelPDO $con = null)
  1838. {
  1839. $this->setCustomDataObj();
  1840. return parent::preSave($con);
  1841. }
  1842. /**
  1843. * Code to be run after persisting the object
  1844. * @param PropelPDO $con
  1845. */
  1846. public function postSave(PropelPDO $con = null)
  1847. {
  1848. $this->oldColumnsValues = array();
  1849. $this->oldCustomDataValues = array();
  1850. }
  1851. /**
  1852. * Code to be run before inserting to database
  1853. * @param PropelPDO $con
  1854. * @return boolean
  1855. */
  1856. public function preInsert(PropelPDO $con = null)
  1857. {
  1858. $this->setCreatedAt(time());
  1859. $this->setUpdatedAt(time());
  1860. return true;
  1861. }
  1862. /**
  1863. * Code to be run after inserting to database
  1864. * @param PropelPDO $con
  1865. */
  1866. public function postInsert(PropelPDO $con = null)
  1867. {
  1868. kQueryCache::invalidateQueryCache($this);
  1869. kEventsManager::raiseEvent(new kObjectCreatedEvent($this));
  1870. if($this->copiedFrom)
  1871. kEventsManager::raiseEvent(new kObjectCopiedEvent($this->copiedFrom, $this));
  1872. }
  1873. /**
  1874. * Code to be run after updating the object in database
  1875. * @param PropelPDO $con
  1876. */
  1877. public function postUpdate(PropelPDO $con = null)
  1878. {
  1879. if ($this->alreadyInSave)
  1880. {
  1881. return;
  1882. }
  1883. if($this->isModified())
  1884. {
  1885. kQueryCache::invalidateQueryCache($this);
  1886. kEventsManager::raiseEvent(new kObjectChangedEvent($this, $this->tempModifiedColumns));
  1887. }
  1888. $this->tempModifiedColumns = array();
  1889. }
  1890. /**
  1891. * Saves the modified columns temporarily while saving
  1892. * @var array
  1893. */
  1894. private $tempModifiedColumns = array();
  1895. /**
  1896. * Returns whether the object has been modified.
  1897. *
  1898. * @return boolean True if the object has been modified.
  1899. */
  1900. public function isModified()
  1901. {
  1902. if(!empty($this->tempModifiedColumns))
  1903. return true;
  1904. return !empty($this->modifiedColumns);
  1905. }
  1906. /**
  1907. * Has specified column been modified?
  1908. *
  1909. * @param string $col
  1910. * @return boolean True if $col has been modified.
  1911. */
  1912. public function isColumnModified($col)
  1913. {
  1914. if(in_array($col, $this->tempModifiedColumns))
  1915. return true;
  1916. return in_array($col, $this->modifiedColumns);
  1917. }
  1918. /**
  1919. * Code to be run before updating the object in database
  1920. * @param PropelPDO $con
  1921. * @return boolean
  1922. */
  1923. public function preUpdate(PropelPDO $con = null)
  1924. {
  1925. if ($this->alreadyInSave)
  1926. {
  1927. return true;
  1928. }
  1929. if($this->isModified())
  1930. $this->setUpdatedAt(time());
  1931. $this->tempModifiedColumns = $this->modifiedColumns;
  1932. return true;
  1933. }
  1934. /**
  1935. * Array of ValidationFailed objects.
  1936. * @var array ValidationFailed[]
  1937. */
  1938. protected $validationFailures = array();
  1939. /**
  1940. * Gets any ValidationFailed objects that resulted from last call to validate().
  1941. *
  1942. *
  1943. * @return array ValidationFailed[]
  1944. * @see validate()
  1945. */
  1946. public function getValidationFailures()
  1947. {
  1948. return $this->validationFailures;
  1949. }
  1950. /**
  1951. * Validates the objects modified field values and all objects related to this table.
  1952. *
  1953. * If $columns is either a column name or an array of column names
  1954. * only those columns are validated.
  1955. *
  1956. * @param mixed $columns Column name or an array of column names.
  1957. * @return boolean Whether all columns pass validation.
  1958. * @see doValidate()
  1959. * @see getValidationFailures()
  1960. */
  1961. public function validate($columns = null)
  1962. {
  1963. $res = $this->doValidate($columns);
  1964. if ($res === true) {
  1965. $this->validationFailures = array();
  1966. return true;
  1967. } else {
  1968. $this->validationFailures = $res;
  1969. return false;
  1970. }
  1971. }
  1972. /**
  1973. * This function performs the validation work for complex object models.
  1974. *
  1975. * In addition to checking the current object, all related objects will
  1976. * also be validated. If all pass then <code>true</code> is returned; otherwise
  1977. * an aggreagated array of ValidationFailed objects will be returned.
  1978. *
  1979. * @param array $columns Array of column names to validate.
  1980. * @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
  1981. */
  1982. protected function doValidate($columns = null)
  1983. {
  1984. if (!$this->alreadyInValidation) {
  1985. $this->alreadyInValidation = true;
  1986. $retval = null;
  1987. $failureMap = array();
  1988. // We call the validate method on the following object(s) if they
  1989. // were passed to this object by their coresponding set
  1990. // method. This object relates to these object(s) by a
  1991. // foreign key reference.
  1992. if ($this->aassetParams !== null) {
  1993. if (!$this->aassetParams->validate($columns)) {
  1994. $failureMap = array_merge($failureMap, $this->aassetParams->getValidationFailures());
  1995. }
  1996. }
  1997. if ($this->aentry !== null) {
  1998. if (!$this->aentry->validate($columns)) {
  1999. $failureMap = array_merge($failureMap, $this->aentry->getValidationFailures());
  2000. }
  2001. }
  2002. if ($this->aasset !== null) {
  2003. if (!$this->aasset->validate($columns)) {
  2004. $failureMap = array_merge($failureMap, $this->aasset->getValidationFailures());
  2005. }
  2006. }
  2007. if (($retval = assetParamsOutputPeer::doValidate($this, $columns)) !== true) {
  2008. $failureMap = array_merge($failureMap, $retval);
  2009. }
  2010. $this->alreadyInValidation = false;
  2011. }
  2012. return (!empty($failureMap) ? $failureMap : true);
  2013. }
  2014. /**
  2015. * Retrieves a field from the object by name passed in as a string.
  2016. *
  2017. * @param string $name name
  2018. * @param string $type The type of fieldname the $name is of:
  2019. * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  2020. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  2021. * @return mixed Value of field.
  2022. */
  2023. public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
  2024. {
  2025. $pos = assetParamsOutputPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
  2026. $field = $this->getByPosition($pos);
  2027. return $field;
  2028. }
  2029. /**
  2030. * Retrieves a field from the object by Position as specified in the xml schema.
  2031. * Zero-based.
  2032. *
  2033. * @param int $pos position in xml schema
  2034. * @return mixed Value of field at $pos
  2035. */
  2036. public function getByPosition($pos)
  2037. {
  2038. switch($pos) {
  2039. case 0:
  2040. return $this->getId();
  2041. break;
  2042. case 1:
  2043. return $this->getFlavorParamsId();
  2044. break;
  2045. case 2:
  2046. return $this->getFlavorParamsVersion();
  2047. break;
  2048. case 3:
  2049. return $this->getPartnerId();
  2050. break;
  2051. case 4:
  2052. return $this->getEntryId();
  2053. break;
  2054. case 5:
  2055. return $this->getFlavorAssetId();
  2056. break;
  2057. case 6:
  2058. return $this->getFlavorAssetVersion();
  2059. break;
  2060. case 7:
  2061. return $this->getName();
  2062. break;
  2063. case 8:
  2064. return $this->getTags();
  2065. break;
  2066. case 9:
  2067. return $this->getDescription();
  2068. break;
  2069. case 10:
  2070. return $this->getReadyBehavior();
  2071. break;
  2072. case 11:
  2073. return $this->getCreatedAt();
  2074. break;
  2075. case 12:
  2076. return $this->getUpdatedAt();
  2077. break;
  2078. case 13:
  2079. return $this->getDeletedAt();
  2080. break;
  2081. case 14:
  2082. return $this->getIsDefault();
  2083. break;
  2084. case 15:
  2085. return $this->getFormat();
  2086. break;
  2087. case 16:
  2088. return $this->getVideoCodec();
  2089. break;
  2090. case 17:
  2091. return $this->getVideoBitrate();
  2092. break;
  2093. case 18:
  2094. return $this->getAudioCodec();
  2095. break;
  2096. case 19:
  2097. return $this->getAudioBitrate();
  2098. break;
  2099. case 20:
  2100. return $this->getAudioChannels();
  2101. break;
  2102. case 21:
  2103. return $this->getAudioSampleRate();
  2104. break;
  2105. case 22:
  2106. return $this->getAudioResolution();
  2107. break;
  2108. case 23:
  2109. return $this->getWidth();
  2110. break;
  2111. case 24:
  2112. return $this->getHeight();
  2113. break;
  2114. case 25:
  2115. return $this->getFrameRate();
  2116. break;
  2117. case 26:
  2118. return $this->getGopSize();
  2119. break;
  2120. case 27:
  2121. return $this->getTwoPass();
  2122. break;
  2123. case 28:
  2124. return $this->getConversionEngines();
  2125. break;
  2126. case 29:
  2127. return $this->getConversionEnginesExtraParams();
  2128. break;
  2129. case 30:
  2130. return $this->getCustomData();
  2131. break;
  2132. case 31:
  2133. return $this->getCommandLines();
  2134. break;
  2135. case 32:
  2136. return $this->getFileExt();
  2137. break;
  2138. case 33:
  2139. return $this->getDeinterlice();
  2140. break;
  2141. case 34:
  2142. return $this->getRotate();
  2143. break;
  2144. case 35:
  2145. return $this->getOperators();
  2146. break;
  2147. case 36:
  2148. return $this->getEngineVersion();
  2149. break;
  2150. case 37:
  2151. return $this->getType();
  2152. break;
  2153. default:
  2154. return null;
  2155. break;
  2156. } // switch()
  2157. }
  2158. /**
  2159. * Exports the object as an array.
  2160. *
  2161. * You can specify the key type of the array by passing one of the class
  2162. * type constants.
  2163. *
  2164. * @param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  2165. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. Defaults to BasePeer::TYPE_PHPNAME.
  2166. * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
  2167. * @return an associative array containing the field names (as keys) and field values
  2168. */
  2169. public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true)
  2170. {
  2171. $keys = assetParamsOutputPeer::getFieldNames($keyType);
  2172. $result = array(
  2173. $keys[0] => $this->getId(),
  2174. $keys[1] => $this->getFlavorParamsId(),
  2175. $keys[2] => $this->getFlavorParamsVersion(),
  2176. $keys[3] => $this->getPartnerId(),
  2177. $keys[4] => $this->getEntryId(),
  2178. $keys[5] => $this->getFlavorAssetId(),
  2179. $keys[6] => $this->getFlavorAssetVersion(),
  2180. $keys[7] => $this->getName(),
  2181. $keys[8] => $this->getTags(),
  2182. $keys[9] => $this->getDescription(),
  2183. $keys[10] => $this->getReadyBehavior(),
  2184. $keys[11] => $this->getCreatedAt(),
  2185. $keys[12] => $this->getUpdatedAt(),
  2186. $keys[13] => $this->getDeletedAt(),
  2187. $keys[14] => $this->getIsDefault(),
  2188. $keys[15] => $this->getFormat(),
  2189. $keys[16] => $this->getVideoCodec(),
  2190. $keys[17] => $this->getVideoBitrate(),
  2191. $keys[18] => $this->getAudioCodec(),
  2192. $keys[19] => $this->getAudioBitrate(),
  2193. $keys[20] => $this->getAudioChannels(),
  2194. $keys[21] => $this->getAudioSampleRate(),
  2195. $keys[22] => $this->getAudioResolution(),
  2196. $keys[23] => $this->getWidth(),
  2197. $keys[24] => $this->getHeight(),
  2198. $keys[25] => $this->getFrameRate(),
  2199. $keys[26] => $this->getGopSize(),
  2200. $keys[27] => $this->getTwoPass(),
  2201. $keys[28] => $this->getConversionEngines(),
  2202. $keys[29] => $this->getConversionEnginesExtraParams(),
  2203. $keys[30] => $this->getCustomData(),
  2204. $keys[31] => $this->getCommandLines(),
  2205. $keys[32] => $this->getFileExt(),
  2206. $keys[33] => $this->getDeinterlice(),
  2207. $keys[34] => $this->getRotate(),
  2208. $keys[35] => $this->getOperators(),
  2209. $keys[36] => $this->getEngineVersion(),
  2210. $keys[37] => $this->getType(),
  2211. );
  2212. return $result;
  2213. }
  2214. /**
  2215. * Sets a field from the object by name passed in as a string.
  2216. *
  2217. * @param string $name peer name
  2218. * @param mixed $value field value
  2219. * @param string $type The type of fieldname the $name is of:
  2220. * one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
  2221. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
  2222. * @return void
  2223. */
  2224. public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
  2225. {
  2226. $pos = assetParamsOutputPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
  2227. return $this->setByPosition($pos, $value);
  2228. }
  2229. /**
  2230. * Sets a field from the object by Position as specified in the xml schema.
  2231. * Zero-based.
  2232. *
  2233. * @param int $pos position in xml schema
  2234. * @param mixed $value field value
  2235. * @return void
  2236. */
  2237. public function setByPosition($pos, $value)
  2238. {
  2239. switch($pos) {
  2240. case 0:
  2241. $this->setId($value);
  2242. break;
  2243. case 1:
  2244. $this->setFlavorParamsId($value);
  2245. break;
  2246. case 2:
  2247. $this->setFlavorParamsVersion($value);
  2248. break;
  2249. case 3:
  2250. $this->setPartnerId($value);
  2251. break;
  2252. case 4:
  2253. $this->setEntryId($value);
  2254. break;
  2255. case 5:
  2256. $this->setFlavorAssetId($value);
  2257. break;
  2258. case 6:
  2259. $this->setFlavorAssetVersion($value);
  2260. break;
  2261. case 7:
  2262. $this->setName($value);
  2263. break;
  2264. case 8:
  2265. $this->setTags($value);
  2266. break;
  2267. case 9:
  2268. $this->setDescription($value);
  2269. break;
  2270. case 10:
  2271. $this->setReadyBehavior($value);
  2272. break;
  2273. case 11:
  2274. $this->setCreatedAt($value);
  2275. break;
  2276. case 12:
  2277. $this->setUpdatedAt($value);
  2278. break;
  2279. case 13:
  2280. $this->setDeletedAt($value);
  2281. break;
  2282. case 14:
  2283. $this->setIsDefault($value);
  2284. break;
  2285. case 15:
  2286. $this->setFormat($value);
  2287. break;
  2288. case 16:
  2289. $this->setVideoCodec($value);
  2290. break;
  2291. case 17:
  2292. $this->setVideoBitrate($value);
  2293. break;
  2294. case 18:
  2295. $this->setAudioCodec($value);
  2296. break;
  2297. case 19:
  2298. $this->setAudioBitrate($value);
  2299. break;
  2300. case 20:
  2301. $this->setAudioChannels($value);
  2302. break;
  2303. case 21:
  2304. $this->setAudioSampleRate($value);
  2305. break;
  2306. case 22:
  2307. $this->setAudioResolution($value);
  2308. break;
  2309. case 23:
  2310. $this->setWidth($value);
  2311. break;
  2312. case 24:
  2313. $this->setHeight($value);
  2314. break;
  2315. case 25:
  2316. $this->setFrameRate($value);
  2317. break;
  2318. case 26:
  2319. $this->setGopSize($value);
  2320. break;
  2321. case 27:
  2322. $this->setTwoPass($value);
  2323. break;
  2324. case 28:
  2325. $this->setConversionEngines($value);
  2326. break;
  2327. case 29:
  2328. $this->setConversionEnginesExtraParams($value);
  2329. break;
  2330. case 30:
  2331. $this->setCustomData($value);
  2332. break;
  2333. case 31:
  2334. $this->setCommandLines($value);
  2335. break;
  2336. case 32:
  2337. $this->setFileExt($value);
  2338. break;
  2339. case 33:
  2340. $this->setDeinterlice($value);
  2341. break;
  2342. case 34:
  2343. $this->setRotate($value);
  2344. break;
  2345. case 35:
  2346. $this->setOperators($value);
  2347. break;
  2348. case 36:
  2349. $this->setEngineVersion($value);
  2350. break;
  2351. case 37:
  2352. $this->setType($value);
  2353. break;
  2354. } // switch()
  2355. }
  2356. /**
  2357. * Populates the object using an array.
  2358. *
  2359. * This is particularly useful when populating an object from one of the
  2360. * request arrays (e.g. $_POST). This method goes through the column
  2361. * names, checking to see whether a matching key exists in populated
  2362. * array. If so the setByName() method is called for that column.
  2363. *
  2364. * You can specify the key type of the array by additionally passing one
  2365. * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  2366. * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  2367. * The default key type is the column's phpname (e.g. 'AuthorId')
  2368. *
  2369. * @param array $arr An array to populate the object from.
  2370. * @param string $keyType The type of keys the array uses.
  2371. * @return void
  2372. */
  2373. public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
  2374. {
  2375. $keys = assetParamsOutputPeer::getFieldNames($keyType);
  2376. if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
  2377. if (array_key_exists($keys[1], $arr)) $this->setFlavorParamsId($arr[$keys[1]]);
  2378. if (array_key_exists($keys[2], $arr)) $this->setFlavorParamsVersion($arr[$keys[2]]);
  2379. if (array_key_exists($keys[3], $arr)) $this->setPartnerId($arr[$keys[3]]);
  2380. if (array_key_exists($keys[4], $arr)) $this->setEntryId($arr[$keys[4]]);
  2381. if (array_key_exists($keys[5], $arr)) $this->setFlavorAssetId($arr[$keys[5]]);
  2382. if (array_key_exists($keys[6], $arr)) $this->setFlavorAssetVersion($arr[$keys[6]]);
  2383. if (array_key_exists($keys[7], $arr)) $this->setName($arr[$keys[7]]);
  2384. if (array_key_exists($keys[8], $arr)) $this->setTags($arr[$keys[8]]);
  2385. if (array_key_exists($keys[9], $arr)) $this->setDescription($arr[$keys[9]]);
  2386. if (array_key_exists($keys[10], $arr)) $this->setReadyBehavior($arr[$keys[10]]);
  2387. if (array_key_exists($keys[11], $arr)) $this->setCreatedAt($arr[$keys[11]]);
  2388. if (array_key_exists($keys[12], $arr)) $this->setUpdatedAt($arr[$keys[12]]);
  2389. if (array_key_exists($keys[13], $arr)) $this->setDeletedAt($arr[$keys[13]]);
  2390. if (array_key_exists($keys[14], $arr)) $this->setIsDefault($arr[$keys[14]]);
  2391. if (array_key_exists($keys[15], $arr)) $this->setFormat($arr[$keys[15]]);
  2392. if (array_key_exists($keys[16], $arr)) $this->setVideoCodec($arr[$keys[16]]);
  2393. if (array_key_exists($keys[17], $arr)) $this->setVideoBitrate($arr[$keys[17]]);
  2394. if (array_key_exists($keys[18], $arr)) $this->setAudioCodec($arr[$keys[18]]);
  2395. if (array_key_exists($keys[19], $arr)) $this->setAudioBitrate($arr[$keys[19]]);
  2396. if (array_key_exists($keys[20], $arr)) $this->setAudioChannels($arr[$keys[20]]);
  2397. if (array_key_exists($keys[21], $arr)) $this->setAudioSampleRate($arr[$keys[21]]);
  2398. if (array_key_exists($keys[22], $arr)) $this->setAudioResolution($arr[$keys[22]]);
  2399. if (array_key_exists($keys[23], $arr)) $this->setWidth($arr[$keys[23]]);
  2400. if (array_key_exists($keys[24], $arr)) $this->setHeight($arr[$keys[24]]);
  2401. if (array_key_exists($keys[25], $arr)) $this->setFrameRate($arr[$keys[25]]);
  2402. if (array_key_exists($keys[26], $arr)) $this->setGopSize($arr[$keys[26]]);
  2403. if (array_key_exists($keys[27], $arr)) $this->setTwoPass($arr[$keys[27]]);
  2404. if (array_key_exists($keys[28], $arr)) $this->setConversionEngines($arr[$keys[28]]);
  2405. if (array_key_exists($keys[29], $arr)) $this->setConversionEnginesExtraParams($arr[$keys[29]]);
  2406. if (array_key_exists($keys[30], $arr)) $this->setCustomData($arr[$keys[30]]);
  2407. if (array_key_exists($keys[31], $arr)) $this->setCommandLines($arr[$keys[31]]);
  2408. if (array_key_exists($keys[32], $arr)) $this->setFileExt($arr[$keys[32]]);
  2409. if (array_key_exists($keys[33], $arr)) $this->setDeinterlice($arr[$keys[33]]);
  2410. if (array_key_exists($keys[34], $arr)) $this->setRotate($arr[$keys[34]]);
  2411. if (array_key_exists($keys[35], $arr)) $this->setOperators($arr[$keys[35]]);
  2412. if (array_key_exists($keys[36], $arr)) $this->setEngineVersion($arr[$keys[36]]);
  2413. if (array_key_exists($keys[37], $arr)) $this->setType($arr[$keys[37]]);
  2414. }
  2415. /**
  2416. * Build a Criteria object containing the values of all modified columns in this object.
  2417. *
  2418. * @return Criteria The Criteria object containing all modified values.
  2419. */
  2420. public function buildCriteria()
  2421. {
  2422. $criteria = new Criteria(assetParamsOutputPeer::DATABASE_NAME);
  2423. if ($this->isColumnModified(assetParamsOutputPeer::ID)) $criteria->add(assetParamsOutputPeer::ID, $this->id);
  2424. if ($this->isColumnModified(assetParamsOutputPeer::FLAVOR_PARAMS_ID)) $criteria->add(assetParamsOutputPeer::FLAVOR_PARAMS_ID, $this->flavor_params_id);
  2425. if ($this->isColumnModified(assetParamsOutputPeer::FLAVOR_PARAMS_VERSION)) $criteria->add(assetParamsOutputPeer::FLAVOR_PARAMS_VERSION, $this->flavor_params_version);
  2426. if ($this->isColumnModified(assetParamsOutputPeer::PARTNER_ID)) $criteria->add(assetParamsOutputPeer::PARTNER_ID, $this->partner_id);
  2427. if ($this->isColumnModified(assetParamsOutputPeer::ENTRY_ID)) $criteria->add(assetParamsOutputPeer::ENTRY_ID, $this->entry_id);
  2428. if ($this->isColumnModified(assetParamsOutputPeer::FLAVOR_ASSET_ID)) $criteria->add(assetParamsOutputPeer::FLAVOR_ASSET_ID, $this->flavor_asset_id);
  2429. if ($this->isColumnModified(assetParamsOutputPeer::FLAVOR_ASSET_VERSION)) $criteria->add(assetParamsOutputPeer::FLAVOR_ASSET_VERSION, $this->flavor_asset_version);
  2430. if ($this->isColumnModified(assetParamsOutputPeer::NAME)) $criteria->add(assetParamsOutputPeer::NAME, $this->name);
  2431. if ($this->isColumnModified(assetParamsOutputPeer::TAGS)) $criteria->add(assetParamsOutputPeer::TAGS, $this->tags);
  2432. if ($this->isColumnModified(assetParamsOutputPeer::DESCRIPTION)) $criteria->add(assetParamsOutputPeer::DESCRIPTION, $this->description);
  2433. if ($this->isColumnModified(assetParamsOutputPeer::READY_BEHAVIOR)) $criteria->add(assetParamsOutputPeer::READY_BEHAVIOR, $this->ready_behavior);
  2434. if ($this->isColumnModified(assetParamsOutputPeer::CREATED_AT)) $criteria->add(assetParamsOutputPeer::CREATED_AT, $this->created_at);
  2435. if ($this->isColumnModified(assetParamsOutputPeer::UPDATED_AT)) $criteria->add(assetParamsOutputPeer::UPDATED_AT, $this->updated_at);
  2436. if ($this->isColumnModified(assetParamsOutputPeer::DELETED_AT)) $criteria->add(assetParamsOutputPeer::DELETED_AT, $this->deleted_at);
  2437. if ($this->isColumnModified(assetParamsOutputPeer::IS_DEFAULT)) $criteria->add(assetParamsOutputPeer::IS_DEFAULT, $this->is_default);
  2438. if ($this->isColumnModified(assetParamsOutputPeer::FORMAT)) $criteria->add(assetParamsOutputPeer::FORMAT, $this->format);
  2439. if ($this->isColumnModified(assetParamsOutputPeer::VIDEO_CODEC)) $criteria->add(assetParamsOutputPeer::VIDEO_CODEC, $this->video_codec);
  2440. if ($this->isColumnModified(assetParamsOutputPeer::VIDEO_BITRATE)) $criteria->add(assetParamsOutputPeer::VIDEO_BITRATE, $this->video_bitrate);
  2441. if ($this->isColumnModified(assetParamsOutputPeer::AUDIO_CODEC)) $criteria->add(assetParamsOutputPeer::AUDIO_CODEC, $this->audio_codec);
  2442. if ($this->isColumnModified(assetParamsOutputPeer::AUDIO_BITRATE)) $criteria->add(assetParamsOutputPeer::AUDIO_BITRATE, $this->audio_bitrate);
  2443. if ($this->isColumnModified(assetParamsOutputPeer::AUDIO_CHANNELS)) $criteria->add(assetParamsOutputPeer::AUDIO_CHANNELS, $this->audio_channels);
  2444. if ($this->isColumnModified(assetParamsOutputPeer::AUDIO_SAMPLE_RATE)) $criteria->add(assetParamsOutputPeer::AUDIO_SAMPLE_RATE, $this->audio_sample_rate);
  2445. if ($this->isColumnModified(assetParamsOutputPeer::AUDIO_RESOLUTION)) $criteria->add(assetParamsOutputPeer::AUDIO_RESOLUTION, $this->audio_resolution);
  2446. if ($this->isColumnModified(assetParamsOutputPeer::WIDTH)) $criteria->add(assetParamsOutputPeer::WIDTH, $this->width);
  2447. if ($this->isColumnModified(assetParamsOutputPeer::HEIGHT)) $criteria->add(assetParamsOutputPeer::HEIGHT, $this->height);
  2448. if ($this->isColumnModified(assetParamsOutputPeer::FRAME_RATE)) $criteria->add(assetParamsOutputPeer::FRAME_RATE, $this->frame_rate);
  2449. if ($this->isColumnModified(assetParamsOutputPeer::GOP_SIZE)) $criteria->add(assetParamsOutputPeer::GOP_SIZE, $this->gop_size);
  2450. if ($this->isColumnModified(assetParamsOutputPeer::TWO_PASS)) $criteria->add(assetParamsOutputPeer::TWO_PASS, $this->two_pass);
  2451. if ($this->isColumnModified(assetParamsOutputPeer::CONVERSION_ENGINES)) $criteria->add(assetParamsOutputPeer::CONVERSION_ENGINES, $this->conversion_engines);
  2452. if ($this->isColumnModified(assetParamsOutputPeer::CONVERSION_ENGINES_EXTRA_PARAMS)) $criteria->add(assetParamsOutputPeer::CONVERSION_ENGINES_EXTRA_PARAMS, $this->conversion_engines_extra_params);
  2453. if ($this->isColumnModified(assetParamsOutputPeer::CUSTOM_DATA)) $criteria->add(assetParamsOutputPeer::CUSTOM_DATA, $this->custom_data);
  2454. if ($this->isColumnModified(assetParamsOutputPeer::COMMAND_LINES)) $criteria->add(assetParamsOutputPeer::COMMAND_LINES, $this->command_lines);
  2455. if ($this->isColumnModified(assetParamsOutputPeer::FILE_EXT)) $criteria->add(assetParamsOutputPeer::FILE_EXT, $this->file_ext);
  2456. if ($this->isColumnModified(assetParamsOutputPeer::DEINTERLICE)) $criteria->add(assetParamsOutputPeer::DEINTERLICE, $this->deinterlice);
  2457. if ($this->isColumnModified(assetParamsOutputPeer::ROTATE)) $criteria->add(assetParamsOutputPeer::ROTATE, $this->rotate);
  2458. if ($this->isColumnModified(assetParamsOutputPeer::OPERATORS)) $criteria->add(assetParamsOutputPeer::OPERATORS, $this->operators);
  2459. if ($this->isColumnModified(assetParamsOutputPeer::ENGINE_VERSION)) $criteria->add(assetParamsOutputPeer::ENGINE_VERSION, $this->engine_version);
  2460. if ($this->isColumnModified(assetParamsOutputPeer::TYPE)) $criteria->add(assetParamsOutputPeer::TYPE, $this->type);
  2461. return $criteria;
  2462. }
  2463. /**
  2464. * Builds a Criteria object containing the primary key for this object.
  2465. *
  2466. * Unlike buildCriteria() this method includes the primary key values regardless
  2467. * of whether or not they have been modified.
  2468. *
  2469. * @return Criteria The Criteria object containing value(s) for primary key(s).
  2470. */
  2471. public function buildPkeyCriteria()
  2472. {
  2473. $criteria = new Criteria(assetParamsOutputPeer::DATABASE_NAME);
  2474. $criteria->add(assetParamsOutputPeer::ID, $this->id);
  2475. return $criteria;
  2476. }
  2477. /**
  2478. * Returns the primary key for this object (row).
  2479. * @return int
  2480. */
  2481. public function getPrimaryKey()
  2482. {
  2483. return $this->getId();
  2484. }
  2485. /**
  2486. * Generic method to set the primary key (id column).
  2487. *
  2488. * @param int $key Primary key.
  2489. * @return void
  2490. */
  2491. public function setPrimaryKey($key)
  2492. {
  2493. $this->setId($key);
  2494. }
  2495. /**
  2496. * Sets contents of passed object to values from current object.
  2497. *
  2498. * If desired, this method can also make copies of all associated (fkey referrers)
  2499. * objects.
  2500. *
  2501. * @param object $copyObj An object of assetParamsOutput (or compatible) type.
  2502. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  2503. * @throws PropelException
  2504. */
  2505. public function copyInto($copyObj, $deepCopy = false)
  2506. {
  2507. $copyObj->setFlavorParamsId($this->flavor_params_id);
  2508. $copyObj->setFlavorParamsVersion($this->flavor_params_version);
  2509. $copyObj->setPartnerId($this->partner_id);
  2510. $copyObj->setEntryId($this->entry_id);
  2511. $copyObj->setFlavorAssetId($this->flavor_asset_id);
  2512. $copyObj->setFlavorAssetVersion($this->flavor_asset_version);
  2513. $copyObj->setName($this->name);
  2514. $copyObj->setTags($this->tags);
  2515. $copyObj->setDescription($this->description);
  2516. $copyObj->setReadyBehavior($this->ready_behavior);
  2517. $copyObj->setCreatedAt($this->created_at);
  2518. $copyObj->setUpdatedAt($this->updated_at);
  2519. $copyObj->setDeletedAt($this->deleted_at);
  2520. $copyObj->setIsDefault($this->is_default);
  2521. $copyObj->setFormat($this->format);
  2522. $copyObj->setVideoCodec($this->video_codec);
  2523. $copyObj->setVideoBitrate($this->video_bitrate);
  2524. $copyObj->setAudioCodec($this->audio_codec);
  2525. $copyObj->setAudioBitrate($this->audio_bitrate);
  2526. $copyObj->setAudioChannels($this->audio_channels);
  2527. $copyObj->setAudioSampleRate($this->audio_sample_rate);
  2528. $copyObj->setAudioResolution($this->audio_resolution);
  2529. $copyObj->setWidth($this->width);
  2530. $copyObj->setHeight($this->height);
  2531. $copyObj->setFrameRate($this->frame_rate);
  2532. $copyObj->setGopSize($this->gop_size);
  2533. $copyObj->setTwoPass($this->two_pass);
  2534. $copyObj->setConversionEngines($this->conversion_engines);
  2535. $copyObj->setConversionEnginesExtraParams($this->conversion_engines_extra_params);
  2536. $copyObj->setCustomData($this->custom_data);
  2537. $copyObj->setCommandLines($this->command_lines);
  2538. $copyObj->setFileExt($this->file_ext);
  2539. $copyObj->setDeinterlice($this->deinterlice);
  2540. $copyObj->setRotate($this->rotate);
  2541. $copyObj->setOperators($this->operators);
  2542. $copyObj->setEngineVersion($this->engine_version);
  2543. $copyObj->setType($this->type);
  2544. $copyObj->setNew(true);
  2545. $copyObj->setId(NULL); // this is a auto-increment column, so set to default value
  2546. }
  2547. /**
  2548. * Makes a copy of this object that will be inserted as a new row in table when saved.
  2549. * It creates a new object filling in the simple attributes, but skipping any primary
  2550. * keys that are defined for the table.
  2551. *
  2552. * If desired, this method can also make copies of all associated (fkey referrers)
  2553. * objects.
  2554. *
  2555. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  2556. * @return assetParamsOutput Clone of current object.
  2557. * @throws PropelException
  2558. */
  2559. public function copy($deepCopy = false)
  2560. {
  2561. // we use get_class(), because this might be a subclass
  2562. $clazz = get_class($this);
  2563. $copyObj = new $clazz();
  2564. $this->copyInto($copyObj, $deepCopy);
  2565. $copyObj->setCopiedFrom($this);
  2566. return $copyObj;
  2567. }
  2568. /**
  2569. * Stores the source object that this object copied from
  2570. *
  2571. * @var assetParamsOutput Clone of current object.
  2572. */
  2573. protected $copiedFrom = null;
  2574. /**
  2575. * Stores the source object that this object copied from
  2576. *
  2577. * @param assetParamsOutput $copiedFrom Clone of current object.
  2578. */
  2579. public function setCopiedFrom(assetParamsOutput $copiedFrom)
  2580. {
  2581. $this->copiedFrom = $copiedFrom;
  2582. }
  2583. /**
  2584. * Returns a peer instance associated with this om.
  2585. *
  2586. * Since Peer classes are not to have any instance attributes, this method returns the
  2587. * same instance for all member of this class. The method could therefore
  2588. * be static, but this would prevent one from overriding the behavior.
  2589. *
  2590. * @return assetParamsOutputPeer
  2591. */
  2592. public function getPeer()
  2593. {
  2594. if (self::$peer === null) {
  2595. self::$peer = new assetParamsOutputPeer();
  2596. }
  2597. return self::$peer;
  2598. }
  2599. /**
  2600. * Declares an association between this object and a assetParams object.
  2601. *
  2602. * @param assetParams $v
  2603. * @return assetParamsOutput The current object (for fluent API support)
  2604. * @throws PropelException
  2605. */
  2606. public function setassetParams(assetParams $v = null)
  2607. {
  2608. if ($v === null) {
  2609. $this->setFlavorParamsId(NULL);
  2610. } else {
  2611. $this->setFlavorParamsId($v->getId());
  2612. }
  2613. $this->aassetParams = $v;
  2614. // Add binding for other direction of this n:n relationship.
  2615. // If this object has already been added to the assetParams object, it will not be re-added.
  2616. if ($v !== null) {
  2617. $v->addassetParamsOutput($this);
  2618. }
  2619. return $this;
  2620. }
  2621. /**
  2622. * Get the associated assetParams object
  2623. *
  2624. * @param PropelPDO Optional Connection object.
  2625. * @return assetParams The associated assetParams object.
  2626. * @throws PropelException
  2627. */
  2628. public function getassetParams(PropelPDO $con = null)
  2629. {
  2630. if ($this->aassetParams === null && ($this->flavor_params_id !== null)) {
  2631. $this->aassetParams = assetParamsPeer::retrieveByPk($this->flavor_params_id);
  2632. /* The following can be used additionally to
  2633. guarantee the related object contains a reference
  2634. to this object. This level of coupling may, however, be
  2635. undesirable since it could result in an only partially populated collection
  2636. in the referenced object.
  2637. $this->aassetParams->addassetParamsOutputs($this);
  2638. */
  2639. }
  2640. return $this->aassetParams;
  2641. }
  2642. /**
  2643. * Declares an association between this object and a entry object.
  2644. *
  2645. * @param entry $v
  2646. * @return assetParamsOutput The current object (for fluent API support)
  2647. * @throws PropelException
  2648. */
  2649. public function setentry(entry $v = null)
  2650. {
  2651. if ($v === null) {
  2652. $this->setEntryId(NULL);
  2653. } else {
  2654. $this->setEntryId($v->getId());
  2655. }
  2656. $this->aentry = $v;
  2657. // Add binding for other direction of this n:n relationship.
  2658. // If this object has already been added to the entry object, it will not be re-added.
  2659. if ($v !== null) {
  2660. $v->addassetParamsOutput($this);
  2661. }
  2662. return $this;
  2663. }
  2664. /**
  2665. * Get the associated entry object
  2666. *
  2667. * @param PropelPDO Optional Connection object.
  2668. * @return entry The associated entry object.
  2669. * @throws PropelException
  2670. */
  2671. public function getentry(PropelPDO $con = null)
  2672. {
  2673. if ($this->aentry === null && (($this->entry_id !== "" && $this->entry_id !== null))) {
  2674. $this->aentry = entryPeer::retrieveByPk($this->entry_id);
  2675. /* The following can be used additionally to
  2676. guarantee the related object contains a reference
  2677. to this object. This level of coupling may, however, be
  2678. undesirable since it could result in an only partially populated collection
  2679. in the referenced object.
  2680. $this->aentry->addassetParamsOutputs($this);
  2681. */
  2682. }
  2683. return $this->aentry;
  2684. }
  2685. /**
  2686. * Declares an association between this object and a asset object.
  2687. *
  2688. * @param asset $v
  2689. * @return assetParamsOutput The current object (for fluent API support)
  2690. * @throws PropelException
  2691. */
  2692. public function setasset(asset $v = null)
  2693. {
  2694. if ($v === null) {
  2695. $this->setFlavorAssetId(NULL);
  2696. } else {
  2697. $this->setFlavorAssetId($v->getId());
  2698. }
  2699. $this->aasset = $v;
  2700. // Add binding for other direction of this n:n relationship.
  2701. // If this object has already been added to the asset object, it will not be re-added.
  2702. if ($v !== null) {
  2703. $v->addassetParamsOutput($this);
  2704. }
  2705. return $this;
  2706. }
  2707. /**
  2708. * Get the associated asset object
  2709. *
  2710. * @param PropelPDO Optional Connection object.
  2711. * @return asset The associated asset object.
  2712. * @throws PropelException
  2713. */
  2714. public function getasset(PropelPDO $con = null)
  2715. {
  2716. if ($this->aasset === null && (($this->flavor_asset_id !== "" && $this->flavor_asset_id !== null))) {
  2717. $c = new Criteria(assetPeer::DATABASE_NAME);
  2718. $c->add(assetPeer::ID, $this->flavor_asset_id);
  2719. $this->aasset = assetPeer::doSelectOne($c, $con);
  2720. /* The following can be used additionally to
  2721. guarantee the related object contains a reference
  2722. to this object. This level of coupling may, however, be
  2723. undesirable since it could result in an only partially populated collection
  2724. in the referenced object.
  2725. $this->aasset->addassetParamsOutputs($this);
  2726. */
  2727. }
  2728. return $this->aasset;
  2729. }
  2730. /**
  2731. * Resets all collections of referencing foreign keys.
  2732. *
  2733. * This method is a user-space workaround for PHP's inability to garbage collect objects
  2734. * with circular references. This is currently necessary when using Propel in certain
  2735. * daemon or large-volumne/high-memory operations.
  2736. *
  2737. * @param boolean $deep Whether to also clear the references on all associated objects.
  2738. */
  2739. public function clearAllReferences($deep = false)
  2740. {
  2741. if ($deep) {
  2742. } // if ($deep)
  2743. $this->aassetParams = null;
  2744. $this->aentry = null;
  2745. $this->aasset = null;
  2746. }
  2747. /* ---------------------- CustomData functions ------------------------- */
  2748. /**
  2749. * @var myCustomData
  2750. */
  2751. protected $m_custom_data = null;
  2752. /**
  2753. * Store custom data old values before the changes
  2754. * @var array
  2755. */
  2756. protected $oldCustomDataValues = array();
  2757. /**
  2758. * @return array
  2759. */
  2760. public function getCustomDataOldValues()
  2761. {
  2762. return $this->oldCustomDataValues;
  2763. }
  2764. /**
  2765. * @param string $name
  2766. * @param string $value
  2767. * @param string $namespace
  2768. * @return string
  2769. */
  2770. public function putInCustomData ( $name , $value , $namespace = null )
  2771. {
  2772. $customData = $this->getCustomDataObj( );
  2773. $currentNamespace = '';
  2774. if($namespace)
  2775. $currentNamespace = $namespace;
  2776. if(!isset($this->oldCustomDataValues[$currentNamespace]))
  2777. $this->oldCustomDataValues[$currentNamespace] = array();
  2778. if(!isset($this->oldCustomDataValues[$currentNamespace][$name]))
  2779. $this->oldCustomDataValues[$currentNamespace][$name] = $customData->get($name, $namespace);
  2780. $customData->put ( $name , $value , $namespace );
  2781. }
  2782. /**
  2783. * @param string $name
  2784. * @param string $namespace
  2785. * @param string $defaultValue
  2786. * @return string
  2787. */
  2788. public function getFromCustomData ( $name , $namespace = null , $defaultValue = null )
  2789. {
  2790. $customData = $this->getCustomDataObj( );
  2791. $res = $customData->get ( $name , $namespace );
  2792. if ( $res === null ) return $defaultValue;
  2793. return $res;
  2794. }
  2795. /**
  2796. * @param string $name
  2797. * @param string $namespace
  2798. */
  2799. public function removeFromCustomData ( $name , $namespace = null)
  2800. {
  2801. $customData = $this->getCustomDataObj( );
  2802. return $customData->remove ( $name , $namespace );
  2803. }
  2804. /**
  2805. * @param string $name
  2806. * @param int $delta
  2807. * @param string $namespace
  2808. * @return string
  2809. */
  2810. public function incInCustomData ( $name , $delta = 1, $namespace = null)
  2811. {
  2812. $customData = $this->getCustomDataObj( );
  2813. return $customData->inc ( $name , $delta , $namespace );
  2814. }
  2815. /**
  2816. * @param string $name
  2817. * @param int $delta
  2818. * @param string $namespace
  2819. * @return string
  2820. */
  2821. public function decInCustomData ( $name , $delta = 1, $namespace = null)
  2822. {
  2823. $customData = $this->getCustomDataObj( );
  2824. return $customData->dec ( $name , $delta , $namespace );
  2825. }
  2826. /**
  2827. * @return myCustomData
  2828. */
  2829. public function getCustomDataObj( )
  2830. {
  2831. if ( ! $this->m_custom_data )
  2832. {
  2833. $this->m_custom_data = myCustomData::fromString ( $this->getCustomData() );
  2834. }
  2835. return $this->m_custom_data;
  2836. }
  2837. /**
  2838. * Must be called before saving the object
  2839. */
  2840. public function setCustomDataObj()
  2841. {
  2842. if ( $this->m_custom_data != null )
  2843. {
  2844. $this->setCustomData( $this->m_custom_data->toString() );
  2845. }
  2846. }
  2847. /* ---------------------- CustomData functions ------------------------- */
  2848. } // BaseassetParamsOutput