BaseKataoConfigPeer.php 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994
  1. <?php
  2. /**
  3. * Base static class for performing query and update operations on the 'katao_config' table.
  4. *
  5. *
  6. *
  7. * @package lib.model.om
  8. */
  9. abstract class BaseKataoConfigPeer {
  10. /** the default database name for this class */
  11. const DATABASE_NAME = 'propel';
  12. /** the table name for this class */
  13. const TABLE_NAME = 'katao_config';
  14. /** A class that can be returned by this peer. */
  15. const CLASS_DEFAULT = 'lib.model.KataoConfig';
  16. /** The total number of columns. */
  17. const NUM_COLUMNS = 33;
  18. /** The number of lazy-loaded columns. */
  19. const NUM_LAZY_LOAD_COLUMNS = 0;
  20. /** the column name for the ID field */
  21. const ID = 'katao_config.ID';
  22. /** the column name for the KATAO_MEMBER_ID field */
  23. const KATAO_MEMBER_ID = 'katao_config.KATAO_MEMBER_ID';
  24. /** the column name for the NAME field */
  25. const NAME = 'katao_config.NAME';
  26. /** the column name for the ADDRESS field */
  27. const ADDRESS = 'katao_config.ADDRESS';
  28. /** the column name for the PHONE field */
  29. const PHONE = 'katao_config.PHONE';
  30. /** the column name for the EMAIL field */
  31. const EMAIL = 'katao_config.EMAIL';
  32. /** the column name for the SIRET_NUMBER field */
  33. const SIRET_NUMBER = 'katao_config.SIRET_NUMBER';
  34. /** the column name for the TVA_NUMBER field */
  35. const TVA_NUMBER = 'katao_config.TVA_NUMBER';
  36. /** the column name for the RCS_NUMBER field */
  37. const RCS_NUMBER = 'katao_config.RCS_NUMBER';
  38. /** the column name for the CAPITAL field */
  39. const CAPITAL = 'katao_config.CAPITAL';
  40. /** the column name for the INITIAL_TRANSACTIONS_COUNT field */
  41. const INITIAL_TRANSACTIONS_COUNT = 'katao_config.INITIAL_TRANSACTIONS_COUNT';
  42. /** the column name for the INITIAL_TRANSACTIONS_SUM field */
  43. const INITIAL_TRANSACTIONS_SUM = 'katao_config.INITIAL_TRANSACTIONS_SUM';
  44. /** the column name for the DEFAULT_PRODUCT_PICTURE field */
  45. const DEFAULT_PRODUCT_PICTURE = 'katao_config.DEFAULT_PRODUCT_PICTURE';
  46. /** the column name for the DEFAULT_PRODUCT_MARGIN field */
  47. const DEFAULT_PRODUCT_MARGIN = 'katao_config.DEFAULT_PRODUCT_MARGIN';
  48. /** the column name for the DEFAULT_PRODUCT_SOL_PERCENT field */
  49. const DEFAULT_PRODUCT_SOL_PERCENT = 'katao_config.DEFAULT_PRODUCT_SOL_PERCENT';
  50. /** the column name for the MAILING_LIST_EMAIL field */
  51. const MAILING_LIST_EMAIL = 'katao_config.MAILING_LIST_EMAIL';
  52. /** the column name for the CART_VALIDATION_DAYS_NUMBER field */
  53. const CART_VALIDATION_DAYS_NUMBER = 'katao_config.CART_VALIDATION_DAYS_NUMBER';
  54. /** the column name for the ACCOUNTING_CODE_PREFIX_PURCHASE field */
  55. const ACCOUNTING_CODE_PREFIX_PURCHASE = 'katao_config.ACCOUNTING_CODE_PREFIX_PURCHASE';
  56. /** the column name for the ACCOUNTING_CODE_PREFIX_SELL field */
  57. const ACCOUNTING_CODE_PREFIX_SELL = 'katao_config.ACCOUNTING_CODE_PREFIX_SELL';
  58. /** the column name for the ACCOUNTING_CODE_BANK field */
  59. const ACCOUNTING_CODE_BANK = 'katao_config.ACCOUNTING_CODE_BANK';
  60. /** the column name for the ACCOUNTING_CODE_BANK_SOL field */
  61. const ACCOUNTING_CODE_BANK_SOL = 'katao_config.ACCOUNTING_CODE_BANK_SOL';
  62. /** the column name for the ACCOUNTING_CODE_CREDIT field */
  63. const ACCOUNTING_CODE_CREDIT = 'katao_config.ACCOUNTING_CODE_CREDIT';
  64. /** the column name for the ACCOUNTING_CODE_ERROR_ADJUSTMENT_POSITIVE field */
  65. const ACCOUNTING_CODE_ERROR_ADJUSTMENT_POSITIVE = 'katao_config.ACCOUNTING_CODE_ERROR_ADJUSTMENT_POSITIVE';
  66. /** the column name for the ACCOUNTING_CODE_ERROR_ADJUSTMENT_NEGATIVE field */
  67. const ACCOUNTING_CODE_ERROR_ADJUSTMENT_NEGATIVE = 'katao_config.ACCOUNTING_CODE_ERROR_ADJUSTMENT_NEGATIVE';
  68. /** the column name for the ACCOUNTING_CODE_SOL_DISCOUNT field */
  69. const ACCOUNTING_CODE_SOL_DISCOUNT = 'katao_config.ACCOUNTING_CODE_SOL_DISCOUNT';
  70. /** the column name for the ACCOUNTING_CODE_FEES_SHIPPING field */
  71. const ACCOUNTING_CODE_FEES_SHIPPING = 'katao_config.ACCOUNTING_CODE_FEES_SHIPPING';
  72. /** the column name for the ACCOUNTING_CODE_FEES_BILLING field */
  73. const ACCOUNTING_CODE_FEES_BILLING = 'katao_config.ACCOUNTING_CODE_FEES_BILLING';
  74. /** the column name for the ACCOUNTING_CODE_DISCOUNT field */
  75. const ACCOUNTING_CODE_DISCOUNT = 'katao_config.ACCOUNTING_CODE_DISCOUNT';
  76. /** the column name for the MEMBER_FEE field */
  77. const MEMBER_FEE = 'katao_config.MEMBER_FEE';
  78. /** the column name for the ADDITIONAL_CURRENCY_NAME field */
  79. const ADDITIONAL_CURRENCY_NAME = 'katao_config.ADDITIONAL_CURRENCY_NAME';
  80. /** the column name for the DEBUG_EMAIL field */
  81. const DEBUG_EMAIL = 'katao_config.DEBUG_EMAIL';
  82. /** the column name for the BANK_NAME field */
  83. const BANK_NAME = 'katao_config.BANK_NAME';
  84. /** the column name for the BANK_ACCOUNT field */
  85. const BANK_ACCOUNT = 'katao_config.BANK_ACCOUNT';
  86. /** The PHP to DB Name Mapping */
  87. private static $phpNameMap = null;
  88. /**
  89. * holds an array of fieldnames
  90. *
  91. * first dimension keys are the type constants
  92. * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
  93. */
  94. private static $fieldNames = array (
  95. BasePeer::TYPE_PHPNAME => array ('Id', 'KataoMemberId', 'Name', 'Address', 'Phone', 'Email', 'SiretNumber', 'TvaNumber', 'RcsNumber', 'Capital', 'InitialTransactionsCount', 'InitialTransactionsSum', 'DefaultProductPicture', 'DefaultProductMargin', 'DefaultProductSolPercent', 'MailingListEmail', 'CartValidationDaysNumber', 'AccountingCodePrefixPurchase', 'AccountingCodePrefixSell', 'AccountingCodeBank', 'AccountingCodeBankSol', 'AccountingCodeCredit', 'AccountingCodeErrorAdjustmentPositive', 'AccountingCodeErrorAdjustmentNegative', 'AccountingCodeSolDiscount', 'AccountingCodeFeesShipping', 'AccountingCodeFeesBilling', 'AccountingCodeDiscount', 'MemberFee', 'AdditionalCurrencyName', 'DebugEmail', 'BankName', 'BankAccount', ),
  96. BasePeer::TYPE_COLNAME => array (KataoConfigPeer::ID, KataoConfigPeer::KATAO_MEMBER_ID, KataoConfigPeer::NAME, KataoConfigPeer::ADDRESS, KataoConfigPeer::PHONE, KataoConfigPeer::EMAIL, KataoConfigPeer::SIRET_NUMBER, KataoConfigPeer::TVA_NUMBER, KataoConfigPeer::RCS_NUMBER, KataoConfigPeer::CAPITAL, KataoConfigPeer::INITIAL_TRANSACTIONS_COUNT, KataoConfigPeer::INITIAL_TRANSACTIONS_SUM, KataoConfigPeer::DEFAULT_PRODUCT_PICTURE, KataoConfigPeer::DEFAULT_PRODUCT_MARGIN, KataoConfigPeer::DEFAULT_PRODUCT_SOL_PERCENT, KataoConfigPeer::MAILING_LIST_EMAIL, KataoConfigPeer::CART_VALIDATION_DAYS_NUMBER, KataoConfigPeer::ACCOUNTING_CODE_PREFIX_PURCHASE, KataoConfigPeer::ACCOUNTING_CODE_PREFIX_SELL, KataoConfigPeer::ACCOUNTING_CODE_BANK, KataoConfigPeer::ACCOUNTING_CODE_BANK_SOL, KataoConfigPeer::ACCOUNTING_CODE_CREDIT, KataoConfigPeer::ACCOUNTING_CODE_ERROR_ADJUSTMENT_POSITIVE, KataoConfigPeer::ACCOUNTING_CODE_ERROR_ADJUSTMENT_NEGATIVE, KataoConfigPeer::ACCOUNTING_CODE_SOL_DISCOUNT, KataoConfigPeer::ACCOUNTING_CODE_FEES_SHIPPING, KataoConfigPeer::ACCOUNTING_CODE_FEES_BILLING, KataoConfigPeer::ACCOUNTING_CODE_DISCOUNT, KataoConfigPeer::MEMBER_FEE, KataoConfigPeer::ADDITIONAL_CURRENCY_NAME, KataoConfigPeer::DEBUG_EMAIL, KataoConfigPeer::BANK_NAME, KataoConfigPeer::BANK_ACCOUNT, ),
  97. BasePeer::TYPE_FIELDNAME => array ('id', 'katao_member_id', 'name', 'address', 'phone', 'email', 'siret_number', 'tva_number', 'rcs_number', 'capital', 'initial_transactions_count', 'initial_transactions_sum', 'default_product_picture', 'default_product_margin', 'default_product_sol_percent', 'mailing_list_email', 'cart_validation_days_number', 'accounting_code_prefix_purchase', 'accounting_code_prefix_sell', 'accounting_code_bank', 'accounting_code_bank_sol', 'accounting_code_credit', 'accounting_code_error_adjustment_positive', 'accounting_code_error_adjustment_negative', 'accounting_code_sol_discount', 'accounting_code_fees_shipping', 'accounting_code_fees_billing', 'accounting_code_discount', 'member_fee', 'additional_currency_name', 'debug_email', 'bank_name', 'bank_account', ),
  98. BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, )
  99. );
  100. /**
  101. * holds an array of keys for quick access to the fieldnames array
  102. *
  103. * first dimension keys are the type constants
  104. * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
  105. */
  106. private static $fieldKeys = array (
  107. BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'KataoMemberId' => 1, 'Name' => 2, 'Address' => 3, 'Phone' => 4, 'Email' => 5, 'SiretNumber' => 6, 'TvaNumber' => 7, 'RcsNumber' => 8, 'Capital' => 9, 'InitialTransactionsCount' => 10, 'InitialTransactionsSum' => 11, 'DefaultProductPicture' => 12, 'DefaultProductMargin' => 13, 'DefaultProductSolPercent' => 14, 'MailingListEmail' => 15, 'CartValidationDaysNumber' => 16, 'AccountingCodePrefixPurchase' => 17, 'AccountingCodePrefixSell' => 18, 'AccountingCodeBank' => 19, 'AccountingCodeBankSol' => 20, 'AccountingCodeCredit' => 21, 'AccountingCodeErrorAdjustmentPositive' => 22, 'AccountingCodeErrorAdjustmentNegative' => 23, 'AccountingCodeSolDiscount' => 24, 'AccountingCodeFeesShipping' => 25, 'AccountingCodeFeesBilling' => 26, 'AccountingCodeDiscount' => 27, 'MemberFee' => 28, 'AdditionalCurrencyName' => 29, 'DebugEmail' => 30, 'BankName' => 31, 'BankAccount' => 32, ),
  108. BasePeer::TYPE_COLNAME => array (KataoConfigPeer::ID => 0, KataoConfigPeer::KATAO_MEMBER_ID => 1, KataoConfigPeer::NAME => 2, KataoConfigPeer::ADDRESS => 3, KataoConfigPeer::PHONE => 4, KataoConfigPeer::EMAIL => 5, KataoConfigPeer::SIRET_NUMBER => 6, KataoConfigPeer::TVA_NUMBER => 7, KataoConfigPeer::RCS_NUMBER => 8, KataoConfigPeer::CAPITAL => 9, KataoConfigPeer::INITIAL_TRANSACTIONS_COUNT => 10, KataoConfigPeer::INITIAL_TRANSACTIONS_SUM => 11, KataoConfigPeer::DEFAULT_PRODUCT_PICTURE => 12, KataoConfigPeer::DEFAULT_PRODUCT_MARGIN => 13, KataoConfigPeer::DEFAULT_PRODUCT_SOL_PERCENT => 14, KataoConfigPeer::MAILING_LIST_EMAIL => 15, KataoConfigPeer::CART_VALIDATION_DAYS_NUMBER => 16, KataoConfigPeer::ACCOUNTING_CODE_PREFIX_PURCHASE => 17, KataoConfigPeer::ACCOUNTING_CODE_PREFIX_SELL => 18, KataoConfigPeer::ACCOUNTING_CODE_BANK => 19, KataoConfigPeer::ACCOUNTING_CODE_BANK_SOL => 20, KataoConfigPeer::ACCOUNTING_CODE_CREDIT => 21, KataoConfigPeer::ACCOUNTING_CODE_ERROR_ADJUSTMENT_POSITIVE => 22, KataoConfigPeer::ACCOUNTING_CODE_ERROR_ADJUSTMENT_NEGATIVE => 23, KataoConfigPeer::ACCOUNTING_CODE_SOL_DISCOUNT => 24, KataoConfigPeer::ACCOUNTING_CODE_FEES_SHIPPING => 25, KataoConfigPeer::ACCOUNTING_CODE_FEES_BILLING => 26, KataoConfigPeer::ACCOUNTING_CODE_DISCOUNT => 27, KataoConfigPeer::MEMBER_FEE => 28, KataoConfigPeer::ADDITIONAL_CURRENCY_NAME => 29, KataoConfigPeer::DEBUG_EMAIL => 30, KataoConfigPeer::BANK_NAME => 31, KataoConfigPeer::BANK_ACCOUNT => 32, ),
  109. BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'katao_member_id' => 1, 'name' => 2, 'address' => 3, 'phone' => 4, 'email' => 5, 'siret_number' => 6, 'tva_number' => 7, 'rcs_number' => 8, 'capital' => 9, 'initial_transactions_count' => 10, 'initial_transactions_sum' => 11, 'default_product_picture' => 12, 'default_product_margin' => 13, 'default_product_sol_percent' => 14, 'mailing_list_email' => 15, 'cart_validation_days_number' => 16, 'accounting_code_prefix_purchase' => 17, 'accounting_code_prefix_sell' => 18, 'accounting_code_bank' => 19, 'accounting_code_bank_sol' => 20, 'accounting_code_credit' => 21, 'accounting_code_error_adjustment_positive' => 22, 'accounting_code_error_adjustment_negative' => 23, 'accounting_code_sol_discount' => 24, 'accounting_code_fees_shipping' => 25, 'accounting_code_fees_billing' => 26, 'accounting_code_discount' => 27, 'member_fee' => 28, 'additional_currency_name' => 29, 'debug_email' => 30, 'bank_name' => 31, 'bank_account' => 32, ),
  110. BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, )
  111. );
  112. /**
  113. * @return MapBuilder the map builder for this peer
  114. * @throws PropelException Any exceptions caught during processing will be
  115. * rethrown wrapped into a PropelException.
  116. */
  117. public static function getMapBuilder()
  118. {
  119. return BasePeer::getMapBuilder('lib.model.map.KataoConfigMapBuilder');
  120. }
  121. /**
  122. * Gets a map (hash) of PHP names to DB column names.
  123. *
  124. * @return array The PHP to DB name map for this peer
  125. * @throws PropelException Any exceptions caught during processing will be
  126. * rethrown wrapped into a PropelException.
  127. * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
  128. */
  129. public static function getPhpNameMap()
  130. {
  131. if (self::$phpNameMap === null) {
  132. $map = KataoConfigPeer::getTableMap();
  133. $columns = $map->getColumns();
  134. $nameMap = array();
  135. foreach ($columns as $column) {
  136. $nameMap[$column->getPhpName()] = $column->getColumnName();
  137. }
  138. self::$phpNameMap = $nameMap;
  139. }
  140. return self::$phpNameMap;
  141. }
  142. /**
  143. * Translates a fieldname to another type
  144. *
  145. * @param string $name field name
  146. * @param string $fromType One of the class type constants TYPE_PHPNAME,
  147. * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
  148. * @param string $toType One of the class type constants
  149. * @return string translated name of the field.
  150. */
  151. static public function translateFieldName($name, $fromType, $toType)
  152. {
  153. $toNames = self::getFieldNames($toType);
  154. $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
  155. if ($key === null) {
  156. throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
  157. }
  158. return $toNames[$key];
  159. }
  160. /**
  161. * Returns an array of of field names.
  162. *
  163. * @param string $type The type of fieldnames to return:
  164. * One of the class type constants TYPE_PHPNAME,
  165. * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
  166. * @return array A list of field names
  167. */
  168. static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
  169. {
  170. if (!array_key_exists($type, self::$fieldNames)) {
  171. throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.');
  172. }
  173. return self::$fieldNames[$type];
  174. }
  175. /**
  176. * Convenience method which changes table.column to alias.column.
  177. *
  178. * Using this method you can maintain SQL abstraction while using column aliases.
  179. * <code>
  180. * $c->addAlias("alias1", TablePeer::TABLE_NAME);
  181. * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
  182. * </code>
  183. * @param string $alias The alias for the current table.
  184. * @param string $column The column name for current table. (i.e. KataoConfigPeer::COLUMN_NAME).
  185. * @return string
  186. */
  187. public static function alias($alias, $column)
  188. {
  189. return str_replace(KataoConfigPeer::TABLE_NAME.'.', $alias.'.', $column);
  190. }
  191. /**
  192. * Add all the columns needed to create a new object.
  193. *
  194. * Note: any columns that were marked with lazyLoad="true" in the
  195. * XML schema will not be added to the select list and only loaded
  196. * on demand.
  197. *
  198. * @param criteria object containing the columns to add.
  199. * @throws PropelException Any exceptions caught during processing will be
  200. * rethrown wrapped into a PropelException.
  201. */
  202. public static function addSelectColumns(Criteria $criteria)
  203. {
  204. $criteria->addSelectColumn(KataoConfigPeer::ID);
  205. $criteria->addSelectColumn(KataoConfigPeer::KATAO_MEMBER_ID);
  206. $criteria->addSelectColumn(KataoConfigPeer::NAME);
  207. $criteria->addSelectColumn(KataoConfigPeer::ADDRESS);
  208. $criteria->addSelectColumn(KataoConfigPeer::PHONE);
  209. $criteria->addSelectColumn(KataoConfigPeer::EMAIL);
  210. $criteria->addSelectColumn(KataoConfigPeer::SIRET_NUMBER);
  211. $criteria->addSelectColumn(KataoConfigPeer::TVA_NUMBER);
  212. $criteria->addSelectColumn(KataoConfigPeer::RCS_NUMBER);
  213. $criteria->addSelectColumn(KataoConfigPeer::CAPITAL);
  214. $criteria->addSelectColumn(KataoConfigPeer::INITIAL_TRANSACTIONS_COUNT);
  215. $criteria->addSelectColumn(KataoConfigPeer::INITIAL_TRANSACTIONS_SUM);
  216. $criteria->addSelectColumn(KataoConfigPeer::DEFAULT_PRODUCT_PICTURE);
  217. $criteria->addSelectColumn(KataoConfigPeer::DEFAULT_PRODUCT_MARGIN);
  218. $criteria->addSelectColumn(KataoConfigPeer::DEFAULT_PRODUCT_SOL_PERCENT);
  219. $criteria->addSelectColumn(KataoConfigPeer::MAILING_LIST_EMAIL);
  220. $criteria->addSelectColumn(KataoConfigPeer::CART_VALIDATION_DAYS_NUMBER);
  221. $criteria->addSelectColumn(KataoConfigPeer::ACCOUNTING_CODE_PREFIX_PURCHASE);
  222. $criteria->addSelectColumn(KataoConfigPeer::ACCOUNTING_CODE_PREFIX_SELL);
  223. $criteria->addSelectColumn(KataoConfigPeer::ACCOUNTING_CODE_BANK);
  224. $criteria->addSelectColumn(KataoConfigPeer::ACCOUNTING_CODE_BANK_SOL);
  225. $criteria->addSelectColumn(KataoConfigPeer::ACCOUNTING_CODE_CREDIT);
  226. $criteria->addSelectColumn(KataoConfigPeer::ACCOUNTING_CODE_ERROR_ADJUSTMENT_POSITIVE);
  227. $criteria->addSelectColumn(KataoConfigPeer::ACCOUNTING_CODE_ERROR_ADJUSTMENT_NEGATIVE);
  228. $criteria->addSelectColumn(KataoConfigPeer::ACCOUNTING_CODE_SOL_DISCOUNT);
  229. $criteria->addSelectColumn(KataoConfigPeer::ACCOUNTING_CODE_FEES_SHIPPING);
  230. $criteria->addSelectColumn(KataoConfigPeer::ACCOUNTING_CODE_FEES_BILLING);
  231. $criteria->addSelectColumn(KataoConfigPeer::ACCOUNTING_CODE_DISCOUNT);
  232. $criteria->addSelectColumn(KataoConfigPeer::MEMBER_FEE);
  233. $criteria->addSelectColumn(KataoConfigPeer::ADDITIONAL_CURRENCY_NAME);
  234. $criteria->addSelectColumn(KataoConfigPeer::DEBUG_EMAIL);
  235. $criteria->addSelectColumn(KataoConfigPeer::BANK_NAME);
  236. $criteria->addSelectColumn(KataoConfigPeer::BANK_ACCOUNT);
  237. }
  238. const COUNT = 'COUNT(katao_config.ID)';
  239. const COUNT_DISTINCT = 'COUNT(DISTINCT katao_config.ID)';
  240. /**
  241. * Returns the number of rows matching criteria.
  242. *
  243. * @param Criteria $criteria
  244. * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
  245. * @param Connection $con
  246. * @return int Number of matching rows.
  247. */
  248. public static function doCount(Criteria $criteria, $distinct = false, $con = null)
  249. {
  250. // we're going to modify criteria, so copy it first
  251. $criteria = clone $criteria;
  252. // clear out anything that might confuse the ORDER BY clause
  253. $criteria->clearSelectColumns()->clearOrderByColumns();
  254. if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  255. $criteria->addSelectColumn(KataoConfigPeer::COUNT_DISTINCT);
  256. } else {
  257. $criteria->addSelectColumn(KataoConfigPeer::COUNT);
  258. }
  259. // just in case we're grouping: add those columns to the select statement
  260. foreach($criteria->getGroupByColumns() as $column)
  261. {
  262. $criteria->addSelectColumn($column);
  263. }
  264. $rs = KataoConfigPeer::doSelectRS($criteria, $con);
  265. if ($rs->next()) {
  266. return $rs->getInt(1);
  267. } else {
  268. // no rows returned; we infer that means 0 matches.
  269. return 0;
  270. }
  271. }
  272. /**
  273. * Method to select one object from the DB.
  274. *
  275. * @param Criteria $criteria object used to create the SELECT statement.
  276. * @param Connection $con
  277. * @return KataoConfig
  278. * @throws PropelException Any exceptions caught during processing will be
  279. * rethrown wrapped into a PropelException.
  280. */
  281. public static function doSelectOne(Criteria $criteria, $con = null)
  282. {
  283. $critcopy = clone $criteria;
  284. $critcopy->setLimit(1);
  285. $objects = KataoConfigPeer::doSelect($critcopy, $con);
  286. if ($objects) {
  287. return $objects[0];
  288. }
  289. return null;
  290. }
  291. /**
  292. * Method to do selects.
  293. *
  294. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
  295. * @param Connection $con
  296. * @return array Array of selected Objects
  297. * @throws PropelException Any exceptions caught during processing will be
  298. * rethrown wrapped into a PropelException.
  299. */
  300. public static function doSelect(Criteria $criteria, $con = null)
  301. {
  302. return KataoConfigPeer::populateObjects(KataoConfigPeer::doSelectRS($criteria, $con));
  303. }
  304. /**
  305. * Prepares the Criteria object and uses the parent doSelect()
  306. * method to get a ResultSet.
  307. *
  308. * Use this method directly if you want to just get the resultset
  309. * (instead of an array of objects).
  310. *
  311. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
  312. * @param Connection $con the connection to use
  313. * @throws PropelException Any exceptions caught during processing will be
  314. * rethrown wrapped into a PropelException.
  315. * @return ResultSet The resultset object with numerically-indexed fields.
  316. * @see BasePeer::doSelect()
  317. */
  318. public static function doSelectRS(Criteria $criteria, $con = null)
  319. {
  320. foreach (sfMixer::getCallables('BaseKataoConfigPeer:doSelectRS:doSelectRS') as $callable)
  321. {
  322. call_user_func($callable, 'BaseKataoConfigPeer', $criteria, $con);
  323. }
  324. if ($con === null) {
  325. $con = Propel::getConnection(self::DATABASE_NAME);
  326. }
  327. if (!$criteria->getSelectColumns()) {
  328. $criteria = clone $criteria;
  329. KataoConfigPeer::addSelectColumns($criteria);
  330. }
  331. // Set the correct dbName
  332. $criteria->setDbName(self::DATABASE_NAME);
  333. // BasePeer returns a Creole ResultSet, set to return
  334. // rows indexed numerically.
  335. return BasePeer::doSelect($criteria, $con);
  336. }
  337. /**
  338. * The returned array will contain objects of the default type or
  339. * objects that inherit from the default.
  340. *
  341. * @throws PropelException Any exceptions caught during processing will be
  342. * rethrown wrapped into a PropelException.
  343. */
  344. public static function populateObjects(ResultSet $rs)
  345. {
  346. $results = array();
  347. // set the class once to avoid overhead in the loop
  348. $cls = KataoConfigPeer::getOMClass();
  349. $cls = sfPropel::import($cls);
  350. // populate the object(s)
  351. while($rs->next()) {
  352. $obj = new $cls();
  353. $obj->hydrate($rs);
  354. $results[] = $obj;
  355. }
  356. return $results;
  357. }
  358. /**
  359. * Returns the number of rows matching criteria, joining the related KataoMember table
  360. *
  361. * @param Criteria $c
  362. * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
  363. * @param Connection $con
  364. * @return int Number of matching rows.
  365. */
  366. public static function doCountJoinKataoMember(Criteria $criteria, $distinct = false, $con = null)
  367. {
  368. // we're going to modify criteria, so copy it first
  369. $criteria = clone $criteria;
  370. // clear out anything that might confuse the ORDER BY clause
  371. $criteria->clearSelectColumns()->clearOrderByColumns();
  372. if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  373. $criteria->addSelectColumn(KataoConfigPeer::COUNT_DISTINCT);
  374. } else {
  375. $criteria->addSelectColumn(KataoConfigPeer::COUNT);
  376. }
  377. // just in case we're grouping: add those columns to the select statement
  378. foreach($criteria->getGroupByColumns() as $column)
  379. {
  380. $criteria->addSelectColumn($column);
  381. }
  382. $criteria->addJoin(KataoConfigPeer::KATAO_MEMBER_ID, KataoMemberPeer::ID);
  383. $rs = KataoConfigPeer::doSelectRS($criteria, $con);
  384. if ($rs->next()) {
  385. return $rs->getInt(1);
  386. } else {
  387. // no rows returned; we infer that means 0 matches.
  388. return 0;
  389. }
  390. }
  391. /**
  392. * Selects a collection of KataoConfig objects pre-filled with their KataoMember objects.
  393. *
  394. * @return array Array of KataoConfig objects.
  395. * @throws PropelException Any exceptions caught during processing will be
  396. * rethrown wrapped into a PropelException.
  397. */
  398. public static function doSelectJoinKataoMember(Criteria $c, $con = null)
  399. {
  400. foreach (sfMixer::getCallables('BaseKataoConfigPeer:doSelectJoin:doSelectJoin') as $callable)
  401. {
  402. call_user_func($callable, 'BaseKataoConfigPeer', $c, $con);
  403. }
  404. $c = clone $c;
  405. // Set the correct dbName if it has not been overridden
  406. if ($c->getDbName() == Propel::getDefaultDB()) {
  407. $c->setDbName(self::DATABASE_NAME);
  408. }
  409. KataoConfigPeer::addSelectColumns($c);
  410. $startcol = (KataoConfigPeer::NUM_COLUMNS - KataoConfigPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
  411. KataoMemberPeer::addSelectColumns($c);
  412. $c->addJoin(KataoConfigPeer::KATAO_MEMBER_ID, KataoMemberPeer::ID);
  413. $rs = BasePeer::doSelect($c, $con);
  414. $results = array();
  415. while($rs->next()) {
  416. $omClass = KataoConfigPeer::getOMClass();
  417. $cls = sfPropel::import($omClass);
  418. $obj1 = new $cls();
  419. $obj1->hydrate($rs);
  420. $omClass = KataoMemberPeer::getOMClass();
  421. $cls = sfPropel::import($omClass);
  422. $obj2 = new $cls();
  423. $obj2->hydrate($rs, $startcol);
  424. $newObject = true;
  425. foreach($results as $temp_obj1) {
  426. $temp_obj2 = $temp_obj1->getKataoMember(); //CHECKME
  427. if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
  428. $newObject = false;
  429. // e.g. $author->addBookRelatedByBookId()
  430. $temp_obj2->addKataoConfig($obj1); //CHECKME
  431. break;
  432. }
  433. }
  434. if ($newObject) {
  435. $obj2->initKataoConfigs();
  436. $obj2->addKataoConfig($obj1); //CHECKME
  437. }
  438. $results[] = $obj1;
  439. }
  440. return $results;
  441. }
  442. /**
  443. * Returns the number of rows matching criteria, joining all related tables
  444. *
  445. * @param Criteria $c
  446. * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
  447. * @param Connection $con
  448. * @return int Number of matching rows.
  449. */
  450. public static function doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
  451. {
  452. $criteria = clone $criteria;
  453. // clear out anything that might confuse the ORDER BY clause
  454. $criteria->clearSelectColumns()->clearOrderByColumns();
  455. if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
  456. $criteria->addSelectColumn(KataoConfigPeer::COUNT_DISTINCT);
  457. } else {
  458. $criteria->addSelectColumn(KataoConfigPeer::COUNT);
  459. }
  460. // just in case we're grouping: add those columns to the select statement
  461. foreach($criteria->getGroupByColumns() as $column)
  462. {
  463. $criteria->addSelectColumn($column);
  464. }
  465. $criteria->addJoin(KataoConfigPeer::KATAO_MEMBER_ID, KataoMemberPeer::ID);
  466. $rs = KataoConfigPeer::doSelectRS($criteria, $con);
  467. if ($rs->next()) {
  468. return $rs->getInt(1);
  469. } else {
  470. // no rows returned; we infer that means 0 matches.
  471. return 0;
  472. }
  473. }
  474. /**
  475. * Selects a collection of KataoConfig objects pre-filled with all related objects.
  476. *
  477. * @return array Array of KataoConfig objects.
  478. * @throws PropelException Any exceptions caught during processing will be
  479. * rethrown wrapped into a PropelException.
  480. */
  481. public static function doSelectJoinAll(Criteria $c, $con = null)
  482. {
  483. foreach (sfMixer::getCallables('BaseKataoConfigPeer:doSelectJoinAll:doSelectJoinAll') as $callable)
  484. {
  485. call_user_func($callable, 'BaseKataoConfigPeer', $c, $con);
  486. }
  487. $c = clone $c;
  488. // Set the correct dbName if it has not been overridden
  489. if ($c->getDbName() == Propel::getDefaultDB()) {
  490. $c->setDbName(self::DATABASE_NAME);
  491. }
  492. KataoConfigPeer::addSelectColumns($c);
  493. $startcol2 = (KataoConfigPeer::NUM_COLUMNS - KataoConfigPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
  494. KataoMemberPeer::addSelectColumns($c);
  495. $startcol3 = $startcol2 + KataoMemberPeer::NUM_COLUMNS;
  496. $c->addJoin(KataoConfigPeer::KATAO_MEMBER_ID, KataoMemberPeer::ID);
  497. $rs = BasePeer::doSelect($c, $con);
  498. $results = array();
  499. while($rs->next()) {
  500. $omClass = KataoConfigPeer::getOMClass();
  501. $cls = sfPropel::import($omClass);
  502. $obj1 = new $cls();
  503. $obj1->hydrate($rs);
  504. // Add objects for joined KataoMember rows
  505. $omClass = KataoMemberPeer::getOMClass();
  506. $cls = sfPropel::import($omClass);
  507. $obj2 = new $cls();
  508. $obj2->hydrate($rs, $startcol2);
  509. $newObject = true;
  510. for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
  511. $temp_obj1 = $results[$j];
  512. $temp_obj2 = $temp_obj1->getKataoMember(); // CHECKME
  513. if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
  514. $newObject = false;
  515. $temp_obj2->addKataoConfig($obj1); // CHECKME
  516. break;
  517. }
  518. }
  519. if ($newObject) {
  520. $obj2->initKataoConfigs();
  521. $obj2->addKataoConfig($obj1);
  522. }
  523. $results[] = $obj1;
  524. }
  525. return $results;
  526. }
  527. static public function getUniqueColumnNames()
  528. {
  529. return array();
  530. }
  531. /**
  532. * Returns the TableMap related to this peer.
  533. * This method is not needed for general use but a specific application could have a need.
  534. * @return TableMap
  535. * @throws PropelException Any exceptions caught during processing will be
  536. * rethrown wrapped into a PropelException.
  537. */
  538. public static function getTableMap()
  539. {
  540. return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
  541. }
  542. /**
  543. * The class that the Peer will make instances of.
  544. *
  545. * This uses a dot-path notation which is tranalted into a path
  546. * relative to a location on the PHP include_path.
  547. * (e.g. path.to.MyClass -> 'path/to/MyClass.php')
  548. *
  549. * @return string path.to.ClassName
  550. */
  551. public static function getOMClass()
  552. {
  553. return KataoConfigPeer::CLASS_DEFAULT;
  554. }
  555. /**
  556. * Method perform an INSERT on the database, given a KataoConfig or Criteria object.
  557. *
  558. * @param mixed $values Criteria or KataoConfig object containing data that is used to create the INSERT statement.
  559. * @param Connection $con the connection to use
  560. * @return mixed The new primary key.
  561. * @throws PropelException Any exceptions caught during processing will be
  562. * rethrown wrapped into a PropelException.
  563. */
  564. public static function doInsert($values, $con = null)
  565. {
  566. foreach (sfMixer::getCallables('BaseKataoConfigPeer:doInsert:pre') as $callable)
  567. {
  568. $ret = call_user_func($callable, 'BaseKataoConfigPeer', $values, $con);
  569. if (false !== $ret)
  570. {
  571. return $ret;
  572. }
  573. }
  574. if ($con === null) {
  575. $con = Propel::getConnection(self::DATABASE_NAME);
  576. }
  577. if ($values instanceof Criteria) {
  578. $criteria = clone $values; // rename for clarity
  579. } else {
  580. $criteria = $values->buildCriteria(); // build Criteria from KataoConfig object
  581. }
  582. $criteria->remove(KataoConfigPeer::ID); // remove pkey col since this table uses auto-increment
  583. // Set the correct dbName
  584. $criteria->setDbName(self::DATABASE_NAME);
  585. try {
  586. // use transaction because $criteria could contain info
  587. // for more than one table (I guess, conceivably)
  588. $con->begin();
  589. $pk = BasePeer::doInsert($criteria, $con);
  590. $con->commit();
  591. } catch(PropelException $e) {
  592. $con->rollback();
  593. throw $e;
  594. }
  595. foreach (sfMixer::getCallables('BaseKataoConfigPeer:doInsert:post') as $callable)
  596. {
  597. call_user_func($callable, 'BaseKataoConfigPeer', $values, $con, $pk);
  598. }
  599. return $pk;
  600. }
  601. /**
  602. * Method perform an UPDATE on the database, given a KataoConfig or Criteria object.
  603. *
  604. * @param mixed $values Criteria or KataoConfig object containing data that is used to create the UPDATE statement.
  605. * @param Connection $con The connection to use (specify Connection object to exert more control over transactions).
  606. * @return int The number of affected rows (if supported by underlying database driver).
  607. * @throws PropelException Any exceptions caught during processing will be
  608. * rethrown wrapped into a PropelException.
  609. */
  610. public static function doUpdate($values, $con = null)
  611. {
  612. foreach (sfMixer::getCallables('BaseKataoConfigPeer:doUpdate:pre') as $callable)
  613. {
  614. $ret = call_user_func($callable, 'BaseKataoConfigPeer', $values, $con);
  615. if (false !== $ret)
  616. {
  617. return $ret;
  618. }
  619. }
  620. if ($con === null) {
  621. $con = Propel::getConnection(self::DATABASE_NAME);
  622. }
  623. $selectCriteria = new Criteria(self::DATABASE_NAME);
  624. if ($values instanceof Criteria) {
  625. $criteria = clone $values; // rename for clarity
  626. $comparison = $criteria->getComparison(KataoConfigPeer::ID);
  627. $selectCriteria->add(KataoConfigPeer::ID, $criteria->remove(KataoConfigPeer::ID), $comparison);
  628. } else { // $values is KataoConfig object
  629. $criteria = $values->buildCriteria(); // gets full criteria
  630. $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
  631. }
  632. // set the correct dbName
  633. $criteria->setDbName(self::DATABASE_NAME);
  634. $ret = BasePeer::doUpdate($selectCriteria, $criteria, $con);
  635. foreach (sfMixer::getCallables('BaseKataoConfigPeer:doUpdate:post') as $callable)
  636. {
  637. call_user_func($callable, 'BaseKataoConfigPeer', $values, $con, $ret);
  638. }
  639. return $ret;
  640. }
  641. /**
  642. * Method to DELETE all rows from the katao_config table.
  643. *
  644. * @return int The number of affected rows (if supported by underlying database driver).
  645. */
  646. public static function doDeleteAll($con = null)
  647. {
  648. if ($con === null) {
  649. $con = Propel::getConnection(self::DATABASE_NAME);
  650. }
  651. $affectedRows = 0; // initialize var to track total num of affected rows
  652. try {
  653. // use transaction because $criteria could contain info
  654. // for more than one table or we could emulating ON DELETE CASCADE, etc.
  655. $con->begin();
  656. $affectedRows += BasePeer::doDeleteAll(KataoConfigPeer::TABLE_NAME, $con);
  657. $con->commit();
  658. return $affectedRows;
  659. } catch (PropelException $e) {
  660. $con->rollback();
  661. throw $e;
  662. }
  663. }
  664. /**
  665. * Method perform a DELETE on the database, given a KataoConfig or Criteria object OR a primary key value.
  666. *
  667. * @param mixed $values Criteria or KataoConfig object or primary key or array of primary keys
  668. * which is used to create the DELETE statement
  669. * @param Connection $con the connection to use
  670. * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
  671. * if supported by native driver or if emulated using Propel.
  672. * @throws PropelException Any exceptions caught during processing will be
  673. * rethrown wrapped into a PropelException.
  674. */
  675. public static function doDelete($values, $con = null)
  676. {
  677. if ($con === null) {
  678. $con = Propel::getConnection(KataoConfigPeer::DATABASE_NAME);
  679. }
  680. if ($values instanceof Criteria) {
  681. $criteria = clone $values; // rename for clarity
  682. } elseif ($values instanceof KataoConfig) {
  683. $criteria = $values->buildPkeyCriteria();
  684. } else {
  685. // it must be the primary key
  686. $criteria = new Criteria(self::DATABASE_NAME);
  687. $criteria->add(KataoConfigPeer::ID, (array) $values, Criteria::IN);
  688. }
  689. // Set the correct dbName
  690. $criteria->setDbName(self::DATABASE_NAME);
  691. $affectedRows = 0; // initialize var to track total num of affected rows
  692. try {
  693. // use transaction because $criteria could contain info
  694. // for more than one table or we could emulating ON DELETE CASCADE, etc.
  695. $con->begin();
  696. $affectedRows += BasePeer::doDelete($criteria, $con);
  697. $con->commit();
  698. return $affectedRows;
  699. } catch (PropelException $e) {
  700. $con->rollback();
  701. throw $e;
  702. }
  703. }
  704. /**
  705. * Validates all modified columns of given KataoConfig object.
  706. * If parameter $columns is either a single column name or an array of column names
  707. * than only those columns are validated.
  708. *
  709. * NOTICE: This does not apply to primary or foreign keys for now.
  710. *
  711. * @param KataoConfig $obj The object to validate.
  712. * @param mixed $cols Column name or array of column names.
  713. *
  714. * @return mixed TRUE if all columns are valid or the error message of the first invalid column.
  715. */
  716. public static function doValidate(KataoConfig $obj, $cols = null)
  717. {
  718. $columns = array();
  719. if ($cols) {
  720. $dbMap = Propel::getDatabaseMap(KataoConfigPeer::DATABASE_NAME);
  721. $tableMap = $dbMap->getTable(KataoConfigPeer::TABLE_NAME);
  722. if (! is_array($cols)) {
  723. $cols = array($cols);
  724. }
  725. foreach($cols as $colName) {
  726. if ($tableMap->containsColumn($colName)) {
  727. $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
  728. $columns[$colName] = $obj->$get();
  729. }
  730. }
  731. } else {
  732. }
  733. $res = BasePeer::doValidate(KataoConfigPeer::DATABASE_NAME, KataoConfigPeer::TABLE_NAME, $columns);
  734. if ($res !== true) {
  735. $request = sfContext::getInstance()->getRequest();
  736. foreach ($res as $failed) {
  737. $col = KataoConfigPeer::translateFieldname($failed->getColumn(), BasePeer::TYPE_COLNAME, BasePeer::TYPE_PHPNAME);
  738. $request->setError($col, $failed->getMessage());
  739. }
  740. }
  741. return $res;
  742. }
  743. /**
  744. * Retrieve a single object by pkey.
  745. *
  746. * @param mixed $pk the primary key.
  747. * @param Connection $con the connection to use
  748. * @return KataoConfig
  749. */
  750. public static function retrieveByPK($pk, $con = null)
  751. {
  752. if ($con === null) {
  753. $con = Propel::getConnection(self::DATABASE_NAME);
  754. }
  755. $criteria = new Criteria(KataoConfigPeer::DATABASE_NAME);
  756. $criteria->add(KataoConfigPeer::ID, $pk);
  757. $v = KataoConfigPeer::doSelect($criteria, $con);
  758. return !empty($v) > 0 ? $v[0] : null;
  759. }
  760. /**
  761. * Retrieve multiple objects by pkey.
  762. *
  763. * @param array $pks List of primary keys
  764. * @param Connection $con the connection to use
  765. * @throws PropelException Any exceptions caught during processing will be
  766. * rethrown wrapped into a PropelException.
  767. */
  768. public static function retrieveByPKs($pks, $con = null)
  769. {
  770. if ($con === null) {
  771. $con = Propel::getConnection(self::DATABASE_NAME);
  772. }
  773. $objs = null;
  774. if (empty($pks)) {
  775. $objs = array();
  776. } else {
  777. $criteria = new Criteria();
  778. $criteria->add(KataoConfigPeer::ID, $pks, Criteria::IN);
  779. $objs = KataoConfigPeer::doSelect($criteria, $con);
  780. }
  781. return $objs;
  782. }
  783. } // BaseKataoConfigPeer
  784. // static code to register the map builder for this Peer with the main Propel class
  785. if (Propel::isInit()) {
  786. // the MapBuilder classes register themselves with Propel during initialization
  787. // so we need to load them here.
  788. try {
  789. BaseKataoConfigPeer::getMapBuilder();
  790. } catch (Exception $e) {
  791. Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
  792. }
  793. } else {
  794. // even if Propel is not yet initialized, the map builder class can be registered
  795. // now and then it will be loaded when Propel initializes.
  796. Propel::registerMapBuilder('lib.model.map.KataoConfigMapBuilder');
  797. }