HOR-298 Adds index to APP_CACHE_VIEW table, modifies Schema.xml to properly build in propel.

This commit is contained in:
Chloe Deguzman
2016-03-09 18:15:31 +00:00
parent 591d4f59c4
commit 2eea08ace1
26 changed files with 1884 additions and 1597 deletions

View File

@@ -7,15 +7,15 @@ INSERT INTO `RBAC_PERMISSIONS` VALUES
('00000000000000000000000000000006','PM_ALLCASES','2008-04-30 00:00:00','2008-04-30 00:00:00',1,'00000000000000000000000000000002'), ('00000000000000000000000000000006','PM_ALLCASES','2008-04-30 00:00:00','2008-04-30 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000008','PM_REPORTS','2008-05-12 00:00:00','2008-05-12 00:00:00',0,'00000000000000000000000000000002'), ('00000000000000000000000000000008','PM_REPORTS','2008-05-12 00:00:00','2008-05-12 00:00:00',0,'00000000000000000000000000000002'),
('00000000000000000000000000000007','PM_REASSIGNCASE','2008-05-02 18:16:29','2008-05-02 18:16:29',1,'00000000000000000000000000000002'), ('00000000000000000000000000000007','PM_REASSIGNCASE','2008-05-02 18:16:29','2008-05-02 18:16:29',1,'00000000000000000000000000000002'),
('00000000000000000000000000000009','PM_SUPERVISOR','0000-00-00 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002'), ('00000000000000000000000000000009','PM_SUPERVISOR',NULL,NULL,1,'00000000000000000000000000000002'),
('00000000000000000000000000000010','PM_SETUP_ADVANCE','0000-00-00 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002'), ('00000000000000000000000000000010','PM_SETUP_ADVANCE',NULL,NULL,1,'00000000000000000000000000000002'),
('00000000000000000000000000000011','PM_DASHBOARD','2009-02-18 00:00:00','2009-02-18 00:00:00',1,'00000000000000000000000000000002'), ('00000000000000000000000000000011','PM_DASHBOARD','2009-02-18 00:00:00','2009-02-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000012','PM_WEBDAV','2009-08-21 00:00:00','2009-08-21 00:00:00',1,'00000000000000000000000000000002'), ('00000000000000000000000000000012','PM_WEBDAV','2009-08-21 00:00:00','2009-08-21 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000013','PM_DELETECASE','2009-10-12 00:00:00','0000-00-00 00:00:00',0,'00000000000000000000000000000002'), ('00000000000000000000000000000013','PM_DELETECASE','2009-10-12 00:00:00',NULL,0,'00000000000000000000000000000002'),
('00000000000000000000000000000014','PM_EDITPERSONALINFO','2009-10-12 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002'), ('00000000000000000000000000000014','PM_EDITPERSONALINFO','2009-10-12 00:00:00',NULL,1,'00000000000000000000000000000002'),
('00000000000000000000000000000015','PM_FOLDERS_VIEW','2009-10-12 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002'), ('00000000000000000000000000000015','PM_FOLDERS_VIEW','2009-10-12 00:00:00',NULL,1,'00000000000000000000000000000002'),
('00000000000000000000000000000016','PM_FOLDERS_ADD_FOLDER','2009-10-12 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002'), ('00000000000000000000000000000016','PM_FOLDERS_ADD_FOLDER','2009-10-12 00:00:00',NULL,1,'00000000000000000000000000000002'),
('00000000000000000000000000000017','PM_FOLDERS_ADD_FILE','2009-10-12 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002'), ('00000000000000000000000000000017','PM_FOLDERS_ADD_FILE','2009-10-12 00:00:00',NULL,1,'00000000000000000000000000000002'),
('00000000000000000000000000000018','PM_CANCELCASE','2011-12-11 00:00:00','2011-12-11 00:00:00',1,'00000000000000000000000000000002'), ('00000000000000000000000000000018','PM_CANCELCASE','2011-12-11 00:00:00','2011-12-11 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000019','PM_FOLDER_DELETE','2011-12-11 00:00:00','2011-12-11 00:00:00',1,'00000000000000000000000000000002'); ('00000000000000000000000000000019','PM_FOLDER_DELETE','2011-12-11 00:00:00','2011-12-11 00:00:00',1,'00000000000000000000000000000002');

View File

@@ -1,7 +1,9 @@
<?php <?php
require_once 'propel/map/MapBuilder.php'; require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php'; include_once 'creole/CreoleTypes.php';
/** /**
* This class adds structure of 'ADDONS_MANAGER' table to 'workflow' DatabaseMap object. * This class adds structure of 'ADDONS_MANAGER' table to 'workflow' DatabaseMap object.
* *
@@ -13,23 +15,26 @@ include_once 'creole/CreoleTypes.php';
* (i.e. if it's a text column type). * (i.e. if it's a text column type).
* *
* @package workflow.classes.model.map * @package workflow.classes.model.map
*/ */
class AddonsManagerMapBuilder class AddonsManagerMapBuilder
{ {
/** /**
* The (dot-path) name of this class * The (dot-path) name of this class
*/ */
const CLASS_NAME = 'classes.model.map.AddonsManagerMapBuilder'; const CLASS_NAME = 'classes.model.map.AddonsManagerMapBuilder';
/** /**
* The database map. * The database map.
*/ */
private $dbMap; private $dbMap;
/** /**
* Tells us if this DatabaseMapBuilder is built so that we * Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time. * don't have to re-build it every time.
* *
* @return boolean true if this DatabaseMapBuilder is built, false otherwise. * @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/ */
public function isBuilt() public function isBuilt()
{ {
return ($this->dbMap !== null); return ($this->dbMap !== null);
@@ -39,7 +44,7 @@ class AddonsManagerMapBuilder
* Gets the databasemap this map builder built. * Gets the databasemap this map builder built.
* *
* @return the databasemap * @return the databasemap
*/ */
public function getDatabaseMap() public function getDatabaseMap()
{ {
return $this->dbMap; return $this->dbMap;
@@ -50,13 +55,12 @@ class AddonsManagerMapBuilder
* *
* @return void * @return void
* @throws PropelException * @throws PropelException
*/ */
public function doBuild() public function doBuild()
{ {
$this->dbMap = Propel::getDatabaseMap('workflow'); $this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('ADDONS_MANAGER'); $tMap = $this->dbMap->addTable('ADDONS_MANAGER');
$tMap->setPhpName('AddonsManager'); $tMap->setPhpName('AddonsManager');
$tMap->setUseIdGenerator(false); $tMap->setUseIdGenerator(false);
@@ -96,6 +100,7 @@ class AddonsManagerMapBuilder
$tMap->addColumn('ADDON_DOWNLOAD_PROGRESS', 'AddonDownloadProgress', 'double', CreoleTypes::FLOAT, false, null); $tMap->addColumn('ADDON_DOWNLOAD_PROGRESS', 'AddonDownloadProgress', 'double', CreoleTypes::FLOAT, false, null);
$tMap->addColumn('ADDON_DOWNLOAD_MD5', 'AddonDownloadMd5', 'string', CreoleTypes::VARCHAR, false, 32); $tMap->addColumn('ADDON_DOWNLOAD_MD5', 'AddonDownloadMd5', 'string', CreoleTypes::VARCHAR, false, 32);
}
}
} // doBuild()
} // AddonsManagerMapBuilder

View File

@@ -99,7 +99,7 @@ class AppMessageMapBuilder
$tMap->addColumn('APP_MSG_SHOW_MESSAGE', 'AppMsgShowMessage', 'int', CreoleTypes::TINYINT, true, null); $tMap->addColumn('APP_MSG_SHOW_MESSAGE', 'AppMsgShowMessage', 'int', CreoleTypes::TINYINT, true, null);
$tMap->addColumn('APP_MSG_ERROR', 'AppMsgError', 'string', CreoleTypes::LONGVARCHAR, true, null); $tMap->addColumn('APP_MSG_ERROR', 'AppMsgError', 'string', CreoleTypes::LONGVARCHAR, false, null);
} // doBuild() } // doBuild()

View File

@@ -73,7 +73,7 @@ class DashboardIndicatorMapBuilder
$tMap->addColumn('DAS_IND_TITLE', 'DasIndTitle', 'string', CreoleTypes::VARCHAR, true, 255); $tMap->addColumn('DAS_IND_TITLE', 'DasIndTitle', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('DAS_IND_GOAL', 'DasIndGoal', 'double', CreoleTypes::DECIMAL, true, 7,2); $tMap->addColumn('DAS_IND_GOAL', 'DasIndGoal', 'double', CreoleTypes::DECIMAL, false, 7,2);
$tMap->addColumn('DAS_IND_DIRECTION', 'DasIndDirection', 'int', CreoleTypes::TINYINT, true, null); $tMap->addColumn('DAS_IND_DIRECTION', 'DasIndDirection', 'int', CreoleTypes::TINYINT, true, null);

View File

@@ -77,7 +77,7 @@ class DbSourceMapBuilder
$tMap->addColumn('DBS_USERNAME', 'DbsUsername', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addColumn('DBS_USERNAME', 'DbsUsername', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('DBS_PASSWORD', 'DbsPassword', 'string', CreoleTypes::VARCHAR, false, 32); $tMap->addColumn('DBS_PASSWORD', 'DbsPassword', 'string', CreoleTypes::VARCHAR, false, 256);
$tMap->addColumn('DBS_PORT', 'DbsPort', 'int', CreoleTypes::INTEGER, false, null); $tMap->addColumn('DBS_PORT', 'DbsPort', 'int', CreoleTypes::INTEGER, false, null);

View File

@@ -87,7 +87,7 @@ class EmailServerMapBuilder
$tMap->addColumn('MESS_TRY_SEND_INMEDIATLY', 'MessTrySendInmediatly', 'int', CreoleTypes::INTEGER, true, null); $tMap->addColumn('MESS_TRY_SEND_INMEDIATLY', 'MessTrySendInmediatly', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('MAIL_TO', 'MailTo', 'string', CreoleTypes::VARCHAR, true, 256); $tMap->addColumn('MAIL_TO', 'MailTo', 'string', CreoleTypes::VARCHAR, false, 256);
$tMap->addColumn('MESS_DEFAULT', 'MessDefault', 'int', CreoleTypes::INTEGER, true, null); $tMap->addColumn('MESS_DEFAULT', 'MessDefault', 'int', CreoleTypes::INTEGER, true, null);

View File

@@ -14,25 +14,27 @@ include_once 'creole/CreoleTypes.php';
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type). * (i.e. if it's a text column type).
* *
* @package classes.model.map * @package workflow.classes.model.map
*/ */
class LicenseManagerMapBuilder class LicenseManagerMapBuilder
{ {
/** /**
* The (dot-path) name of this class * The (dot-path) name of this class
*/ */
const CLASS_NAME = 'classes.model.map.LicenseManagerMapBuilder'; const CLASS_NAME = 'classes.model.map.LicenseManagerMapBuilder';
/** /**
* The database map. * The database map.
*/ */
private $dbMap; private $dbMap;
/** /**
* Tells us if this DatabaseMapBuilder is built so that we * Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time. * don't have to re-build it every time.
* *
* @return boolean true if this DatabaseMapBuilder is built, false otherwise. * @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/ */
public function isBuilt() public function isBuilt()
{ {
return ($this->dbMap !== null); return ($this->dbMap !== null);
@@ -53,20 +55,19 @@ class LicenseManagerMapBuilder
* *
* @return void * @return void
* @throws PropelException * @throws PropelException
*/ */
public function doBuild() public function doBuild()
{ {
$this->dbMap = Propel::getDatabaseMap('workflow'); $this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('LICENSE_MANAGER'); $tMap = $this->dbMap->addTable('LICENSE_MANAGER');
$tMap->setPhpName('LicenseManager'); $tMap->setPhpName('LicenseManager');
$tMap->setUseIdGenerator(false); $tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('LICENSE_UID', 'LicenseUid', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addPrimaryKey('LICENSE_UID', 'LicenseUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('LICENSE_USER', 'LicenseUser', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addColumn('LICENSE_USER', 'LicenseUser', 'string', CreoleTypes::VARCHAR, true, 150);
$tMap->addColumn('LICENSE_START', 'LicenseStart', 'int', CreoleTypes::INTEGER, true, null); $tMap->addColumn('LICENSE_START', 'LicenseStart', 'int', CreoleTypes::INTEGER, true, null);
@@ -74,7 +75,7 @@ class LicenseManagerMapBuilder
$tMap->addColumn('LICENSE_SPAN', 'LicenseSpan', 'int', CreoleTypes::INTEGER, true, null); $tMap->addColumn('LICENSE_SPAN', 'LicenseSpan', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('LICENSE_STATUS', 'LicenseStatus', 'string', CreoleTypes::VARCHAR, false, 100); $tMap->addColumn('LICENSE_STATUS', 'LicenseStatus', 'string', CreoleTypes::VARCHAR, true, 100);
$tMap->addColumn('LICENSE_DATA', 'LicenseData', 'string', CreoleTypes::LONGVARCHAR, true, null); $tMap->addColumn('LICENSE_DATA', 'LicenseData', 'string', CreoleTypes::LONGVARCHAR, true, null);
@@ -83,6 +84,7 @@ class LicenseManagerMapBuilder
$tMap->addColumn('LICENSE_WORKSPACE', 'LicenseWorkspace', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addColumn('LICENSE_WORKSPACE', 'LicenseWorkspace', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('LICENSE_TYPE', 'LicenseType', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addColumn('LICENSE_TYPE', 'LicenseType', 'string', CreoleTypes::VARCHAR, true, 32);
}
}
} // doBuild()
} // LicenseManagerMapBuilder

View File

@@ -89,6 +89,10 @@ class ProReportingMapBuilder
$tMap->addColumn('TOTAL_CASES_ON_TIME', 'TotalCasesOnTime', 'double', CreoleTypes::DECIMAL, false, 7,2); $tMap->addColumn('TOTAL_CASES_ON_TIME', 'TotalCasesOnTime', 'double', CreoleTypes::DECIMAL, false, 7,2);
$tMap->addColumn('PRO_COST', 'ProCost', 'double', CreoleTypes::DECIMAL, false, 7,2);
$tMap->addColumn('PRO_UNIT_COST', 'ProUnitCost', 'string', CreoleTypes::VARCHAR, false, 50);
} // doBuild() } // doBuild()
} // ProReportingMapBuilder } // ProReportingMapBuilder

View File

@@ -141,7 +141,7 @@ class UsersMapBuilder
$tMap->addColumn('USR_TIME_ZONE', 'UsrTimeZone', 'string', CreoleTypes::VARCHAR, false, 100); $tMap->addColumn('USR_TIME_ZONE', 'UsrTimeZone', 'string', CreoleTypes::VARCHAR, false, 100);
$tMap->addColumn('USR_DEFAULT_LANG', 'UsrDefaultLang', 'string', CreoleTypes::VARCHAR, true, 10); $tMap->addColumn('USR_DEFAULT_LANG', 'UsrDefaultLang', 'string', CreoleTypes::VARCHAR, false, 10);
$tMap->addValidator('USR_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'ACTIVE|INACTIVE|VACATION|CLOSED', 'Please select a valid type.'); $tMap->addValidator('USR_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'ACTIVE|INACTIVE|VACATION|CLOSED', 'Please select a valid type.');

View File

@@ -8,133 +8,87 @@ include_once 'classes/model/AddonsManager.php';
/** /**
* Base static class for performing query and update operations on the 'ADDONS_MANAGER' table. * Base static class for performing query and update operations on the 'ADDONS_MANAGER' table.
* *
*
* *
* * @package workflow.classes.model.om
* @package workflow.classes.model.om
*/ */
abstract class BaseAddonsManagerPeer abstract class BaseAddonsManagerPeer
{ {
/** /** the default database name for this class */
* the default database name for this class
*/
const DATABASE_NAME = 'workflow'; const DATABASE_NAME = 'workflow';
/** /** the table name for this class */
* the table name for this class
*/
const TABLE_NAME = 'ADDONS_MANAGER'; const TABLE_NAME = 'ADDONS_MANAGER';
/** /** A class that can be returned by this peer. */
* A class that can be returned by this peer.
*/
const CLASS_DEFAULT = 'classes.model.AddonsManager'; const CLASS_DEFAULT = 'classes.model.AddonsManager';
/** /** The total number of columns. */
* The total number of columns.
*/
const NUM_COLUMNS = 18; const NUM_COLUMNS = 18;
/** /** The number of lazy-loaded columns. */
* The number of lazy-loaded columns.
*/
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
/**
* the column name for the ADDON_ID field /** the column name for the ADDON_ID field */
*/
const ADDON_ID = 'ADDONS_MANAGER.ADDON_ID'; const ADDON_ID = 'ADDONS_MANAGER.ADDON_ID';
/** /** the column name for the STORE_ID field */
* the column name for the STORE_ID field
*/
const STORE_ID = 'ADDONS_MANAGER.STORE_ID'; const STORE_ID = 'ADDONS_MANAGER.STORE_ID';
/** /** the column name for the ADDON_NAME field */
* the column name for the ADDON_NAME field
*/
const ADDON_NAME = 'ADDONS_MANAGER.ADDON_NAME'; const ADDON_NAME = 'ADDONS_MANAGER.ADDON_NAME';
/** /** the column name for the ADDON_NICK field */
* the column name for the ADDON_NICK field
*/
const ADDON_NICK = 'ADDONS_MANAGER.ADDON_NICK'; const ADDON_NICK = 'ADDONS_MANAGER.ADDON_NICK';
/** /** the column name for the ADDON_DOWNLOAD_FILENAME field */
* the column name for the ADDON_DOWNLOAD_FILENAME field
*/
const ADDON_DOWNLOAD_FILENAME = 'ADDONS_MANAGER.ADDON_DOWNLOAD_FILENAME'; const ADDON_DOWNLOAD_FILENAME = 'ADDONS_MANAGER.ADDON_DOWNLOAD_FILENAME';
/** /** the column name for the ADDON_DESCRIPTION field */
* the column name for the ADDON_DESCRIPTION field
*/
const ADDON_DESCRIPTION = 'ADDONS_MANAGER.ADDON_DESCRIPTION'; const ADDON_DESCRIPTION = 'ADDONS_MANAGER.ADDON_DESCRIPTION';
/** /** the column name for the ADDON_STATE field */
* the column name for the ADDON_STATE field
*/
const ADDON_STATE = 'ADDONS_MANAGER.ADDON_STATE'; const ADDON_STATE = 'ADDONS_MANAGER.ADDON_STATE';
/** /** the column name for the ADDON_STATE_CHANGED field */
* the column name for the ADDON_STATE_CHANGED field
*/
const ADDON_STATE_CHANGED = 'ADDONS_MANAGER.ADDON_STATE_CHANGED'; const ADDON_STATE_CHANGED = 'ADDONS_MANAGER.ADDON_STATE_CHANGED';
/** /** the column name for the ADDON_STATUS field */
* the column name for the ADDON_STATUS field
*/
const ADDON_STATUS = 'ADDONS_MANAGER.ADDON_STATUS'; const ADDON_STATUS = 'ADDONS_MANAGER.ADDON_STATUS';
/** /** the column name for the ADDON_VERSION field */
* the column name for the ADDON_VERSION field
*/
const ADDON_VERSION = 'ADDONS_MANAGER.ADDON_VERSION'; const ADDON_VERSION = 'ADDONS_MANAGER.ADDON_VERSION';
/** /** the column name for the ADDON_TYPE field */
* the column name for the ADDON_TYPE field
*/
const ADDON_TYPE = 'ADDONS_MANAGER.ADDON_TYPE'; const ADDON_TYPE = 'ADDONS_MANAGER.ADDON_TYPE';
/** /** the column name for the ADDON_PUBLISHER field */
* the column name for the ADDON_PUBLISHER field
*/
const ADDON_PUBLISHER = 'ADDONS_MANAGER.ADDON_PUBLISHER'; const ADDON_PUBLISHER = 'ADDONS_MANAGER.ADDON_PUBLISHER';
/** /** the column name for the ADDON_RELEASE_DATE field */
* the column name for the ADDON_RELEASE_DATE field
*/
const ADDON_RELEASE_DATE = 'ADDONS_MANAGER.ADDON_RELEASE_DATE'; const ADDON_RELEASE_DATE = 'ADDONS_MANAGER.ADDON_RELEASE_DATE';
/** /** the column name for the ADDON_RELEASE_TYPE field */
* the column name for the ADDON_RELEASE_TYPE field
*/
const ADDON_RELEASE_TYPE = 'ADDONS_MANAGER.ADDON_RELEASE_TYPE'; const ADDON_RELEASE_TYPE = 'ADDONS_MANAGER.ADDON_RELEASE_TYPE';
/** /** the column name for the ADDON_RELEASE_NOTES field */
* the column name for the ADDON_RELEASE_NOTES field
*/
const ADDON_RELEASE_NOTES = 'ADDONS_MANAGER.ADDON_RELEASE_NOTES'; const ADDON_RELEASE_NOTES = 'ADDONS_MANAGER.ADDON_RELEASE_NOTES';
/** /** the column name for the ADDON_DOWNLOAD_URL field */
* the column name for the ADDON_DOWNLOAD_URL field
*/
const ADDON_DOWNLOAD_URL = 'ADDONS_MANAGER.ADDON_DOWNLOAD_URL'; const ADDON_DOWNLOAD_URL = 'ADDONS_MANAGER.ADDON_DOWNLOAD_URL';
/** /** the column name for the ADDON_DOWNLOAD_PROGRESS field */
* the column name for the ADDON_DOWNLOAD_PROGRESS field
*/
const ADDON_DOWNLOAD_PROGRESS = 'ADDONS_MANAGER.ADDON_DOWNLOAD_PROGRESS'; const ADDON_DOWNLOAD_PROGRESS = 'ADDONS_MANAGER.ADDON_DOWNLOAD_PROGRESS';
/** /** the column name for the ADDON_DOWNLOAD_MD5 field */
* the column name for the ADDON_DOWNLOAD_MD5 field
*/
const ADDON_DOWNLOAD_MD5 = 'ADDONS_MANAGER.ADDON_DOWNLOAD_MD5'; const ADDON_DOWNLOAD_MD5 = 'ADDONS_MANAGER.ADDON_DOWNLOAD_MD5';
/** /** The PHP to DB Name Mapping */
* The PHP to DB Name Mapping
*/
private static $phpNameMap = null; private static $phpNameMap = null;
/** /**
* holds an array of fieldnames * holds an array of fieldnames
* *
@@ -142,10 +96,10 @@ abstract class BaseAddonsManagerPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AddonId','StoreId','AddonName','AddonNick','AddonDownloadFilename','AddonDescription','AddonState','AddonStateChanged','AddonStatus','AddonVersion','AddonType','AddonPublisher','AddonReleaseDate','AddonReleaseType','AddonReleaseNotes','AddonDownloadUrl','AddonDownloadProgress','AddonDownloadMd5'), BasePeer::TYPE_PHPNAME => array ('AddonId', 'StoreId', 'AddonName', 'AddonNick', 'AddonDownloadFilename', 'AddonDescription', 'AddonState', 'AddonStateChanged', 'AddonStatus', 'AddonVersion', 'AddonType', 'AddonPublisher', 'AddonReleaseDate', 'AddonReleaseType', 'AddonReleaseNotes', 'AddonDownloadUrl', 'AddonDownloadProgress', 'AddonDownloadMd5', ),
BasePeer::TYPE_COLNAME => array (AddonsManagerPeer::ADDON_ID,AddonsManagerPeer::STORE_ID,AddonsManagerPeer::ADDON_NAME,AddonsManagerPeer::ADDON_NICK,AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME,AddonsManagerPeer::ADDON_DESCRIPTION,AddonsManagerPeer::ADDON_STATE,AddonsManagerPeer::ADDON_STATE_CHANGED,AddonsManagerPeer::ADDON_STATUS,AddonsManagerPeer::ADDON_VERSION,AddonsManagerPeer::ADDON_TYPE,AddonsManagerPeer::ADDON_PUBLISHER,AddonsManagerPeer::ADDON_RELEASE_DATE,AddonsManagerPeer::ADDON_RELEASE_TYPE,AddonsManagerPeer::ADDON_RELEASE_NOTES,AddonsManagerPeer::ADDON_DOWNLOAD_URL,AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS,AddonsManagerPeer::ADDON_DOWNLOAD_MD5), BasePeer::TYPE_COLNAME => array (AddonsManagerPeer::ADDON_ID, AddonsManagerPeer::STORE_ID, AddonsManagerPeer::ADDON_NAME, AddonsManagerPeer::ADDON_NICK, AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME, AddonsManagerPeer::ADDON_DESCRIPTION, AddonsManagerPeer::ADDON_STATE, AddonsManagerPeer::ADDON_STATE_CHANGED, AddonsManagerPeer::ADDON_STATUS, AddonsManagerPeer::ADDON_VERSION, AddonsManagerPeer::ADDON_TYPE, AddonsManagerPeer::ADDON_PUBLISHER, AddonsManagerPeer::ADDON_RELEASE_DATE, AddonsManagerPeer::ADDON_RELEASE_TYPE, AddonsManagerPeer::ADDON_RELEASE_NOTES, AddonsManagerPeer::ADDON_DOWNLOAD_URL, AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS, AddonsManagerPeer::ADDON_DOWNLOAD_MD5, ),
BasePeer::TYPE_FIELDNAME => array ('ADDON_ID','STORE_ID','ADDON_NAME','ADDON_NICK','ADDON_DOWNLOAD_FILENAME','ADDON_DESCRIPTION','ADDON_STATE','ADDON_STATE_CHANGED','ADDON_STATUS','ADDON_VERSION','ADDON_TYPE','ADDON_PUBLISHER','ADDON_RELEASE_DATE','ADDON_RELEASE_TYPE','ADDON_RELEASE_NOTES','ADDON_DOWNLOAD_URL','ADDON_DOWNLOAD_PROGRESS','ADDON_DOWNLOAD_MD5'), BasePeer::TYPE_FIELDNAME => array ('ADDON_ID', 'STORE_ID', 'ADDON_NAME', 'ADDON_NICK', 'ADDON_DOWNLOAD_FILENAME', 'ADDON_DESCRIPTION', 'ADDON_STATE', 'ADDON_STATE_CHANGED', 'ADDON_STATUS', 'ADDON_VERSION', 'ADDON_TYPE', 'ADDON_PUBLISHER', 'ADDON_RELEASE_DATE', 'ADDON_RELEASE_TYPE', 'ADDON_RELEASE_NOTES', 'ADDON_DOWNLOAD_URL', 'ADDON_DOWNLOAD_PROGRESS', 'ADDON_DOWNLOAD_MD5', ),
BasePeer::TYPE_NUM => array (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
); );
/** /**
@@ -155,38 +109,36 @@ abstract class BaseAddonsManagerPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AddonId' => 0,'StoreId' => 1,'AddonName' => 2,'AddonNick' => 3,'AddonDownloadFilename' => 4,'AddonDescription' => 5,'AddonState' => 6,'AddonStateChanged' => 7,'AddonStatus' => 8,'AddonVersion' => 9,'AddonType' => 10,'AddonPublisher' => 11,'AddonReleaseDate' => 12,'AddonReleaseType' => 13,'AddonReleaseNotes' => 14,'AddonDownloadUrl' => 15,'AddonDownloadProgress' => 16,'AddonDownloadMd5' => 17), BasePeer::TYPE_PHPNAME => array ('AddonId' => 0, 'StoreId' => 1, 'AddonName' => 2, 'AddonNick' => 3, 'AddonDownloadFilename' => 4, 'AddonDescription' => 5, 'AddonState' => 6, 'AddonStateChanged' => 7, 'AddonStatus' => 8, 'AddonVersion' => 9, 'AddonType' => 10, 'AddonPublisher' => 11, 'AddonReleaseDate' => 12, 'AddonReleaseType' => 13, 'AddonReleaseNotes' => 14, 'AddonDownloadUrl' => 15, 'AddonDownloadProgress' => 16, 'AddonDownloadMd5' => 17, ),
BasePeer::TYPE_COLNAME => array (AddonsManagerPeer::ADDON_ID => 0,AddonsManagerPeer::STORE_ID => 1,AddonsManagerPeer::ADDON_NAME => 2,AddonsManagerPeer::ADDON_NICK => 3,AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME => 4,AddonsManagerPeer::ADDON_DESCRIPTION => 5,AddonsManagerPeer::ADDON_STATE => 6,AddonsManagerPeer::ADDON_STATE_CHANGED => 7,AddonsManagerPeer::ADDON_STATUS => 8,AddonsManagerPeer::ADDON_VERSION => 9,AddonsManagerPeer::ADDON_TYPE => 10,AddonsManagerPeer::ADDON_PUBLISHER => 11,AddonsManagerPeer::ADDON_RELEASE_DATE => 12,AddonsManagerPeer::ADDON_RELEASE_TYPE => 13,AddonsManagerPeer::ADDON_RELEASE_NOTES => 14,AddonsManagerPeer::ADDON_DOWNLOAD_URL => 15,AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS => 16,AddonsManagerPeer::ADDON_DOWNLOAD_MD5 => 17), BasePeer::TYPE_COLNAME => array (AddonsManagerPeer::ADDON_ID => 0, AddonsManagerPeer::STORE_ID => 1, AddonsManagerPeer::ADDON_NAME => 2, AddonsManagerPeer::ADDON_NICK => 3, AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME => 4, AddonsManagerPeer::ADDON_DESCRIPTION => 5, AddonsManagerPeer::ADDON_STATE => 6, AddonsManagerPeer::ADDON_STATE_CHANGED => 7, AddonsManagerPeer::ADDON_STATUS => 8, AddonsManagerPeer::ADDON_VERSION => 9, AddonsManagerPeer::ADDON_TYPE => 10, AddonsManagerPeer::ADDON_PUBLISHER => 11, AddonsManagerPeer::ADDON_RELEASE_DATE => 12, AddonsManagerPeer::ADDON_RELEASE_TYPE => 13, AddonsManagerPeer::ADDON_RELEASE_NOTES => 14, AddonsManagerPeer::ADDON_DOWNLOAD_URL => 15, AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS => 16, AddonsManagerPeer::ADDON_DOWNLOAD_MD5 => 17, ),
BasePeer::TYPE_FIELDNAME => array ('ADDON_ID' => 0,'STORE_ID' => 1,'ADDON_NAME' => 2,'ADDON_NICK' => 3,'ADDON_DOWNLOAD_FILENAME' => 4,'ADDON_DESCRIPTION' => 5,'ADDON_STATE' => 6,'ADDON_STATE_CHANGED' => 7,'ADDON_STATUS' => 8,'ADDON_VERSION' => 9,'ADDON_TYPE' => 10,'ADDON_PUBLISHER' => 11,'ADDON_RELEASE_DATE' => 12,'ADDON_RELEASE_TYPE' => 13,'ADDON_RELEASE_NOTES' => 14,'ADDON_DOWNLOAD_URL' => 15,'ADDON_DOWNLOAD_PROGRESS' => 16,'ADDON_DOWNLOAD_MD5' => 17), BasePeer::TYPE_FIELDNAME => array ('ADDON_ID' => 0, 'STORE_ID' => 1, 'ADDON_NAME' => 2, 'ADDON_NICK' => 3, 'ADDON_DOWNLOAD_FILENAME' => 4, 'ADDON_DESCRIPTION' => 5, 'ADDON_STATE' => 6, 'ADDON_STATE_CHANGED' => 7, 'ADDON_STATUS' => 8, 'ADDON_VERSION' => 9, 'ADDON_TYPE' => 10, 'ADDON_PUBLISHER' => 11, 'ADDON_RELEASE_DATE' => 12, 'ADDON_RELEASE_TYPE' => 13, 'ADDON_RELEASE_NOTES' => 14, 'ADDON_DOWNLOAD_URL' => 15, 'ADDON_DOWNLOAD_PROGRESS' => 16, 'ADDON_DOWNLOAD_MD5' => 17, ),
BasePeer::TYPE_NUM => array (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
); );
/** /**
* * @return MapBuilder the map builder for this peer
* @return MapBuilder the map builder for this peer * @throws PropelException Any exceptions caught during processing will be
* @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException.
* rethrown wrapped into a PropelException.
*/ */
public static function getMapBuilder () public static function getMapBuilder()
{ {
include_once 'classes/model/map/AddonsManagerMapBuilder.php'; include_once 'classes/model/map/AddonsManagerMapBuilder.php';
return BasePeer::getMapBuilder( 'classes.model.map.AddonsManagerMapBuilder' ); return BasePeer::getMapBuilder('classes.model.map.AddonsManagerMapBuilder');
} }
/** /**
* Gets a map (hash) of PHP names to DB column names. * Gets a map (hash) of PHP names to DB column names.
* *
* @return array The PHP to DB name map for this peer * @return array The PHP to DB name map for this peer
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/ */
public static function getPhpNameMap () public static function getPhpNameMap()
{ {
if (self::$phpNameMap === null) { if (self::$phpNameMap === null) {
$map = AddonsManagerPeer::getTableMap(); $map = AddonsManagerPeer::getTableMap();
$columns = $map->getColumns(); $columns = $map->getColumns();
$nameMap = array (); $nameMap = array();
foreach ($columns as $column) { foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName(); $nameMap[$column->getPhpName()] = $column->getColumnName();
} }
@@ -194,22 +146,21 @@ abstract class BaseAddonsManagerPeer
} }
return self::$phpNameMap; return self::$phpNameMap;
} }
/** /**
* Translates a fieldname to another type * Translates a fieldname to another type
* *
* @param string $name field name * @param string $name field name
* @param string $fromType One of the class type constants TYPE_PHPNAME, * @param string $fromType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @param string $toType One of the class type constants * @param string $toType One of the class type constants
* @return string translated name of the field. * @return string translated name of the field.
*/ */
static public function translateFieldName ($name, $fromType, $toType) static public function translateFieldName($name, $fromType, $toType)
{ {
$toNames = self::getFieldNames( $toType ); $toNames = self::getFieldNames($toType);
$key = isset( self::$fieldKeys[$fromType][$name] ) ? self::$fieldKeys[$fromType][$name] : null; $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
if ($key === null) { if ($key === null) {
throw new PropelException( "'$name' could not be found in the field names of type '$fromType'. These are: " . print_r( self::$fieldKeys[$fromType], true ) ); throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
} }
return $toNames[$key]; return $toNames[$key];
} }
@@ -217,16 +168,16 @@ abstract class BaseAddonsManagerPeer
/** /**
* Returns an array of of field names. * Returns an array of of field names.
* *
* @param string $type The type of fieldnames to return: * @param string $type The type of fieldnames to return:
* One of the class type constants TYPE_PHPNAME, * One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return array A list of field names * @return array A list of field names
*/ */
static public function getFieldNames ($type = BasePeer::TYPE_PHPNAME) static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{ {
if (! array_key_exists( $type, self::$fieldNames )) { if (!array_key_exists($type, self::$fieldNames)) {
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.' ); 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.');
} }
return self::$fieldNames[$type]; return self::$fieldNames[$type];
} }
@@ -236,17 +187,16 @@ abstract class BaseAddonsManagerPeer
* *
* Using this method you can maintain SQL abstraction while using column aliases. * Using this method you can maintain SQL abstraction while using column aliases.
* <code> * <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME); * $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code> * </code>
* * @param string $alias The alias for the current table.
* @param string $alias The alias for the current table. * @param string $column The column name for current table. (i.e. AddonsManagerPeer::COLUMN_NAME).
* @param string $column The column name for current table. (i.e. AddonsManagerPeer::COLUMN_NAME). * @return string
* @return string
*/ */
public static function alias ($alias, $column) public static function alias($alias, $column)
{ {
return str_replace( AddonsManagerPeer::TABLE_NAME . '.', $alias . '.', $column ); return str_replace(AddonsManagerPeer::TABLE_NAME.'.', $alias.'.', $column);
} }
/** /**
@@ -256,48 +206,48 @@ abstract class BaseAddonsManagerPeer
* XML schema will not be added to the select list and only loaded * XML schema will not be added to the select list and only loaded
* on demand. * on demand.
* *
* @param criteria object containing the columns to add. * @param criteria object containing the columns to add.
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function addSelectColumns (Criteria $criteria) public static function addSelectColumns(Criteria $criteria)
{ {
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_ID ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_ID);
$criteria->addSelectColumn( AddonsManagerPeer::STORE_ID ); $criteria->addSelectColumn(AddonsManagerPeer::STORE_ID);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_NAME ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_NAME);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_NICK ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_NICK);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_FILENAME);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_DESCRIPTION ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DESCRIPTION);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_STATE ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_STATE);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_STATE_CHANGED ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_STATE_CHANGED);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_STATUS ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_STATUS);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_VERSION ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_VERSION);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_TYPE ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_TYPE);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_PUBLISHER ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_PUBLISHER);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_RELEASE_DATE ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_RELEASE_DATE);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_RELEASE_TYPE ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_RELEASE_TYPE);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_RELEASE_NOTES ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_RELEASE_NOTES);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_DOWNLOAD_URL ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_URL);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_PROGRESS);
$criteria->addSelectColumn( AddonsManagerPeer::ADDON_DOWNLOAD_MD5 ); $criteria->addSelectColumn(AddonsManagerPeer::ADDON_DOWNLOAD_MD5);
} }
@@ -307,72 +257,69 @@ abstract class BaseAddonsManagerPeer
/** /**
* Returns the number of rows matching criteria. * Returns the number of rows matching criteria.
* *
* @param Criteria $criteria * @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
* @param Connection $con * @param Connection $con
* @return int Number of matching rows. * @return int Number of matching rows.
*/ */
public static function doCount (Criteria $criteria, $distinct = false, $con = null) public static function doCount(Criteria $criteria, $distinct = false, $con = null)
{ {
// we're going to modify criteria, so copy it first // we're going to modify criteria, so copy it first
$criteria = clone $criteria; $criteria = clone $criteria;
// clear out anything that might confuse the ORDER BY clause // clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns(); $criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array( Criteria::DISTINCT, $criteria->getSelectModifiers() )) { if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn( AddonsManagerPeer::COUNT_DISTINCT ); $criteria->addSelectColumn(AddonsManagerPeer::COUNT_DISTINCT);
} else { } else {
$criteria->addSelectColumn( AddonsManagerPeer::COUNT ); $criteria->addSelectColumn(AddonsManagerPeer::COUNT);
} }
// just in case we're grouping: add those columns to the select statement // just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) { foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn( $column ); $criteria->addSelectColumn($column);
} }
$rs = AddonsManagerPeer::doSelectRS( $criteria, $con ); $rs = AddonsManagerPeer::doSelectRS($criteria, $con);
if ($rs->next()) { if ($rs->next()) {
return $rs->getInt( 1 ); return $rs->getInt(1);
} else { } else {
// no rows returned; we infer that means 0 matches. // no rows returned; we infer that means 0 matches.
return 0; return 0;
} }
} }
/** /**
* Method to select one object from the DB. * Method to select one object from the DB.
* *
* @param Criteria $criteria object used to create the SELECT statement. * @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con * @param Connection $con
* @return AddonsManager * @return AddonsManager
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doSelectOne (Criteria $criteria, $con = null) public static function doSelectOne(Criteria $criteria, $con = null)
{ {
$critcopy = clone $criteria; $critcopy = clone $criteria;
$critcopy->setLimit( 1 ); $critcopy->setLimit(1);
$objects = AddonsManagerPeer::doSelect( $critcopy, $con ); $objects = AddonsManagerPeer::doSelect($critcopy, $con);
if ($objects) { if ($objects) {
return $objects[0]; return $objects[0];
} }
return null; return null;
} }
/** /**
* Method to do selects. * Method to do selects.
* *
* @param Criteria $criteria The Criteria object used to build the SELECT statement. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con * @param Connection $con
* @return array Array of selected Objects * @return array Array of selected Objects
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doSelect (Criteria $criteria, $con = null) public static function doSelect(Criteria $criteria, $con = null)
{ {
return AddonsManagerPeer::populateObjects( AddonsManagerPeer::doSelectRS( $criteria, $con ) ); return AddonsManagerPeer::populateObjects(AddonsManagerPeer::doSelectRS($criteria, $con));
} }
/** /**
* Prepares the Criteria object and uses the parent doSelect() * Prepares the Criteria object and uses the parent doSelect()
* method to get a ResultSet. * method to get a ResultSet.
@@ -380,68 +327,65 @@ abstract class BaseAddonsManagerPeer
* Use this method directly if you want to just get the resultset * Use this method directly if you want to just get the resultset
* (instead of an array of objects). * (instead of an array of objects).
* *
* @param Criteria $criteria The Criteria object used to build the SELECT statement. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
* @return ResultSet The resultset object with numerically-indexed fields. * @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect() * @see BasePeer::doSelect()
*/ */
public static function doSelectRS (Criteria $criteria, $con = null) public static function doSelectRS(Criteria $criteria, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
if (! $criteria->getSelectColumns()) { if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria; $criteria = clone $criteria;
AddonsManagerPeer::addSelectColumns( $criteria ); AddonsManagerPeer::addSelectColumns($criteria);
} }
// Set the correct dbName // Set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
// BasePeer returns a Creole ResultSet, set to return // BasePeer returns a Creole ResultSet, set to return
// rows indexed numerically. // rows indexed numerically.
return BasePeer::doSelect( $criteria, $con ); return BasePeer::doSelect($criteria, $con);
} }
/** /**
* The returned array will contain objects of the default type or * The returned array will contain objects of the default type or
* objects that inherit from the default. * objects that inherit from the default.
* *
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function populateObjects (ResultSet $rs) public static function populateObjects(ResultSet $rs)
{ {
$results = array (); $results = array();
// set the class once to avoid overhead in the loop // set the class once to avoid overhead in the loop
$cls = AddonsManagerPeer::getOMClass(); $cls = AddonsManagerPeer::getOMClass();
$cls = Propel::import( $cls ); $cls = Propel::import($cls);
// populate the object(s) // populate the object(s)
while ($rs->next()) { while ($rs->next()) {
$obj = new $cls(); $obj = new $cls();
$obj->hydrate( $rs ); $obj->hydrate($rs);
$results[] = $obj; $results[] = $obj;
} }
return $results; return $results;
} }
/** /**
* Returns the TableMap related to this peer. * Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need. * This method is not needed for general use but a specific application could have a need.
* * @return TableMap
* @return TableMap * @throws PropelException Any exceptions caught during processing will be
* @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException.
* rethrown wrapped into a PropelException.
*/ */
public static function getTableMap () public static function getTableMap()
{ {
return Propel::getDatabaseMap( self::DATABASE_NAME )->getTable( self::TABLE_NAME ); return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
} }
/** /**
@@ -451,9 +395,9 @@ abstract class BaseAddonsManagerPeer
* relative to a location on the PHP include_path. * relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php') * (e.g. path.to.MyClass -> 'path/to/MyClass.php')
* *
* @return string path.to.ClassName * @return string path.to.ClassName
*/ */
public static function getOMClass () public static function getOMClass()
{ {
return AddonsManagerPeer::CLASS_DEFAULT; return AddonsManagerPeer::CLASS_DEFAULT;
} }
@@ -461,16 +405,16 @@ abstract class BaseAddonsManagerPeer
/** /**
* Method perform an INSERT on the database, given a AddonsManager or Criteria object. * Method perform an INSERT on the database, given a AddonsManager or Criteria object.
* *
* @param mixed $values Criteria or AddonsManager object containing data that is used to create the INSERT statement. * @param mixed $values Criteria or AddonsManager object containing data that is used to create the INSERT statement.
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return mixed The new primary key. * @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doInsert ($values, $con = null) public static function doInsert($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
if ($values instanceof Criteria) { if ($values instanceof Criteria) {
@@ -479,14 +423,15 @@ abstract class BaseAddonsManagerPeer
$criteria = $values->buildCriteria(); // build Criteria from AddonsManager object $criteria = $values->buildCriteria(); // build Criteria from AddonsManager object
} }
// Set the correct dbName // Set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
try { try {
// use transaction because $criteria could contain info // use transaction because $criteria could contain info
// for more than one table (I guess, conceivably) // for more than one table (I guess, conceivably)
$con->begin(); $con->begin();
$pk = BasePeer::doInsert( $criteria, $con ); $pk = BasePeer::doInsert($criteria, $con);
$con->commit(); $con->commit();
} catch (PropelException $e) { } catch (PropelException $e) {
$con->rollback(); $con->rollback();
@@ -499,57 +444,56 @@ abstract class BaseAddonsManagerPeer
/** /**
* Method perform an UPDATE on the database, given a AddonsManager or Criteria object. * Method perform an UPDATE on the database, given a AddonsManager or Criteria object.
* *
* @param mixed $values Criteria or AddonsManager object containing data that is used to create the UPDATE statement. * @param mixed $values Criteria or AddonsManager object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection object to exert more control over transactions). * @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver). * @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doUpdate ($values, $con = null) public static function doUpdate($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$selectCriteria = new Criteria( self::DATABASE_NAME ); $selectCriteria = new Criteria(self::DATABASE_NAME);
if ($values instanceof Criteria) { if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity $criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison( AddonsManagerPeer::ADDON_ID ); $comparison = $criteria->getComparison(AddonsManagerPeer::ADDON_ID);
$selectCriteria->add( AddonsManagerPeer::ADDON_ID, $criteria->remove( AddonsManagerPeer::ADDON_ID ), $comparison ); $selectCriteria->add(AddonsManagerPeer::ADDON_ID, $criteria->remove(AddonsManagerPeer::ADDON_ID), $comparison);
$comparison = $criteria->getComparison( AddonsManagerPeer::STORE_ID ); $comparison = $criteria->getComparison(AddonsManagerPeer::STORE_ID);
$selectCriteria->add( AddonsManagerPeer::STORE_ID, $criteria->remove( AddonsManagerPeer::STORE_ID ), $comparison ); $selectCriteria->add(AddonsManagerPeer::STORE_ID, $criteria->remove(AddonsManagerPeer::STORE_ID), $comparison);
} else { } else {
// $values is AddonsManager object
$criteria = $values->buildCriteria(); // gets full criteria $criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
} }
// set the correct dbName // set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
return BasePeer::doUpdate( $selectCriteria, $criteria, $con ); return BasePeer::doUpdate($selectCriteria, $criteria, $con);
} }
/** /**
* Method to DELETE all rows from the ADDONS_MANAGER table. * Method to DELETE all rows from the ADDONS_MANAGER table.
* *
* @return int The number of affected rows (if supported by underlying database driver). * @return int The number of affected rows (if supported by underlying database driver).
*/ */
public static function doDeleteAll ($con = null) public static function doDeleteAll($con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$affectedRows = 0; // initialize var to track total num of affected rows $affectedRows = 0; // initialize var to track total num of affected rows
try { try {
// use transaction because $criteria could contain info // use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc. // for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin(); $con->begin();
$affectedRows += BasePeer::doDeleteAll( AddonsManagerPeer::TABLE_NAME, $con ); $affectedRows += BasePeer::doDeleteAll(AddonsManagerPeer::TABLE_NAME, $con);
$con->commit(); $con->commit();
return $affectedRows; return $affectedRows;
} catch (PropelException $e) { } catch (PropelException $e) {
@@ -561,47 +505,49 @@ abstract class BaseAddonsManagerPeer
/** /**
* Method perform a DELETE on the database, given a AddonsManager or Criteria object OR a primary key value. * Method perform a DELETE on the database, given a AddonsManager or Criteria object OR a primary key value.
* *
* @param mixed $values Criteria or AddonsManager object or primary key or array of primary keys * @param mixed $values Criteria or AddonsManager object or primary key or array of primary keys
* which is used to create the DELETE statement * which is used to create the DELETE statement
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows * @return int The number of affected rows (if supported by underlying database driver).
* if supported by native driver or if emulated using Propel. * This includes CASCADE-related rows
* @throws PropelException Any exceptions caught during processing will be * if supported by native driver or if emulated using Propel.
* rethrown wrapped into a PropelException. * @throws PropelException Any exceptions caught during processing will be
*/ * rethrown wrapped into a PropelException.
public static function doDelete ($values, $con = null) */
public static function doDelete($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( AddonsManagerPeer::DATABASE_NAME ); $con = Propel::getConnection(AddonsManagerPeer::DATABASE_NAME);
} }
if ($values instanceof Criteria) { if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity $criteria = clone $values; // rename for clarity
} elseif ($values instanceof AddonsManager) { } elseif ($values instanceof AddonsManager) {
$criteria = $values->buildPkeyCriteria(); $criteria = $values->buildPkeyCriteria();
} else { } else {
// it must be the primary key // it must be the primary key
$criteria = new Criteria( self::DATABASE_NAME ); $criteria = new Criteria(self::DATABASE_NAME);
// primary key is composite; we therefore, expect // primary key is composite; we therefore, expect
// the primary key passed to be an array of pkey // the primary key passed to be an array of pkey
// values // values
if (count( $values ) == count( $values, COUNT_RECURSIVE )) { if (count($values) == count($values, COUNT_RECURSIVE)) {
// array is not multi-dimensional // array is not multi-dimensional
$values = array ( $values = array($values);
$values
);
} }
$vals = array (); $vals = array();
foreach ($values as $value) { foreach ($values as $value) {
$vals[0][] = $value[0]; $vals[0][] = $value[0];
$vals[1][] = $value[1]; $vals[1][] = $value[1];
} }
$criteria->add( AddonsManagerPeer::ADDON_ID, $vals[0], Criteria::IN );
$criteria->add( AddonsManagerPeer::STORE_ID, $vals[1], Criteria::IN ); $criteria->add(AddonsManagerPeer::ADDON_ID, $vals[0], Criteria::IN);
$criteria->add(AddonsManagerPeer::STORE_ID, $vals[1], Criteria::IN);
} }
// Set the correct dbName // Set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows $affectedRows = 0; // initialize var to track total num of affected rows
@@ -610,7 +556,7 @@ abstract class BaseAddonsManagerPeer
// for more than one table or we could emulating ON DELETE CASCADE, etc. // for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin(); $con->begin();
$affectedRows += BasePeer::doDelete( $criteria, $con ); $affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit(); $con->commit();
return $affectedRows; return $affectedRows;
} catch (PropelException $e) { } catch (PropelException $e) {
@@ -626,28 +572,26 @@ abstract class BaseAddonsManagerPeer
* *
* NOTICE: This does not apply to primary or foreign keys for now. * NOTICE: This does not apply to primary or foreign keys for now.
* *
* @param AddonsManager $obj The object to validate. * @param AddonsManager $obj The object to validate.
* @param mixed $cols Column name or array of column names. * @param mixed $cols Column name or array of column names.
* *
* @return mixed TRUE if all columns are valid or the error message of the first invalid column. * @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/ */
public static function doValidate (AddonsManager $obj, $cols = null) public static function doValidate(AddonsManager $obj, $cols = null)
{ {
$columns = array (); $columns = array();
if ($cols) { if ($cols) {
$dbMap = Propel::getDatabaseMap( AddonsManagerPeer::DATABASE_NAME ); $dbMap = Propel::getDatabaseMap(AddonsManagerPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable( AddonsManagerPeer::TABLE_NAME ); $tableMap = $dbMap->getTable(AddonsManagerPeer::TABLE_NAME);
if (! is_array( $cols )) { if (! is_array($cols)) {
$cols = array ( $cols = array($cols);
$cols
);
} }
foreach ($cols as $colName) { foreach ($cols as $colName) {
if ($tableMap->containsColumn( $colName )) { if ($tableMap->containsColumn($colName)) {
$get = 'get' . $tableMap->getColumn( $colName )->getPhpName(); $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
$columns[$colName] = $obj->$get(); $columns[$colName] = $obj->$get();
} }
} }
@@ -655,32 +599,31 @@ abstract class BaseAddonsManagerPeer
} }
return BasePeer::doValidate( AddonsManagerPeer::DATABASE_NAME, AddonsManagerPeer::TABLE_NAME, $columns ); return BasePeer::doValidate(AddonsManagerPeer::DATABASE_NAME, AddonsManagerPeer::TABLE_NAME, $columns);
} }
/** /**
* Retrieve object using using composite pkey values. * Retrieve object using using composite pkey values.
*
* @param string $addon_id * @param string $addon_id
* @param string $store_id * @param string $store_id
* * @param Connection $con
* @param Connection $con * @return AddonsManager
* @return AddonsManager
*/ */
public static function retrieveByPK ($addon_id, $store_id, $con = null) public static function retrieveByPK($addon_id, $store_id, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$criteria = new Criteria(); $criteria = new Criteria();
$criteria->add( AddonsManagerPeer::ADDON_ID, $addon_id ); $criteria->add(AddonsManagerPeer::ADDON_ID, $addon_id);
$criteria->add( AddonsManagerPeer::STORE_ID, $store_id ); $criteria->add(AddonsManagerPeer::STORE_ID, $store_id);
$v = AddonsManagerPeer::doSelect( $criteria, $con ); $v = AddonsManagerPeer::doSelect($criteria, $con);
return ! empty( $v ) ? $v[0] : null; return !empty($v) ? $v[0] : null;
} }
} }
// static code to register the map builder for this Peer with the main Propel class // static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) { if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization // the MapBuilder classes register themselves with Propel during initialization
@@ -688,12 +631,12 @@ if (Propel::isInit()) {
try { try {
BaseAddonsManagerPeer::getMapBuilder(); BaseAddonsManagerPeer::getMapBuilder();
} catch (Exception $e) { } catch (Exception $e) {
Propel::log( 'Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR ); Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
} }
} else { } else {
// even if Propel is not yet initialized, the map builder class can be registered // even if Propel is not yet initialized, the map builder class can be registered
// now and then it will be loaded when Propel initializes. // now and then it will be loaded when Propel initializes.
require_once 'classes/model/map/AddonsManagerMapBuilder.php'; require_once 'classes/model/map/AddonsManagerMapBuilder.php';
Propel::registerMapBuilder( 'classes.model.map.AddonsManagerMapBuilder' ); Propel::registerMapBuilder('classes.model.map.AddonsManagerMapBuilder');
} }

View File

@@ -4,6 +4,7 @@ require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php'; require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php'; include_once 'propel/util/Criteria.php';
include_once 'classes/model/AddonsStorePeer.php'; include_once 'classes/model/AddonsStorePeer.php';
@@ -11,9 +12,9 @@ include_once 'classes/model/AddonsStorePeer.php';
/** /**
* Base class that represents a row from the 'ADDONS_STORE' table. * Base class that represents a row from the 'ADDONS_STORE' table.
* *
*
* *
* * @package workflow.classes.model.om
* @package workflow.classes.model.om
*/ */
abstract class BaseAddonsStore extends BaseObject implements Persistent abstract class BaseAddonsStore extends BaseObject implements Persistent
{ {
@@ -22,144 +23,142 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
* The Peer class. * The Peer class.
* Instance provides a convenient way of calling static methods on a class * Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify. * that calling code may not be able to identify.
* * @var AddonsStorePeer
* @var AddonsStorePeer */
*/
protected static $peer; protected static $peer;
/** /**
* The value for the store_id field. * The value for the store_id field.
* * @var string
* @var string
*/ */
protected $store_id; protected $store_id;
/** /**
* The value for the store_version field. * The value for the store_version field.
* * @var int
* @var int
*/ */
protected $store_version; protected $store_version;
/** /**
* The value for the store_location field. * The value for the store_location field.
* * @var string
* @var string
*/ */
protected $store_location; protected $store_location;
/** /**
* The value for the store_type field. * The value for the store_type field.
* * @var string
* @var string
*/ */
protected $store_type; protected $store_type;
/** /**
* The value for the store_last_updated field. * The value for the store_last_updated field.
* * @var int
* @var int
*/ */
protected $store_last_updated; protected $store_last_updated;
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction. * by another object which falls in this transaction.
* * @var boolean
* @var boolean
*/ */
protected $alreadyInSave = false; protected $alreadyInSave = false;
/** /**
* Flag to prevent endless validation loop, if this object is referenced * Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction. * by another object which falls in this transaction.
* * @var boolean
* @var boolean
*/ */
protected $alreadyInValidation = false; protected $alreadyInValidation = false;
/** /**
* Get the [store_id] column value. * Get the [store_id] column value.
* *
* @return string * @return string
*/ */
public function getStoreId () public function getStoreId()
{ {
return $this->store_id; return $this->store_id;
} }
/** /**
* Get the [store_version] column value. * Get the [store_version] column value.
* *
* @return int * @return int
*/ */
public function getStoreVersion () public function getStoreVersion()
{ {
return $this->store_version; return $this->store_version;
} }
/** /**
* Get the [store_location] column value. * Get the [store_location] column value.
* *
* @return string * @return string
*/ */
public function getStoreLocation () public function getStoreLocation()
{ {
return $this->store_location; return $this->store_location;
} }
/** /**
* Get the [store_type] column value. * Get the [store_type] column value.
* *
* @return string * @return string
*/ */
public function getStoreType () public function getStoreType()
{ {
return $this->store_type; return $this->store_type;
} }
/** /**
* Get the [optionally formatted] [store_last_updated] column value. * Get the [optionally formatted] [store_last_updated] column value.
* *
* @param string $format The date/time format string (either date()-style or strftime()-style). * @param string $format The date/time format string (either date()-style or strftime()-style).
* If format is NULL, then the integer unix timestamp will be returned. * If format is NULL, then the integer unix timestamp will be returned.
* @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL). * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
* @throws PropelException - if unable to convert the date/time to timestamp. * @throws PropelException - if unable to convert the date/time to timestamp.
*/ */
public function getStoreLastUpdated ($format = 'Y-m-d H:i:s') public function getStoreLastUpdated($format = 'Y-m-d H:i:s')
{ {
if ($this->store_last_updated === null || $this->store_last_updated === '') { if ($this->store_last_updated === null || $this->store_last_updated === '') {
return null; return null;
} elseif (! is_int( $this->store_last_updated )) { } elseif (!is_int($this->store_last_updated)) {
// a non-timestamp value was set externally, so we convert it // a non-timestamp value was set externally, so we convert it
$ts = strtotime( $this->store_last_updated ); $ts = strtotime($this->store_last_updated);
if ($ts === - 1 || $ts === false) { if ($ts === -1 || $ts === false) {
// in PHP 5.1 return value changes to FALSE throw new PropelException("Unable to parse value of [store_last_updated] as date/time value: " .
throw new PropelException( "Unable to parse value of [store_last_updated] as date/time value: " . var_export( $this->store_last_updated, true ) ); var_export($this->store_last_updated, true));
} }
} else { } else {
$ts = $this->store_last_updated; $ts = $this->store_last_updated;
} }
if ($format === null) { if ($format === null) {
return $ts; return $ts;
} elseif (strpos( $format, '%' ) !== false) { } elseif (strpos($format, '%') !== false) {
return strftime( $format, $ts ); return strftime($format, $ts);
} else { } else {
return date( $format, $ts ); return date($format, $ts);
} }
} }
/** /**
* Set the value of [store_id] column. * Set the value of [store_id] column.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
public function setStoreId ($v) public function setStoreId($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && ! is_string( $v )) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
@@ -167,78 +166,93 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
$this->store_id = $v; $this->store_id = $v;
$this->modifiedColumns[] = AddonsStorePeer::STORE_ID; $this->modifiedColumns[] = AddonsStorePeer::STORE_ID;
} }
} // setStoreId() } // setStoreId()
/** /**
* Set the value of [store_version] column. * Set the value of [store_version] column.
* *
* @param int $v new value * @param int $v new value
* @return void * @return void
*/ */
public function setStoreVersion ($v) public function setStoreVersion($v)
{ {
// Since the native PHP type for this column is integer, // Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not). // we will cast the input value to an int (if it is not).
if ($v !== null && ! is_int( $v ) && is_numeric( $v )) { if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $v; $v = (int) $v;
} }
if ($this->store_version !== $v) { if ($this->store_version !== $v) {
$this->store_version = $v; $this->store_version = $v;
$this->modifiedColumns[] = AddonsStorePeer::STORE_VERSION; $this->modifiedColumns[] = AddonsStorePeer::STORE_VERSION;
} }
} // setStoreVersion() } // setStoreVersion()
/** /**
* Set the value of [store_location] column. * Set the value of [store_location] column.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
public function setStoreLocation ($v) public function setStoreLocation($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && ! is_string( $v )) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->store_location !== $v) { if ($this->store_location !== $v) {
$this->store_location = $v; $this->store_location = $v;
$this->modifiedColumns[] = AddonsStorePeer::STORE_LOCATION; $this->modifiedColumns[] = AddonsStorePeer::STORE_LOCATION;
} }
} // setStoreLocation() } // setStoreLocation()
/** /**
* Set the value of [store_type] column. * Set the value of [store_type] column.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
public function setStoreType ($v) public function setStoreType($v)
{ {
// Since the native PHP type for this column is string, // Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not). // we will cast the input to a string (if it is not).
if ($v !== null && ! is_string( $v )) { if ($v !== null && !is_string($v)) {
$v = (string) $v; $v = (string) $v;
} }
if ($this->store_type !== $v) { if ($this->store_type !== $v) {
$this->store_type = $v; $this->store_type = $v;
$this->modifiedColumns[] = AddonsStorePeer::STORE_TYPE; $this->modifiedColumns[] = AddonsStorePeer::STORE_TYPE;
} }
} // setStoreType() } // setStoreType()
/** /**
* Set the value of [store_last_updated] column. * Set the value of [store_last_updated] column.
* *
* @param int $v new value * @param int $v new value
* @return void * @return void
*/ */
public function setStoreLastUpdated ($v) public function setStoreLastUpdated($v)
{ {
if ($v !== null && ! is_int( $v )) {
$ts = strtotime( $v ); if ($v !== null && !is_int($v)) {
if ($ts === - 1 || $ts === false) { $ts = strtotime($v);
// in PHP 5.1 return value changes to FALSE //Date/time accepts null values
throw new PropelException( "Unable to parse date/time value for [store_last_updated] from input: " . var_export( $v, true ) ); if ($v == '') {
$ts = null;
}
if ($ts === -1 || $ts === false) {
throw new PropelException("Unable to parse date/time value for [store_last_updated] from input: " .
var_export($v, true));
} }
} else { } else {
$ts = $v; $ts = $v;
@@ -247,68 +261,71 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
$this->store_last_updated = $ts; $this->store_last_updated = $ts;
$this->modifiedColumns[] = AddonsStorePeer::STORE_LAST_UPDATED; $this->modifiedColumns[] = AddonsStorePeer::STORE_LAST_UPDATED;
} }
} // setStoreLastUpdated() } // setStoreLastUpdated()
/** /**
* Hydrates (populates) the object variables with values from the database resultset. * Hydrates (populates) the object variables with values from the database resultset.
* *
* An offset (1-based "start column") is specified so that objects can be hydrated * An offset (1-based "start column") is specified so that objects can be hydrated
* with a subset of the columns in the resultset rows. This is needed, for example, * with a subset of the columns in the resultset rows. This is needed, for example,
* for results of JOIN queries where the resultset row includes columns from two or * for results of JOIN queries where the resultset row includes columns from two or
* more tables. * more tables.
* *
* @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos. * @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos.
* @param int $startcol 1-based offset column which indicates which restultset column to start with. * @param int $startcol 1-based offset column which indicates which restultset column to start with.
* @return int next starting column * @return int next starting column
* @throws PropelException - Any caught Exception will be rewrapped as a PropelException. * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
*/ */
public function hydrate (ResultSet $rs, $startcol = 1) public function hydrate(ResultSet $rs, $startcol = 1)
{ {
try { try {
$this->store_id = $rs->getString( $startcol + 0 ); $this->store_id = $rs->getString($startcol + 0);
$this->store_version = $rs->getInt( $startcol + 1 ); $this->store_version = $rs->getInt($startcol + 1);
$this->store_location = $rs->getString( $startcol + 2 ); $this->store_location = $rs->getString($startcol + 2);
$this->store_type = $rs->getString( $startcol + 3 ); $this->store_type = $rs->getString($startcol + 3);
$this->store_last_updated = $rs->getTimestamp( $startcol + 4, null ); $this->store_last_updated = $rs->getTimestamp($startcol + 4, null);
$this->resetModified(); $this->resetModified();
$this->setNew( false ); $this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer. // FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 5; // 5 = AddonsStorePeer::NUM_COLUMNS - AddonsStorePeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 5; // 5 = AddonsStorePeer::NUM_COLUMNS - AddonsStorePeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException( "Error populating AddonsStore object", $e ); throw new PropelException("Error populating AddonsStore object", $e);
} }
} }
/** /**
* Removes this object from datastore and sets delete attribute. * Removes this object from datastore and sets delete attribute.
* *
* @param Connection $con * @param Connection $con
* @return void * @return void
* @throws PropelException * @throws PropelException
* @see BaseObject::setDeleted() * @see BaseObject::setDeleted()
* @see BaseObject::isDeleted() * @see BaseObject::isDeleted()
*/ */
public function delete ($con = null) public function delete($con = null)
{ {
if ($this->isDeleted()) { if ($this->isDeleted()) {
throw new PropelException( "This object has already been deleted." ); throw new PropelException("This object has already been deleted.");
} }
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( AddonsStorePeer::DATABASE_NAME ); $con = Propel::getConnection(AddonsStorePeer::DATABASE_NAME);
} }
try { try {
$con->begin(); $con->begin();
AddonsStorePeer::doDelete( $this, $con ); AddonsStorePeer::doDelete($this, $con);
$this->setDeleted( true ); $this->setDeleted(true);
$con->commit(); $con->commit();
} catch (PropelException $e) { } catch (PropelException $e) {
$con->rollback(); $con->rollback();
@@ -317,27 +334,28 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
} }
/** /**
* Stores the object in the database. * Stores the object in the database. If the object is new,
* If the object is new, * it inserts it; otherwise an update is performed. This method
* it inserts it; otherwise an update is performed. This method
* wraps the doSave() worker method in a transaction. * wraps the doSave() worker method in a transaction.
* *
* @param Connection $con * @param Connection $con
* @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @return int The number of rows affected by this insert/update
* @throws PropelException * @throws PropelException
* @see doSave() * @see doSave()
*/ */
public function save ($con = null) public function save($con = null)
{ {
if ($this->isDeleted()) { if ($this->isDeleted()) {
throw new PropelException( "You cannot save an object that has been deleted." ); throw new PropelException("You cannot save an object that has been deleted.");
} }
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( AddonsStorePeer::DATABASE_NAME ); $con = Propel::getConnection(AddonsStorePeer::DATABASE_NAME);
} }
try { try {
$con->begin(); $con->begin();
$affectedRows = $this->doSave( $con ); $affectedRows = $this->doSave($con);
$con->commit(); $con->commit();
return $affectedRows; return $affectedRows;
} catch (PropelException $e) { } catch (PropelException $e) {
@@ -352,29 +370,33 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
* If the object is new, it inserts it; otherwise an update is performed. * If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method. * All related objects are also updated in this method.
* *
* @param Connection $con * @param Connection $con
* @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. * @return int The number of rows affected by this insert/update and any referring
* @throws PropelException * @throws PropelException
* @see save() * @see save()
*/ */
protected function doSave ($con) protected function doSave($con)
{ {
$affectedRows = 0; // initialize var to track total num of affected rows $affectedRows = 0; // initialize var to track total num of affected rows
if (! $this->alreadyInSave) { if (!$this->alreadyInSave) {
$this->alreadyInSave = true; $this->alreadyInSave = true;
// If this object has been modified, then save it to the database. // If this object has been modified, then save it to the database.
if ($this->isModified()) { if ($this->isModified()) {
if ($this->isNew()) { if ($this->isNew()) {
$pk = AddonsStorePeer::doInsert( $this, $con ); $pk = AddonsStorePeer::doInsert($this, $con);
$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which $affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
// should always be true here (even though technically // should always be true here (even though technically
// BasePeer::doInsert() can insert multiple rows). // BasePeer::doInsert() can insert multiple rows).
$this->setNew( false );
$this->setNew(false);
} else { } else {
$affectedRows += AddonsStorePeer::doUpdate( $this, $con ); $affectedRows += AddonsStorePeer::doUpdate($this, $con);
} }
$this->resetModified(); // [HL] After being saved an object is no longer 'modified' $this->resetModified(); // [HL] After being saved an object is no longer 'modified'
} }
$this->alreadyInSave = false; $this->alreadyInSave = false;
} }
return $affectedRows; return $affectedRows;
@@ -382,19 +404,18 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
/** /**
* Array of ValidationFailed objects. * Array of ValidationFailed objects.
* * @var array ValidationFailed[]
* @var array ValidationFailed[]
*/ */
protected $validationFailures = array (); protected $validationFailures = array();
/** /**
* Gets any ValidationFailed objects that resulted from last call to validate(). * Gets any ValidationFailed objects that resulted from last call to validate().
* *
* *
* @return array ValidationFailed[] * @return array ValidationFailed[]
* @see validate() * @see validate()
*/ */
public function getValidationFailures () public function getValidationFailures()
{ {
return $this->validationFailures; return $this->validationFailures;
} }
@@ -405,16 +426,16 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
* If $columns is either a column name or an array of column names * If $columns is either a column name or an array of column names
* only those columns are validated. * only those columns are validated.
* *
* @param mixed $columns Column name or an array of column names. * @param mixed $columns Column name or an array of column names.
* @return boolean Whether all columns pass validation. * @return boolean Whether all columns pass validation.
* @see doValidate() * @see doValidate()
* @see getValidationFailures() * @see getValidationFailures()
*/ */
public function validate ($columns = null) public function validate($columns = null)
{ {
$res = $this->doValidate( $columns ); $res = $this->doValidate($columns);
if ($res === true) { if ($res === true) {
$this->validationFailures = array (); $this->validationFailures = array();
return true; return true;
} else { } else {
$this->validationFailures = $res; $this->validationFailures = $res;
@@ -426,51 +447,59 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
* This function performs the validation work for complex object models. * This function performs the validation work for complex object models.
* *
* In addition to checking the current object, all related objects will * In addition to checking the current object, all related objects will
* also be validated. If all pass then <code>true</code> is returned; otherwise * also be validated. If all pass then <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned. * an aggreagated array of ValidationFailed objects will be returned.
* *
* @param array $columns Array of column names to validate. * @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise. * @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/ */
protected function doValidate ($columns = null) protected function doValidate($columns = null)
{ {
if (! $this->alreadyInValidation) { if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true; $this->alreadyInValidation = true;
$retval = null; $retval = null;
$failureMap = array ();
if (($retval = AddonsStorePeer::doValidate( $this, $columns )) !== true) { $failureMap = array();
$failureMap = array_merge( $failureMap, $retval );
if (($retval = AddonsStorePeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
} }
$this->alreadyInValidation = false; $this->alreadyInValidation = false;
} }
return (! empty( $failureMap ) ? $failureMap : true);
return (!empty($failureMap) ? $failureMap : true);
} }
/** /**
* Retrieves a field from the object by name passed in as a string. * Retrieves a field from the object by name passed in as a string.
* *
* @param string $name name * @param string $name name
* @param string $type The type of fieldname the $name is of: * @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME, * one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return mixed Value of field. * @return mixed Value of field.
*/ */
public function getByName ($name, $type = BasePeer::TYPE_PHPNAME) public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{ {
$pos = AddonsStorePeer::translateFieldName( $name, $type, BasePeer::TYPE_NUM ); $pos = AddonsStorePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->getByPosition( $pos ); return $this->getByPosition($pos);
} }
/** /**
* Retrieves a field from the object by Position as specified in the xml schema. * Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based. * Zero-based.
* *
* @param int $pos position in xml schema * @param int $pos position in xml schema
* @return mixed Value of field at $pos * @return mixed Value of field at $pos
*/ */
public function getByPosition ($pos) public function getByPosition($pos)
{ {
switch ($pos) { switch($pos) {
case 0: case 0:
return $this->getStoreId(); return $this->getStoreId();
break; break;
@@ -498,19 +527,19 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
* You can specify the key type of the array by passing one of the class * You can specify the key type of the array by passing one of the class
* type constants. * type constants.
* *
* @param string $keyType One of the class type constants TYPE_PHPNAME, * @param string $keyType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return an associative array containing the field names (as keys) and field values * @return an associative array containing the field names (as keys) and field values
*/ */
public function toArray ($keyType = BasePeer::TYPE_PHPNAME) public function toArray($keyType = BasePeer::TYPE_PHPNAME)
{ {
$keys = AddonsStorePeer::getFieldNames( $keyType ); $keys = AddonsStorePeer::getFieldNames($keyType);
$result = array ( $result = array(
$keys[0] => $this->getStoreId(), $keys[0] => $this->getStoreId(),
$keys[1] => $this->getStoreVersion(), $keys[1] => $this->getStoreVersion(),
$keys[2] => $this->getStoreLocation(), $keys[2] => $this->getStoreLocation(),
$keys[3] => $this->getStoreType(), $keys[3] => $this->getStoreType(),
$keys[4] => $this->getStoreLastUpdated() $keys[4] => $this->getStoreLastUpdated(),
); );
return $result; return $result;
} }
@@ -518,44 +547,44 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
/** /**
* Sets a field from the object by name passed in as a string. * Sets a field from the object by name passed in as a string.
* *
* @param string $name peer name * @param string $name peer name
* @param mixed $value field value * @param mixed $value field value
* @param string $type The type of fieldname the $name is of: * @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME, * one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return void * @return void
*/ */
public function setByName ($name, $value, $type = BasePeer::TYPE_PHPNAME) public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{ {
$pos = AddonsStorePeer::translateFieldName( $name, $type, BasePeer::TYPE_NUM ); $pos = AddonsStorePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition( $pos, $value ); return $this->setByPosition($pos, $value);
} }
/** /**
* Sets a field from the object by Position as specified in the xml schema. * Sets a field from the object by Position as specified in the xml schema.
* Zero-based. * Zero-based.
* *
* @param int $pos position in xml schema * @param int $pos position in xml schema
* @param mixed $value field value * @param mixed $value field value
* @return void * @return void
*/ */
public function setByPosition ($pos, $value) public function setByPosition($pos, $value)
{ {
switch ($pos) { switch($pos) {
case 0: case 0:
$this->setStoreId( $value ); $this->setStoreId($value);
break; break;
case 1: case 1:
$this->setStoreVersion( $value ); $this->setStoreVersion($value);
break; break;
case 2: case 2:
$this->setStoreLocation( $value ); $this->setStoreLocation($value);
break; break;
case 3: case 3:
$this->setStoreType( $value ); $this->setStoreType($value);
break; break;
case 4: case 4:
$this->setStoreLastUpdated( $value ); $this->setStoreLastUpdated($value);
break; break;
} // switch() } // switch()
} }
@@ -564,7 +593,7 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
* Populates the object using an array. * Populates the object using an array.
* *
* This is particularly useful when populating an object from one of the * This is particularly useful when populating an object from one of the
* request arrays (e.g. $_POST). This method goes through the column * request arrays (e.g. $_POST). This method goes through the column
* names, checking to see whether a matching key exists in populated * names, checking to see whether a matching key exists in populated
* array. If so the setByName() method is called for that column. * array. If so the setByName() method is called for that column.
* *
@@ -572,55 +601,66 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
* of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, * of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME,
* TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId') * TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId')
* *
* @param array $arr An array to populate the object from. * @param array $arr An array to populate the object from.
* @param string $keyType The type of keys the array uses. * @param string $keyType The type of keys the array uses.
* @return void * @return void
*/ */
public function fromArray ($arr, $keyType = BasePeer::TYPE_PHPNAME) public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{ {
$keys = AddonsStorePeer::getFieldNames( $keyType ); $keys = AddonsStorePeer::getFieldNames($keyType);
if (array_key_exists( $keys[0], $arr )) { if (array_key_exists($keys[0], $arr)) {
$this->setStoreId( $arr[$keys[0]] ); $this->setStoreId($arr[$keys[0]]);
} }
if (array_key_exists( $keys[1], $arr )) {
$this->setStoreVersion( $arr[$keys[1]] ); if (array_key_exists($keys[1], $arr)) {
$this->setStoreVersion($arr[$keys[1]]);
} }
if (array_key_exists( $keys[2], $arr )) {
$this->setStoreLocation( $arr[$keys[2]] ); if (array_key_exists($keys[2], $arr)) {
$this->setStoreLocation($arr[$keys[2]]);
} }
if (array_key_exists( $keys[3], $arr )) {
$this->setStoreType( $arr[$keys[3]] ); if (array_key_exists($keys[3], $arr)) {
$this->setStoreType($arr[$keys[3]]);
} }
if (array_key_exists( $keys[4], $arr )) {
$this->setStoreLastUpdated( $arr[$keys[4]] ); if (array_key_exists($keys[4], $arr)) {
$this->setStoreLastUpdated($arr[$keys[4]]);
} }
} }
/** /**
* Build a Criteria object containing the values of all modified columns in this object. * Build a Criteria object containing the values of all modified columns in this object.
* *
* @return Criteria The Criteria object containing all modified values. * @return Criteria The Criteria object containing all modified values.
*/ */
public function buildCriteria () public function buildCriteria()
{ {
$criteria = new Criteria( AddonsStorePeer::DATABASE_NAME ); $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME);
if ($this->isColumnModified( AddonsStorePeer::STORE_ID )) { if ($this->isColumnModified(AddonsStorePeer::STORE_ID)) {
$criteria->add( AddonsStorePeer::STORE_ID, $this->store_id ); $criteria->add(AddonsStorePeer::STORE_ID, $this->store_id);
} }
if ($this->isColumnModified( AddonsStorePeer::STORE_VERSION )) {
$criteria->add( AddonsStorePeer::STORE_VERSION, $this->store_version ); if ($this->isColumnModified(AddonsStorePeer::STORE_VERSION)) {
$criteria->add(AddonsStorePeer::STORE_VERSION, $this->store_version);
} }
if ($this->isColumnModified( AddonsStorePeer::STORE_LOCATION )) {
$criteria->add( AddonsStorePeer::STORE_LOCATION, $this->store_location ); if ($this->isColumnModified(AddonsStorePeer::STORE_LOCATION)) {
$criteria->add(AddonsStorePeer::STORE_LOCATION, $this->store_location);
} }
if ($this->isColumnModified( AddonsStorePeer::STORE_TYPE )) {
$criteria->add( AddonsStorePeer::STORE_TYPE, $this->store_type ); if ($this->isColumnModified(AddonsStorePeer::STORE_TYPE)) {
$criteria->add(AddonsStorePeer::STORE_TYPE, $this->store_type);
} }
if ($this->isColumnModified( AddonsStorePeer::STORE_LAST_UPDATED )) {
$criteria->add( AddonsStorePeer::STORE_LAST_UPDATED, $this->store_last_updated ); if ($this->isColumnModified(AddonsStorePeer::STORE_LAST_UPDATED)) {
$criteria->add(AddonsStorePeer::STORE_LAST_UPDATED, $this->store_last_updated);
} }
return $criteria; return $criteria;
} }
@@ -630,23 +670,22 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
* Unlike buildCriteria() this method includes the primary key values regardless * Unlike buildCriteria() this method includes the primary key values regardless
* of whether or not they have been modified. * of whether or not they have been modified.
* *
* @return Criteria The Criteria object containing value(s) for primary key(s). * @return Criteria The Criteria object containing value(s) for primary key(s).
*/ */
public function buildPkeyCriteria () public function buildPkeyCriteria()
{ {
$criteria = new Criteria( AddonsStorePeer::DATABASE_NAME ); $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME);
$criteria->add( AddonsStorePeer::STORE_ID, $this->store_id ); $criteria->add(AddonsStorePeer::STORE_ID, $this->store_id);
return $criteria; return $criteria;
} }
/** /**
* Returns the primary key for this object (row). * Returns the primary key for this object (row).
* * @return string
* @return string
*/ */
public function getPrimaryKey () public function getPrimaryKey()
{ {
return $this->getStoreId(); return $this->getStoreId();
} }
@@ -654,12 +693,12 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
/** /**
* Generic method to set the primary key (store_id column). * Generic method to set the primary key (store_id column).
* *
* @param string $key Primary key. * @param string $key Primary key.
* @return void * @return void
*/ */
public function setPrimaryKey ($key) public function setPrimaryKey($key)
{ {
$this->setStoreId( $key ); $this->setStoreId($key);
} }
/** /**
@@ -668,23 +707,26 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
* If desired, this method can also make copies of all associated (fkey referrers) * If desired, this method can also make copies of all associated (fkey referrers)
* objects. * objects.
* *
* @param object $copyObj An object of AddonsStore (or compatible) type. * @param object $copyObj An object of AddonsStore (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException * @throws PropelException
*/ */
public function copyInto ($copyObj, $deepCopy = false) public function copyInto($copyObj, $deepCopy = false)
{ {
$copyObj->setStoreVersion( $this->store_version );
$copyObj->setStoreLocation( $this->store_location ); $copyObj->setStoreVersion($this->store_version);
$copyObj->setStoreType( $this->store_type ); $copyObj->setStoreLocation($this->store_location);
$copyObj->setStoreLastUpdated( $this->store_last_updated ); $copyObj->setStoreType($this->store_type);
$copyObj->setNew( true ); $copyObj->setStoreLastUpdated($this->store_last_updated);
$copyObj->setNew(true);
$copyObj->setStoreId(NULL); // this is a pkey column, so set to default value
$copyObj->setStoreId( null ); // this is a pkey column, so set to default value
} }
/** /**
@@ -695,16 +737,16 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
* If desired, this method can also make copies of all associated (fkey referrers) * If desired, this method can also make copies of all associated (fkey referrers)
* objects. * objects.
* *
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return AddonsStore Clone of current object. * @return AddonsStore Clone of current object.
* @throws PropelException * @throws PropelException
*/ */
public function copy ($deepCopy = false) public function copy($deepCopy = false)
{ {
// we use get_class(), because this might be a subclass // we use get_class(), because this might be a subclass
$clazz = get_class( $this ); $clazz = get_class($this);
$copyObj = new $clazz(); $copyObj = new $clazz();
$this->copyInto( $copyObj, $deepCopy ); $this->copyInto($copyObj, $deepCopy);
return $copyObj; return $copyObj;
} }
@@ -715,9 +757,9 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
* same instance for all member of this class. The method could therefore * same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior. * be static, but this would prevent one from overriding the behavior.
* *
* @return AddonsStorePeer * @return AddonsStorePeer
*/ */
public function getPeer () public function getPeer()
{ {
if (self::$peer === null) { if (self::$peer === null) {
self::$peer = new AddonsStorePeer(); self::$peer = new AddonsStorePeer();

View File

@@ -8,68 +8,48 @@ include_once 'classes/model/AddonsStore.php';
/** /**
* Base static class for performing query and update operations on the 'ADDONS_STORE' table. * Base static class for performing query and update operations on the 'ADDONS_STORE' table.
* *
*
* *
* * @package workflow.classes.model.om
* @package workflow.classes.model.om
*/ */
abstract class BaseAddonsStorePeer abstract class BaseAddonsStorePeer
{ {
/** /** the default database name for this class */
* the default database name for this class
*/
const DATABASE_NAME = 'workflow'; const DATABASE_NAME = 'workflow';
/** /** the table name for this class */
* the table name for this class
*/
const TABLE_NAME = 'ADDONS_STORE'; const TABLE_NAME = 'ADDONS_STORE';
/** /** A class that can be returned by this peer. */
* A class that can be returned by this peer.
*/
const CLASS_DEFAULT = 'classes.model.AddonsStore'; const CLASS_DEFAULT = 'classes.model.AddonsStore';
/** /** The total number of columns. */
* The total number of columns.
*/
const NUM_COLUMNS = 5; const NUM_COLUMNS = 5;
/** /** The number of lazy-loaded columns. */
* The number of lazy-loaded columns.
*/
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
/**
* the column name for the STORE_ID field /** the column name for the STORE_ID field */
*/
const STORE_ID = 'ADDONS_STORE.STORE_ID'; const STORE_ID = 'ADDONS_STORE.STORE_ID';
/** /** the column name for the STORE_VERSION field */
* the column name for the STORE_VERSION field
*/
const STORE_VERSION = 'ADDONS_STORE.STORE_VERSION'; const STORE_VERSION = 'ADDONS_STORE.STORE_VERSION';
/** /** the column name for the STORE_LOCATION field */
* the column name for the STORE_LOCATION field
*/
const STORE_LOCATION = 'ADDONS_STORE.STORE_LOCATION'; const STORE_LOCATION = 'ADDONS_STORE.STORE_LOCATION';
/** /** the column name for the STORE_TYPE field */
* the column name for the STORE_TYPE field
*/
const STORE_TYPE = 'ADDONS_STORE.STORE_TYPE'; const STORE_TYPE = 'ADDONS_STORE.STORE_TYPE';
/** /** the column name for the STORE_LAST_UPDATED field */
* the column name for the STORE_LAST_UPDATED field
*/
const STORE_LAST_UPDATED = 'ADDONS_STORE.STORE_LAST_UPDATED'; const STORE_LAST_UPDATED = 'ADDONS_STORE.STORE_LAST_UPDATED';
/** /** The PHP to DB Name Mapping */
* The PHP to DB Name Mapping
*/
private static $phpNameMap = null; private static $phpNameMap = null;
/** /**
* holds an array of fieldnames * holds an array of fieldnames
* *
@@ -77,10 +57,10 @@ abstract class BaseAddonsStorePeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('StoreId','StoreVersion','StoreLocation','StoreType','StoreLastUpdated'), BasePeer::TYPE_PHPNAME => array ('StoreId', 'StoreVersion', 'StoreLocation', 'StoreType', 'StoreLastUpdated', ),
BasePeer::TYPE_COLNAME => array (AddonsStorePeer::STORE_ID,AddonsStorePeer::STORE_VERSION,AddonsStorePeer::STORE_LOCATION,AddonsStorePeer::STORE_TYPE,AddonsStorePeer::STORE_LAST_UPDATED), BasePeer::TYPE_COLNAME => array (AddonsStorePeer::STORE_ID, AddonsStorePeer::STORE_VERSION, AddonsStorePeer::STORE_LOCATION, AddonsStorePeer::STORE_TYPE, AddonsStorePeer::STORE_LAST_UPDATED, ),
BasePeer::TYPE_FIELDNAME => array ('STORE_ID','STORE_VERSION','STORE_LOCATION','STORE_TYPE','STORE_LAST_UPDATED'), BasePeer::TYPE_FIELDNAME => array ('STORE_ID', 'STORE_VERSION', 'STORE_LOCATION', 'STORE_TYPE', 'STORE_LAST_UPDATED', ),
BasePeer::TYPE_NUM => array (0,1,2,3,4) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
); );
/** /**
@@ -90,38 +70,36 @@ abstract class BaseAddonsStorePeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('StoreId' => 0,'StoreVersion' => 1,'StoreLocation' => 2,'StoreType' => 3,'StoreLastUpdated' => 4), BasePeer::TYPE_PHPNAME => array ('StoreId' => 0, 'StoreVersion' => 1, 'StoreLocation' => 2, 'StoreType' => 3, 'StoreLastUpdated' => 4, ),
BasePeer::TYPE_COLNAME => array (AddonsStorePeer::STORE_ID => 0,AddonsStorePeer::STORE_VERSION => 1,AddonsStorePeer::STORE_LOCATION => 2,AddonsStorePeer::STORE_TYPE => 3,AddonsStorePeer::STORE_LAST_UPDATED => 4), BasePeer::TYPE_COLNAME => array (AddonsStorePeer::STORE_ID => 0, AddonsStorePeer::STORE_VERSION => 1, AddonsStorePeer::STORE_LOCATION => 2, AddonsStorePeer::STORE_TYPE => 3, AddonsStorePeer::STORE_LAST_UPDATED => 4, ),
BasePeer::TYPE_FIELDNAME => array ('STORE_ID' => 0,'STORE_VERSION' => 1,'STORE_LOCATION' => 2,'STORE_TYPE' => 3,'STORE_LAST_UPDATED' => 4), BasePeer::TYPE_FIELDNAME => array ('STORE_ID' => 0, 'STORE_VERSION' => 1, 'STORE_LOCATION' => 2, 'STORE_TYPE' => 3, 'STORE_LAST_UPDATED' => 4, ),
BasePeer::TYPE_NUM => array (0,1,2,3,4) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
); );
/** /**
* * @return MapBuilder the map builder for this peer
* @return MapBuilder the map builder for this peer * @throws PropelException Any exceptions caught during processing will be
* @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException.
* rethrown wrapped into a PropelException.
*/ */
public static function getMapBuilder () public static function getMapBuilder()
{ {
include_once 'classes/model/map/AddonsStoreMapBuilder.php'; include_once 'classes/model/map/AddonsStoreMapBuilder.php';
return BasePeer::getMapBuilder( 'classes.model.map.AddonsStoreMapBuilder' ); return BasePeer::getMapBuilder('classes.model.map.AddonsStoreMapBuilder');
} }
/** /**
* Gets a map (hash) of PHP names to DB column names. * Gets a map (hash) of PHP names to DB column names.
* *
* @return array The PHP to DB name map for this peer * @return array The PHP to DB name map for this peer
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/ */
public static function getPhpNameMap () public static function getPhpNameMap()
{ {
if (self::$phpNameMap === null) { if (self::$phpNameMap === null) {
$map = AddonsStorePeer::getTableMap(); $map = AddonsStorePeer::getTableMap();
$columns = $map->getColumns(); $columns = $map->getColumns();
$nameMap = array (); $nameMap = array();
foreach ($columns as $column) { foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName(); $nameMap[$column->getPhpName()] = $column->getColumnName();
} }
@@ -129,22 +107,21 @@ abstract class BaseAddonsStorePeer
} }
return self::$phpNameMap; return self::$phpNameMap;
} }
/** /**
* Translates a fieldname to another type * Translates a fieldname to another type
* *
* @param string $name field name * @param string $name field name
* @param string $fromType One of the class type constants TYPE_PHPNAME, * @param string $fromType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @param string $toType One of the class type constants * @param string $toType One of the class type constants
* @return string translated name of the field. * @return string translated name of the field.
*/ */
static public function translateFieldName ($name, $fromType, $toType) static public function translateFieldName($name, $fromType, $toType)
{ {
$toNames = self::getFieldNames( $toType ); $toNames = self::getFieldNames($toType);
$key = isset( self::$fieldKeys[$fromType][$name] ) ? self::$fieldKeys[$fromType][$name] : null; $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
if ($key === null) { if ($key === null) {
throw new PropelException( "'$name' could not be found in the field names of type '$fromType'. These are: " . print_r( self::$fieldKeys[$fromType], true ) ); throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
} }
return $toNames[$key]; return $toNames[$key];
} }
@@ -152,16 +129,16 @@ abstract class BaseAddonsStorePeer
/** /**
* Returns an array of of field names. * Returns an array of of field names.
* *
* @param string $type The type of fieldnames to return: * @param string $type The type of fieldnames to return:
* One of the class type constants TYPE_PHPNAME, * One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return array A list of field names * @return array A list of field names
*/ */
static public function getFieldNames ($type = BasePeer::TYPE_PHPNAME) static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{ {
if (! array_key_exists( $type, self::$fieldNames )) { if (!array_key_exists($type, self::$fieldNames)) {
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.' ); 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.');
} }
return self::$fieldNames[$type]; return self::$fieldNames[$type];
} }
@@ -171,17 +148,16 @@ abstract class BaseAddonsStorePeer
* *
* Using this method you can maintain SQL abstraction while using column aliases. * Using this method you can maintain SQL abstraction while using column aliases.
* <code> * <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME); * $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code> * </code>
* * @param string $alias The alias for the current table.
* @param string $alias The alias for the current table. * @param string $column The column name for current table. (i.e. AddonsStorePeer::COLUMN_NAME).
* @param string $column The column name for current table. (i.e. AddonsStorePeer::COLUMN_NAME). * @return string
* @return string
*/ */
public static function alias ($alias, $column) public static function alias($alias, $column)
{ {
return str_replace( AddonsStorePeer::TABLE_NAME . '.', $alias . '.', $column ); return str_replace(AddonsStorePeer::TABLE_NAME.'.', $alias.'.', $column);
} }
/** /**
@@ -191,22 +167,22 @@ abstract class BaseAddonsStorePeer
* XML schema will not be added to the select list and only loaded * XML schema will not be added to the select list and only loaded
* on demand. * on demand.
* *
* @param criteria object containing the columns to add. * @param criteria object containing the columns to add.
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function addSelectColumns (Criteria $criteria) public static function addSelectColumns(Criteria $criteria)
{ {
$criteria->addSelectColumn( AddonsStorePeer::STORE_ID ); $criteria->addSelectColumn(AddonsStorePeer::STORE_ID);
$criteria->addSelectColumn( AddonsStorePeer::STORE_VERSION ); $criteria->addSelectColumn(AddonsStorePeer::STORE_VERSION);
$criteria->addSelectColumn( AddonsStorePeer::STORE_LOCATION ); $criteria->addSelectColumn(AddonsStorePeer::STORE_LOCATION);
$criteria->addSelectColumn( AddonsStorePeer::STORE_TYPE ); $criteria->addSelectColumn(AddonsStorePeer::STORE_TYPE);
$criteria->addSelectColumn( AddonsStorePeer::STORE_LAST_UPDATED ); $criteria->addSelectColumn(AddonsStorePeer::STORE_LAST_UPDATED);
} }
@@ -216,72 +192,69 @@ abstract class BaseAddonsStorePeer
/** /**
* Returns the number of rows matching criteria. * Returns the number of rows matching criteria.
* *
* @param Criteria $criteria * @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
* @param Connection $con * @param Connection $con
* @return int Number of matching rows. * @return int Number of matching rows.
*/ */
public static function doCount (Criteria $criteria, $distinct = false, $con = null) public static function doCount(Criteria $criteria, $distinct = false, $con = null)
{ {
// we're going to modify criteria, so copy it first // we're going to modify criteria, so copy it first
$criteria = clone $criteria; $criteria = clone $criteria;
// clear out anything that might confuse the ORDER BY clause // clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns(); $criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array( Criteria::DISTINCT, $criteria->getSelectModifiers() )) { if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn( AddonsStorePeer::COUNT_DISTINCT ); $criteria->addSelectColumn(AddonsStorePeer::COUNT_DISTINCT);
} else { } else {
$criteria->addSelectColumn( AddonsStorePeer::COUNT ); $criteria->addSelectColumn(AddonsStorePeer::COUNT);
} }
// just in case we're grouping: add those columns to the select statement // just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) { foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn( $column ); $criteria->addSelectColumn($column);
} }
$rs = AddonsStorePeer::doSelectRS( $criteria, $con ); $rs = AddonsStorePeer::doSelectRS($criteria, $con);
if ($rs->next()) { if ($rs->next()) {
return $rs->getInt( 1 ); return $rs->getInt(1);
} else { } else {
// no rows returned; we infer that means 0 matches. // no rows returned; we infer that means 0 matches.
return 0; return 0;
} }
} }
/** /**
* Method to select one object from the DB. * Method to select one object from the DB.
* *
* @param Criteria $criteria object used to create the SELECT statement. * @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con * @param Connection $con
* @return AddonsStore * @return AddonsStore
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doSelectOne (Criteria $criteria, $con = null) public static function doSelectOne(Criteria $criteria, $con = null)
{ {
$critcopy = clone $criteria; $critcopy = clone $criteria;
$critcopy->setLimit( 1 ); $critcopy->setLimit(1);
$objects = AddonsStorePeer::doSelect( $critcopy, $con ); $objects = AddonsStorePeer::doSelect($critcopy, $con);
if ($objects) { if ($objects) {
return $objects[0]; return $objects[0];
} }
return null; return null;
} }
/** /**
* Method to do selects. * Method to do selects.
* *
* @param Criteria $criteria The Criteria object used to build the SELECT statement. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con * @param Connection $con
* @return array Array of selected Objects * @return array Array of selected Objects
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doSelect (Criteria $criteria, $con = null) public static function doSelect(Criteria $criteria, $con = null)
{ {
return AddonsStorePeer::populateObjects( AddonsStorePeer::doSelectRS( $criteria, $con ) ); return AddonsStorePeer::populateObjects(AddonsStorePeer::doSelectRS($criteria, $con));
} }
/** /**
* Prepares the Criteria object and uses the parent doSelect() * Prepares the Criteria object and uses the parent doSelect()
* method to get a ResultSet. * method to get a ResultSet.
@@ -289,68 +262,65 @@ abstract class BaseAddonsStorePeer
* Use this method directly if you want to just get the resultset * Use this method directly if you want to just get the resultset
* (instead of an array of objects). * (instead of an array of objects).
* *
* @param Criteria $criteria The Criteria object used to build the SELECT statement. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
* @return ResultSet The resultset object with numerically-indexed fields. * @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect() * @see BasePeer::doSelect()
*/ */
public static function doSelectRS (Criteria $criteria, $con = null) public static function doSelectRS(Criteria $criteria, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
if (! $criteria->getSelectColumns()) { if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria; $criteria = clone $criteria;
AddonsStorePeer::addSelectColumns( $criteria ); AddonsStorePeer::addSelectColumns($criteria);
} }
// Set the correct dbName // Set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
// BasePeer returns a Creole ResultSet, set to return // BasePeer returns a Creole ResultSet, set to return
// rows indexed numerically. // rows indexed numerically.
return BasePeer::doSelect( $criteria, $con ); return BasePeer::doSelect($criteria, $con);
} }
/** /**
* The returned array will contain objects of the default type or * The returned array will contain objects of the default type or
* objects that inherit from the default. * objects that inherit from the default.
* *
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function populateObjects (ResultSet $rs) public static function populateObjects(ResultSet $rs)
{ {
$results = array (); $results = array();
// set the class once to avoid overhead in the loop // set the class once to avoid overhead in the loop
$cls = AddonsStorePeer::getOMClass(); $cls = AddonsStorePeer::getOMClass();
$cls = Propel::import( $cls ); $cls = Propel::import($cls);
// populate the object(s) // populate the object(s)
while ($rs->next()) { while ($rs->next()) {
$obj = new $cls(); $obj = new $cls();
$obj->hydrate( $rs ); $obj->hydrate($rs);
$results[] = $obj; $results[] = $obj;
} }
return $results; return $results;
} }
/** /**
* Returns the TableMap related to this peer. * Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need. * This method is not needed for general use but a specific application could have a need.
* * @return TableMap
* @return TableMap * @throws PropelException Any exceptions caught during processing will be
* @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException.
* rethrown wrapped into a PropelException.
*/ */
public static function getTableMap () public static function getTableMap()
{ {
return Propel::getDatabaseMap( self::DATABASE_NAME )->getTable( self::TABLE_NAME ); return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
} }
/** /**
@@ -360,9 +330,9 @@ abstract class BaseAddonsStorePeer
* relative to a location on the PHP include_path. * relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php') * (e.g. path.to.MyClass -> 'path/to/MyClass.php')
* *
* @return string path.to.ClassName * @return string path.to.ClassName
*/ */
public static function getOMClass () public static function getOMClass()
{ {
return AddonsStorePeer::CLASS_DEFAULT; return AddonsStorePeer::CLASS_DEFAULT;
} }
@@ -370,16 +340,16 @@ abstract class BaseAddonsStorePeer
/** /**
* Method perform an INSERT on the database, given a AddonsStore or Criteria object. * Method perform an INSERT on the database, given a AddonsStore or Criteria object.
* *
* @param mixed $values Criteria or AddonsStore object containing data that is used to create the INSERT statement. * @param mixed $values Criteria or AddonsStore object containing data that is used to create the INSERT statement.
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return mixed The new primary key. * @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doInsert ($values, $con = null) public static function doInsert($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
if ($values instanceof Criteria) { if ($values instanceof Criteria) {
@@ -388,14 +358,15 @@ abstract class BaseAddonsStorePeer
$criteria = $values->buildCriteria(); // build Criteria from AddonsStore object $criteria = $values->buildCriteria(); // build Criteria from AddonsStore object
} }
// Set the correct dbName // Set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
try { try {
// use transaction because $criteria could contain info // use transaction because $criteria could contain info
// for more than one table (I guess, conceivably) // for more than one table (I guess, conceivably)
$con->begin(); $con->begin();
$pk = BasePeer::doInsert( $criteria, $con ); $pk = BasePeer::doInsert($criteria, $con);
$con->commit(); $con->commit();
} catch (PropelException $e) { } catch (PropelException $e) {
$con->rollback(); $con->rollback();
@@ -408,51 +379,53 @@ abstract class BaseAddonsStorePeer
/** /**
* Method perform an UPDATE on the database, given a AddonsStore or Criteria object. * Method perform an UPDATE on the database, given a AddonsStore or Criteria object.
* *
* @param mixed $values Criteria or AddonsStore object containing data that is used to create the UPDATE statement. * @param mixed $values Criteria or AddonsStore object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection object to exert more control over transactions). * @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver). * @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doUpdate ($values, $con = null) public static function doUpdate($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$selectCriteria = new Criteria( self::DATABASE_NAME ); $selectCriteria = new Criteria(self::DATABASE_NAME);
if ($values instanceof Criteria) { if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity $criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison( AddonsStorePeer::STORE_ID );
$selectCriteria->add( AddonsStorePeer::STORE_ID, $criteria->remove( AddonsStorePeer::STORE_ID ), $comparison ); $comparison = $criteria->getComparison(AddonsStorePeer::STORE_ID);
$selectCriteria->add(AddonsStorePeer::STORE_ID, $criteria->remove(AddonsStorePeer::STORE_ID), $comparison);
} else { } else {
// $values is AddonsStore object
$criteria = $values->buildCriteria(); // gets full criteria $criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
} }
// set the correct dbName // set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
return BasePeer::doUpdate( $selectCriteria, $criteria, $con );
return BasePeer::doUpdate($selectCriteria, $criteria, $con);
} }
/** /**
* Method to DELETE all rows from the ADDONS_STORE table. * Method to DELETE all rows from the ADDONS_STORE table.
* *
* @return int The number of affected rows (if supported by underlying database driver). * @return int The number of affected rows (if supported by underlying database driver).
*/ */
public static function doDeleteAll ($con = null) public static function doDeleteAll($con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$affectedRows = 0; // initialize var to track total num of affected rows $affectedRows = 0; // initialize var to track total num of affected rows
try { try {
// use transaction because $criteria could contain info // use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc. // for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin(); $con->begin();
$affectedRows += BasePeer::doDeleteAll( AddonsStorePeer::TABLE_NAME, $con ); $affectedRows += BasePeer::doDeleteAll(AddonsStorePeer::TABLE_NAME, $con);
$con->commit(); $con->commit();
return $affectedRows; return $affectedRows;
} catch (PropelException $e) { } catch (PropelException $e) {
@@ -464,31 +437,34 @@ abstract class BaseAddonsStorePeer
/** /**
* Method perform a DELETE on the database, given a AddonsStore or Criteria object OR a primary key value. * Method perform a DELETE on the database, given a AddonsStore or Criteria object OR a primary key value.
* *
* @param mixed $values Criteria or AddonsStore object or primary key or array of primary keys * @param mixed $values Criteria or AddonsStore object or primary key or array of primary keys
* which is used to create the DELETE statement * which is used to create the DELETE statement
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows * @return int The number of affected rows (if supported by underlying database driver).
* if supported by native driver or if emulated using Propel. * This includes CASCADE-related rows
* @throws PropelException Any exceptions caught during processing will be * if supported by native driver or if emulated using Propel.
* rethrown wrapped into a PropelException. * @throws PropelException Any exceptions caught during processing will be
*/ * rethrown wrapped into a PropelException.
public static function doDelete ($values, $con = null) */
public static function doDelete($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( AddonsStorePeer::DATABASE_NAME ); $con = Propel::getConnection(AddonsStorePeer::DATABASE_NAME);
} }
if ($values instanceof Criteria) { if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity $criteria = clone $values; // rename for clarity
} elseif ($values instanceof AddonsStore) { } elseif ($values instanceof AddonsStore) {
$criteria = $values->buildPkeyCriteria(); $criteria = $values->buildPkeyCriteria();
} else { } else {
// it must be the primary key // it must be the primary key
$criteria = new Criteria( self::DATABASE_NAME ); $criteria = new Criteria(self::DATABASE_NAME);
$criteria->add( AddonsStorePeer::STORE_ID, (array) $values, Criteria::IN ); $criteria->add(AddonsStorePeer::STORE_ID, (array) $values, Criteria::IN);
} }
// Set the correct dbName // Set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows $affectedRows = 0; // initialize var to track total num of affected rows
@@ -496,7 +472,8 @@ abstract class BaseAddonsStorePeer
// use transaction because $criteria could contain info // use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc. // for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin(); $con->begin();
$affectedRows += BasePeer::doDelete( $criteria, $con );
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit(); $con->commit();
return $affectedRows; return $affectedRows;
} catch (PropelException $e) { } catch (PropelException $e) {
@@ -512,81 +489,86 @@ abstract class BaseAddonsStorePeer
* *
* NOTICE: This does not apply to primary or foreign keys for now. * NOTICE: This does not apply to primary or foreign keys for now.
* *
* @param AddonsStore $obj The object to validate. * @param AddonsStore $obj The object to validate.
* @param mixed $cols Column name or array of column names. * @param mixed $cols Column name or array of column names.
* *
* @return mixed TRUE if all columns are valid or the error message of the first invalid column. * @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/ */
public static function doValidate (AddonsStore $obj, $cols = null) public static function doValidate(AddonsStore $obj, $cols = null)
{ {
$columns = array (); $columns = array();
if ($cols) { if ($cols) {
$dbMap = Propel::getDatabaseMap( AddonsStorePeer::DATABASE_NAME ); $dbMap = Propel::getDatabaseMap(AddonsStorePeer::DATABASE_NAME);
$tableMap = $dbMap->getTable( AddonsStorePeer::TABLE_NAME ); $tableMap = $dbMap->getTable(AddonsStorePeer::TABLE_NAME);
if (! is_array( $cols )) {
$cols = array ( if (! is_array($cols)) {
$cols); $cols = array($cols);
} }
foreach ($cols as $colName) { foreach ($cols as $colName) {
if ($tableMap->containsColumn( $colName )) { if ($tableMap->containsColumn($colName)) {
$get = 'get' . $tableMap->getColumn( $colName )->getPhpName(); $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
$columns[$colName] = $obj->$get(); $columns[$colName] = $obj->$get();
} }
} }
} else { } else {
} }
return BasePeer::doValidate( AddonsStorePeer::DATABASE_NAME, AddonsStorePeer::TABLE_NAME, $columns );
return BasePeer::doValidate(AddonsStorePeer::DATABASE_NAME, AddonsStorePeer::TABLE_NAME, $columns);
} }
/** /**
* Retrieve a single object by pkey. * Retrieve a single object by pkey.
* *
* @param mixed $pk the primary key. * @param mixed $pk the primary key.
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return AddonsStore * @return AddonsStore
*/ */
public static function retrieveByPK ($pk, $con = null) public static function retrieveByPK($pk, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$criteria = new Criteria( AddonsStorePeer::DATABASE_NAME ); $criteria = new Criteria(AddonsStorePeer::DATABASE_NAME);
$criteria->add( AddonsStorePeer::STORE_ID, $pk ); $criteria->add(AddonsStorePeer::STORE_ID, $pk);
$v = AddonsStorePeer::doSelect( $criteria, $con );
return ! empty( $v ) > 0 ? $v[0] : null; $v = AddonsStorePeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
} }
/** /**
* Retrieve multiple objects by pkey. * Retrieve multiple objects by pkey.
* *
* @param array $pks List of primary keys * @param array $pks List of primary keys
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function retrieveByPKs ($pks, $con = null) public static function retrieveByPKs($pks, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$objs = null; $objs = null;
if (empty( $pks )) { if (empty($pks)) {
$objs = array (); $objs = array();
} else { } else {
$criteria = new Criteria(); $criteria = new Criteria();
$criteria->add( AddonsStorePeer::STORE_ID, $pks, Criteria::IN ); $criteria->add(AddonsStorePeer::STORE_ID, $pks, Criteria::IN);
$objs = AddonsStorePeer::doSelect( $criteria, $con ); $objs = AddonsStorePeer::doSelect($criteria, $con);
} }
return $objs; return $objs;
} }
} }
// static code to register the map builder for this Peer with the main Propel class // static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) { if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization // the MapBuilder classes register themselves with Propel during initialization
@@ -594,12 +576,12 @@ if (Propel::isInit()) {
try { try {
BaseAddonsStorePeer::getMapBuilder(); BaseAddonsStorePeer::getMapBuilder();
} catch (Exception $e) { } catch (Exception $e) {
Propel::log( 'Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR ); Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
} }
} else { } else {
// even if Propel is not yet initialized, the map builder class can be registered // even if Propel is not yet initialized, the map builder class can be registered
// now and then it will be loaded when Propel initializes. // now and then it will be loaded when Propel initializes.
require_once 'classes/model/map/AddonsStoreMapBuilder.php'; require_once 'classes/model/map/AddonsStoreMapBuilder.php';
Propel::registerMapBuilder( 'classes.model.map.AddonsStoreMapBuilder' ); Propel::registerMapBuilder('classes.model.map.AddonsStoreMapBuilder');
} }

View File

@@ -129,11 +129,11 @@ abstract class BaseAppMessage extends BaseObject implements Persistent
*/ */
protected $app_msg_show_message = 1; protected $app_msg_show_message = 1;
/** /**
* The value for the app_msg_error field. * The value for the app_msg_error field.
* @var int * @var string
*/ */
protected $app_msg_error; protected $app_msg_error = '';
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
@@ -381,7 +381,7 @@ abstract class BaseAppMessage extends BaseObject implements Persistent
/** /**
* Get the [app_msg_error] column value. * Get the [app_msg_error] column value.
* *
* @return String * @return string
*/ */
public function getAppMsgError() public function getAppMsgError()
{ {
@@ -797,7 +797,7 @@ abstract class BaseAppMessage extends BaseObject implements Persistent
$this->modifiedColumns[] = AppMessagePeer::APP_MSG_ERROR; $this->modifiedColumns[] = AppMessagePeer::APP_MSG_ERROR;
} }
} // setAppMsgFrom() } // setAppMsgError()
/** /**
* Hydrates (populates) the object variables with values from the database resultset. * Hydrates (populates) the object variables with values from the database resultset.
@@ -857,7 +857,7 @@ abstract class BaseAppMessage extends BaseObject implements Persistent
$this->setNew(false); $this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer. // FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 18; // 17 = AppMessagePeer::NUM_COLUMNS - AppMessagePeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 18; // 18 = AppMessagePeer::NUM_COLUMNS - AppMessagePeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating AppMessage object", $e); throw new PropelException("Error populating AppMessage object", $e);
@@ -1332,6 +1332,7 @@ abstract class BaseAppMessage extends BaseObject implements Persistent
if (array_key_exists($keys[17], $arr)) { if (array_key_exists($keys[17], $arr)) {
$this->setAppMsgError($arr[$keys[17]]); $this->setAppMsgError($arr[$keys[17]]);
} }
} }
/** /**
@@ -1415,6 +1416,7 @@ abstract class BaseAppMessage extends BaseObject implements Persistent
$criteria->add(AppMessagePeer::APP_MSG_ERROR, $this->app_msg_error); $criteria->add(AppMessagePeer::APP_MSG_ERROR, $this->app_msg_error);
} }
return $criteria; return $criteria;
} }
@@ -1502,6 +1504,7 @@ abstract class BaseAppMessage extends BaseObject implements Persistent
$copyObj->setAppMsgError($this->app_msg_error); $copyObj->setAppMsgError($this->app_msg_error);
$copyObj->setNew(true); $copyObj->setNew(true);
$copyObj->setAppMsgUid(NULL); // this is a pkey column, so set to default value $copyObj->setAppMsgUid(NULL); // this is a pkey column, so set to default value

View File

@@ -31,7 +31,7 @@ abstract class BaseCatalog extends BaseObject implements Persistent
* The value for the cat_uid field. * The value for the cat_uid field.
* @var string * @var string
*/ */
protected $cat_uid = '0'; protected $cat_uid = '';
/** /**
* The value for the cat_label_id field. * The value for the cat_label_id field.
@@ -217,7 +217,7 @@ abstract class BaseCatalog extends BaseObject implements Persistent
$v = (string) $v; $v = (string) $v;
} }
if ($this->cat_uid !== $v || $v === '0') { if ($this->cat_uid !== $v || $v === '') {
$this->cat_uid = $v; $this->cat_uid = $v;
$this->modifiedColumns[] = CatalogPeer::CAT_UID; $this->modifiedColumns[] = CatalogPeer::CAT_UID;
} }
@@ -879,7 +879,7 @@ abstract class BaseCatalog extends BaseObject implements Persistent
$copyObj->setNew(true); $copyObj->setNew(true);
$copyObj->setCatUid('0'); // this is a pkey column, so set to default value $copyObj->setCatUid(''); // this is a pkey column, so set to default value
$copyObj->setCatType(''); // this is a pkey column, so set to default value $copyObj->setCatType(''); // this is a pkey column, so set to default value

View File

@@ -55,7 +55,7 @@ abstract class BaseDashboardIndicator extends BaseObject implements Persistent
* The value for the das_ind_goal field. * The value for the das_ind_goal field.
* @var double * @var double
*/ */
protected $das_ind_goal; protected $das_ind_goal = 0;
/** /**
* The value for the das_ind_direction field. * The value for the das_ind_direction field.
@@ -427,7 +427,7 @@ abstract class BaseDashboardIndicator extends BaseObject implements Persistent
public function setDasIndGoal($v) public function setDasIndGoal($v)
{ {
if ($this->das_ind_goal !== $v) { if ($this->das_ind_goal !== $v || $v === 0) {
$this->das_ind_goal = $v; $this->das_ind_goal = $v;
$this->modifiedColumns[] = DashboardIndicatorPeer::DAS_IND_GOAL; $this->modifiedColumns[] = DashboardIndicatorPeer::DAS_IND_GOAL;
} }

View File

@@ -61,7 +61,7 @@ abstract class BaseElementTaskRelation extends BaseObject implements Persistent
* The value for the element_uid_dest field. * The value for the element_uid_dest field.
* @var string * @var string
*/ */
protected $element_uid_dest; protected $element_uid_dest = '';
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
@@ -134,7 +134,7 @@ abstract class BaseElementTaskRelation extends BaseObject implements Persistent
/** /**
* Get the [element_uid_dest] column value. * Get the [element_uid_dest] column value.
* *
* @return string * @return string
*/ */
public function getElementUidDest() public function getElementUidDest()
@@ -255,7 +255,7 @@ abstract class BaseElementTaskRelation extends BaseObject implements Persistent
/** /**
* Set the value of [element_uid_dest] column. * Set the value of [element_uid_dest] column.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */
@@ -268,7 +268,7 @@ abstract class BaseElementTaskRelation extends BaseObject implements Persistent
$v = (string) $v; $v = (string) $v;
} }
if ($this->element_uid_dest !== $v) { if ($this->element_uid_dest !== $v || $v === '') {
$this->element_uid_dest = $v; $this->element_uid_dest = $v;
$this->modifiedColumns[] = ElementTaskRelationPeer::ELEMENT_UID_DEST; $this->modifiedColumns[] = ElementTaskRelationPeer::ELEMENT_UID_DEST;
} }
@@ -309,7 +309,7 @@ abstract class BaseElementTaskRelation extends BaseObject implements Persistent
$this->setNew(false); $this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer. // FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 5; // 5 = ElementTaskRelationPeer::NUM_COLUMNS - ElementTaskRelationPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 6; // 6 = ElementTaskRelationPeer::NUM_COLUMNS - ElementTaskRelationPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating ElementTaskRelation object", $e); throw new PropelException("Error populating ElementTaskRelation object", $e);

File diff suppressed because it is too large Load Diff

View File

@@ -8,93 +8,63 @@ include_once 'classes/model/LicenseManager.php';
/** /**
* Base static class for performing query and update operations on the 'LICENSE_MANAGER' table. * Base static class for performing query and update operations on the 'LICENSE_MANAGER' table.
* *
*
* *
* * @package workflow.classes.model.om
* @package classes.model.om
*/ */
abstract class BaseLicenseManagerPeer abstract class BaseLicenseManagerPeer
{ {
/** /** the default database name for this class */
* the default database name for this class
*/
const DATABASE_NAME = 'workflow'; const DATABASE_NAME = 'workflow';
/** /** the table name for this class */
* the table name for this class
*/
const TABLE_NAME = 'LICENSE_MANAGER'; const TABLE_NAME = 'LICENSE_MANAGER';
/** /** A class that can be returned by this peer. */
* A class that can be returned by this peer.
*/
const CLASS_DEFAULT = 'classes.model.LicenseManager'; const CLASS_DEFAULT = 'classes.model.LicenseManager';
/** /** The total number of columns. */
* The total number of columns.
*/
const NUM_COLUMNS = 10; const NUM_COLUMNS = 10;
/** /** The number of lazy-loaded columns. */
* The number of lazy-loaded columns.
*/
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
/**
* the column name for the LICENSE_UID field /** the column name for the LICENSE_UID field */
*/
const LICENSE_UID = 'LICENSE_MANAGER.LICENSE_UID'; const LICENSE_UID = 'LICENSE_MANAGER.LICENSE_UID';
/** /** the column name for the LICENSE_USER field */
* the column name for the LICENSE_USER field
*/
const LICENSE_USER = 'LICENSE_MANAGER.LICENSE_USER'; const LICENSE_USER = 'LICENSE_MANAGER.LICENSE_USER';
/** /** the column name for the LICENSE_START field */
* the column name for the LICENSE_START field
*/
const LICENSE_START = 'LICENSE_MANAGER.LICENSE_START'; const LICENSE_START = 'LICENSE_MANAGER.LICENSE_START';
/** /** the column name for the LICENSE_END field */
* the column name for the LICENSE_END field
*/
const LICENSE_END = 'LICENSE_MANAGER.LICENSE_END'; const LICENSE_END = 'LICENSE_MANAGER.LICENSE_END';
/** /** the column name for the LICENSE_SPAN field */
* the column name for the LICENSE_SPAN field
*/
const LICENSE_SPAN = 'LICENSE_MANAGER.LICENSE_SPAN'; const LICENSE_SPAN = 'LICENSE_MANAGER.LICENSE_SPAN';
/** /** the column name for the LICENSE_STATUS field */
* the column name for the LICENSE_STATUS field
*/
const LICENSE_STATUS = 'LICENSE_MANAGER.LICENSE_STATUS'; const LICENSE_STATUS = 'LICENSE_MANAGER.LICENSE_STATUS';
/** /** the column name for the LICENSE_DATA field */
* the column name for the LICENSE_DATA field
*/
const LICENSE_DATA = 'LICENSE_MANAGER.LICENSE_DATA'; const LICENSE_DATA = 'LICENSE_MANAGER.LICENSE_DATA';
/** /** the column name for the LICENSE_PATH field */
* the column name for the LICENSE_PATH field
*/
const LICENSE_PATH = 'LICENSE_MANAGER.LICENSE_PATH'; const LICENSE_PATH = 'LICENSE_MANAGER.LICENSE_PATH';
/** /** the column name for the LICENSE_WORKSPACE field */
* the column name for the LICENSE_WORKSPACE field
*/
const LICENSE_WORKSPACE = 'LICENSE_MANAGER.LICENSE_WORKSPACE'; const LICENSE_WORKSPACE = 'LICENSE_MANAGER.LICENSE_WORKSPACE';
/** /** the column name for the LICENSE_TYPE field */
* the column name for the LICENSE_TYPE field
*/
const LICENSE_TYPE = 'LICENSE_MANAGER.LICENSE_TYPE'; const LICENSE_TYPE = 'LICENSE_MANAGER.LICENSE_TYPE';
/** /** The PHP to DB Name Mapping */
* The PHP to DB Name Mapping
*/
private static $phpNameMap = null; private static $phpNameMap = null;
/** /**
* holds an array of fieldnames * holds an array of fieldnames
* *
@@ -102,10 +72,10 @@ abstract class BaseLicenseManagerPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('LicenseUid','LicenseUser','LicenseStart','LicenseEnd','LicenseSpan','LicenseStatus','LicenseData','LicensePath','LicenseWorkspace','LicenseType'), BasePeer::TYPE_PHPNAME => array ('LicenseUid', 'LicenseUser', 'LicenseStart', 'LicenseEnd', 'LicenseSpan', 'LicenseStatus', 'LicenseData', 'LicensePath', 'LicenseWorkspace', 'LicenseType', ),
BasePeer::TYPE_COLNAME => array (LicenseManagerPeer::LICENSE_UID,LicenseManagerPeer::LICENSE_USER,LicenseManagerPeer::LICENSE_START,LicenseManagerPeer::LICENSE_END,LicenseManagerPeer::LICENSE_SPAN,LicenseManagerPeer::LICENSE_STATUS,LicenseManagerPeer::LICENSE_DATA,LicenseManagerPeer::LICENSE_PATH,LicenseManagerPeer::LICENSE_WORKSPACE,LicenseManagerPeer::LICENSE_TYPE), BasePeer::TYPE_COLNAME => array (LicenseManagerPeer::LICENSE_UID, LicenseManagerPeer::LICENSE_USER, LicenseManagerPeer::LICENSE_START, LicenseManagerPeer::LICENSE_END, LicenseManagerPeer::LICENSE_SPAN, LicenseManagerPeer::LICENSE_STATUS, LicenseManagerPeer::LICENSE_DATA, LicenseManagerPeer::LICENSE_PATH, LicenseManagerPeer::LICENSE_WORKSPACE, LicenseManagerPeer::LICENSE_TYPE, ),
BasePeer::TYPE_FIELDNAME => array ('LICENSE_UID','LICENSE_USER','LICENSE_START','LICENSE_END','LICENSE_SPAN','LICENSE_STATUS','LICENSE_DATA','LICENSE_PATH','LICENSE_WORKSPACE','LICENSE_TYPE'), BasePeer::TYPE_FIELDNAME => array ('LICENSE_UID', 'LICENSE_USER', 'LICENSE_START', 'LICENSE_END', 'LICENSE_SPAN', 'LICENSE_STATUS', 'LICENSE_DATA', 'LICENSE_PATH', 'LICENSE_WORKSPACE', 'LICENSE_TYPE', ),
BasePeer::TYPE_NUM => array (0,1,2,3,4,5,6,7,8,9) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
); );
/** /**
@@ -115,38 +85,36 @@ abstract class BaseLicenseManagerPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('LicenseUid' => 0,'LicenseUser' => 1,'LicenseStart' => 2,'LicenseEnd' => 3,'LicenseSpan' => 4,'LicenseStatus' => 5,'LicenseData' => 6,'LicensePath' => 7,'LicenseWorkspace' => 8,'LicenseType' => 9), BasePeer::TYPE_PHPNAME => array ('LicenseUid' => 0, 'LicenseUser' => 1, 'LicenseStart' => 2, 'LicenseEnd' => 3, 'LicenseSpan' => 4, 'LicenseStatus' => 5, 'LicenseData' => 6, 'LicensePath' => 7, 'LicenseWorkspace' => 8, 'LicenseType' => 9, ),
BasePeer::TYPE_COLNAME => array (LicenseManagerPeer::LICENSE_UID => 0,LicenseManagerPeer::LICENSE_USER => 1,LicenseManagerPeer::LICENSE_START => 2,LicenseManagerPeer::LICENSE_END => 3,LicenseManagerPeer::LICENSE_SPAN => 4,LicenseManagerPeer::LICENSE_STATUS => 5,LicenseManagerPeer::LICENSE_DATA => 6,LicenseManagerPeer::LICENSE_PATH => 7,LicenseManagerPeer::LICENSE_WORKSPACE => 8,LicenseManagerPeer::LICENSE_TYPE => 9), BasePeer::TYPE_COLNAME => array (LicenseManagerPeer::LICENSE_UID => 0, LicenseManagerPeer::LICENSE_USER => 1, LicenseManagerPeer::LICENSE_START => 2, LicenseManagerPeer::LICENSE_END => 3, LicenseManagerPeer::LICENSE_SPAN => 4, LicenseManagerPeer::LICENSE_STATUS => 5, LicenseManagerPeer::LICENSE_DATA => 6, LicenseManagerPeer::LICENSE_PATH => 7, LicenseManagerPeer::LICENSE_WORKSPACE => 8, LicenseManagerPeer::LICENSE_TYPE => 9, ),
BasePeer::TYPE_FIELDNAME => array ('LICENSE_UID' => 0,'LICENSE_USER' => 1,'LICENSE_START' => 2,'LICENSE_END' => 3,'LICENSE_SPAN' => 4,'LICENSE_STATUS' => 5,'LICENSE_DATA' => 6,'LICENSE_PATH' => 7,'LICENSE_WORKSPACE' => 8,'LICENSE_TYPE' => 9), BasePeer::TYPE_FIELDNAME => array ('LICENSE_UID' => 0, 'LICENSE_USER' => 1, 'LICENSE_START' => 2, 'LICENSE_END' => 3, 'LICENSE_SPAN' => 4, 'LICENSE_STATUS' => 5, 'LICENSE_DATA' => 6, 'LICENSE_PATH' => 7, 'LICENSE_WORKSPACE' => 8, 'LICENSE_TYPE' => 9, ),
BasePeer::TYPE_NUM => array (0,1,2,3,4,5,6,7,8,9) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
); );
/** /**
* * @return MapBuilder the map builder for this peer
* @return MapBuilder the map builder for this peer * @throws PropelException Any exceptions caught during processing will be
* @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException.
* rethrown wrapped into a PropelException.
*/ */
public static function getMapBuilder () public static function getMapBuilder()
{ {
include_once 'classes/model/map/LicenseManagerMapBuilder.php'; include_once 'classes/model/map/LicenseManagerMapBuilder.php';
return BasePeer::getMapBuilder( 'classes.model.map.LicenseManagerMapBuilder' ); return BasePeer::getMapBuilder('classes.model.map.LicenseManagerMapBuilder');
} }
/** /**
* Gets a map (hash) of PHP names to DB column names. * Gets a map (hash) of PHP names to DB column names.
* *
* @return array The PHP to DB name map for this peer * @return array The PHP to DB name map for this peer
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this. * @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/ */
public static function getPhpNameMap () public static function getPhpNameMap()
{ {
if (self::$phpNameMap === null) { if (self::$phpNameMap === null) {
$map = LicenseManagerPeer::getTableMap(); $map = LicenseManagerPeer::getTableMap();
$columns = $map->getColumns(); $columns = $map->getColumns();
$nameMap = array (); $nameMap = array();
foreach ($columns as $column) { foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName(); $nameMap[$column->getPhpName()] = $column->getColumnName();
} }
@@ -154,22 +122,21 @@ abstract class BaseLicenseManagerPeer
} }
return self::$phpNameMap; return self::$phpNameMap;
} }
/** /**
* Translates a fieldname to another type * Translates a fieldname to another type
* *
* @param string $name field name * @param string $name field name
* @param string $fromType One of the class type constants TYPE_PHPNAME, * @param string $fromType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @param string $toType One of the class type constants * @param string $toType One of the class type constants
* @return string translated name of the field. * @return string translated name of the field.
*/ */
static public function translateFieldName ($name, $fromType, $toType) static public function translateFieldName($name, $fromType, $toType)
{ {
$toNames = self::getFieldNames( $toType ); $toNames = self::getFieldNames($toType);
$key = isset( self::$fieldKeys[$fromType][$name] ) ? self::$fieldKeys[$fromType][$name] : null; $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
if ($key === null) { if ($key === null) {
throw new PropelException( "'$name' could not be found in the field names of type '$fromType'. These are: " . print_r( self::$fieldKeys[$fromType], true ) ); throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
} }
return $toNames[$key]; return $toNames[$key];
} }
@@ -177,16 +144,16 @@ abstract class BaseLicenseManagerPeer
/** /**
* Returns an array of of field names. * Returns an array of of field names.
* *
* @param string $type The type of fieldnames to return: * @param string $type The type of fieldnames to return:
* One of the class type constants TYPE_PHPNAME, * One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM * TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return array A list of field names * @return array A list of field names
*/ */
static public function getFieldNames ($type = BasePeer::TYPE_PHPNAME) static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{ {
if (! array_key_exists( $type, self::$fieldNames )) { if (!array_key_exists($type, self::$fieldNames)) {
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.' ); 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.');
} }
return self::$fieldNames[$type]; return self::$fieldNames[$type];
} }
@@ -196,17 +163,16 @@ abstract class BaseLicenseManagerPeer
* *
* Using this method you can maintain SQL abstraction while using column aliases. * Using this method you can maintain SQL abstraction while using column aliases.
* <code> * <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME); * $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN); * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code> * </code>
* * @param string $alias The alias for the current table.
* @param string $alias The alias for the current table. * @param string $column The column name for current table. (i.e. LicenseManagerPeer::COLUMN_NAME).
* @param string $column The column name for current table. (i.e. LicenseManagerPeer::COLUMN_NAME). * @return string
* @return string
*/ */
public static function alias ($alias, $column) public static function alias($alias, $column)
{ {
return str_replace( LicenseManagerPeer::TABLE_NAME . '.', $alias . '.', $column ); return str_replace(LicenseManagerPeer::TABLE_NAME.'.', $alias.'.', $column);
} }
/** /**
@@ -216,32 +182,32 @@ abstract class BaseLicenseManagerPeer
* XML schema will not be added to the select list and only loaded * XML schema will not be added to the select list and only loaded
* on demand. * on demand.
* *
* @param criteria object containing the columns to add. * @param criteria object containing the columns to add.
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function addSelectColumns (Criteria $criteria) public static function addSelectColumns(Criteria $criteria)
{ {
$criteria->addSelectColumn( LicenseManagerPeer::LICENSE_UID ); $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_UID);
$criteria->addSelectColumn( LicenseManagerPeer::LICENSE_USER ); $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_USER);
$criteria->addSelectColumn( LicenseManagerPeer::LICENSE_START ); $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_START);
$criteria->addSelectColumn( LicenseManagerPeer::LICENSE_END ); $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_END);
$criteria->addSelectColumn( LicenseManagerPeer::LICENSE_SPAN ); $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_SPAN);
$criteria->addSelectColumn( LicenseManagerPeer::LICENSE_STATUS ); $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_STATUS);
$criteria->addSelectColumn( LicenseManagerPeer::LICENSE_DATA ); $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_DATA);
$criteria->addSelectColumn( LicenseManagerPeer::LICENSE_PATH ); $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_PATH);
$criteria->addSelectColumn( LicenseManagerPeer::LICENSE_WORKSPACE ); $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_WORKSPACE);
$criteria->addSelectColumn( LicenseManagerPeer::LICENSE_TYPE ); $criteria->addSelectColumn(LicenseManagerPeer::LICENSE_TYPE);
} }
@@ -251,72 +217,69 @@ abstract class BaseLicenseManagerPeer
/** /**
* Returns the number of rows matching criteria. * Returns the number of rows matching criteria.
* *
* @param Criteria $criteria * @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria). * @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
* @param Connection $con * @param Connection $con
* @return int Number of matching rows. * @return int Number of matching rows.
*/ */
public static function doCount (Criteria $criteria, $distinct = false, $con = null) public static function doCount(Criteria $criteria, $distinct = false, $con = null)
{ {
// we're going to modify criteria, so copy it first // we're going to modify criteria, so copy it first
$criteria = clone $criteria; $criteria = clone $criteria;
// clear out anything that might confuse the ORDER BY clause // clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns(); $criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array( Criteria::DISTINCT, $criteria->getSelectModifiers() )) { if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn( LicenseManagerPeer::COUNT_DISTINCT ); $criteria->addSelectColumn(LicenseManagerPeer::COUNT_DISTINCT);
} else { } else {
$criteria->addSelectColumn( LicenseManagerPeer::COUNT ); $criteria->addSelectColumn(LicenseManagerPeer::COUNT);
} }
// just in case we're grouping: add those columns to the select statement // just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) { foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn( $column ); $criteria->addSelectColumn($column);
} }
$rs = LicenseManagerPeer::doSelectRS( $criteria, $con ); $rs = LicenseManagerPeer::doSelectRS($criteria, $con);
if ($rs->next()) { if ($rs->next()) {
return $rs->getInt( 1 ); return $rs->getInt(1);
} else { } else {
// no rows returned; we infer that means 0 matches. // no rows returned; we infer that means 0 matches.
return 0; return 0;
} }
} }
/** /**
* Method to select one object from the DB. * Method to select one object from the DB.
* *
* @param Criteria $criteria object used to create the SELECT statement. * @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con * @param Connection $con
* @return LicenseManager * @return LicenseManager
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doSelectOne (Criteria $criteria, $con = null) public static function doSelectOne(Criteria $criteria, $con = null)
{ {
$critcopy = clone $criteria; $critcopy = clone $criteria;
$critcopy->setLimit( 1 ); $critcopy->setLimit(1);
$objects = LicenseManagerPeer::doSelect( $critcopy, $con ); $objects = LicenseManagerPeer::doSelect($critcopy, $con);
if ($objects) { if ($objects) {
return $objects[0]; return $objects[0];
} }
return null; return null;
} }
/** /**
* Method to do selects. * Method to do selects.
* *
* @param Criteria $criteria The Criteria object used to build the SELECT statement. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con * @param Connection $con
* @return array Array of selected Objects * @return array Array of selected Objects
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doSelect (Criteria $criteria, $con = null) public static function doSelect(Criteria $criteria, $con = null)
{ {
return LicenseManagerPeer::populateObjects( LicenseManagerPeer::doSelectRS( $criteria, $con ) ); return LicenseManagerPeer::populateObjects(LicenseManagerPeer::doSelectRS($criteria, $con));
} }
/** /**
* Prepares the Criteria object and uses the parent doSelect() * Prepares the Criteria object and uses the parent doSelect()
* method to get a ResultSet. * method to get a ResultSet.
@@ -324,66 +287,65 @@ abstract class BaseLicenseManagerPeer
* Use this method directly if you want to just get the resultset * Use this method directly if you want to just get the resultset
* (instead of an array of objects). * (instead of an array of objects).
* *
* @param Criteria $criteria The Criteria object used to build the SELECT statement. * @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
* @return ResultSet The resultset object with numerically-indexed fields. * @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect() * @see BasePeer::doSelect()
*/ */
public static function doSelectRS (Criteria $criteria, $con = null) public static function doSelectRS(Criteria $criteria, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
if (! $criteria->getSelectColumns()) { if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria; $criteria = clone $criteria;
LicenseManagerPeer::addSelectColumns( $criteria ); LicenseManagerPeer::addSelectColumns($criteria);
} }
// Set the correct dbName // Set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
// BasePeer returns a Creole ResultSet, set to return // BasePeer returns a Creole ResultSet, set to return
// rows indexed numerically. // rows indexed numerically.
return BasePeer::doSelect( $criteria, $con ); return BasePeer::doSelect($criteria, $con);
} }
/** /**
* The returned array will contain objects of the default type or * The returned array will contain objects of the default type or
* objects that inherit from the default. * objects that inherit from the default.
* *
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function populateObjects (ResultSet $rs) public static function populateObjects(ResultSet $rs)
{ {
$results = array (); $results = array();
// set the class once to avoid overhead in the loop // set the class once to avoid overhead in the loop
$cls = LicenseManagerPeer::getOMClass(); $cls = LicenseManagerPeer::getOMClass();
$cls = Propel::import( $cls ); $cls = Propel::import($cls);
// populate the object(s) // populate the object(s)
while ($rs->next()) { while ($rs->next()) {
$obj = new $cls(); $obj = new $cls();
$obj->hydrate( $rs ); $obj->hydrate($rs);
$results[] = $obj; $results[] = $obj;
} }
return $results; return $results;
} }
/** /**
* Returns the TableMap related to this peer. * Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need. * This method is not needed for general use but a specific application could have a need.
* * @return TableMap
* @return TableMap * @throws PropelException Any exceptions caught during processing will be
* @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException.
* rethrown wrapped into a PropelException.
*/ */
public static function getTableMap () public static function getTableMap()
{ {
return Propel::getDatabaseMap( self::DATABASE_NAME )->getTable( self::TABLE_NAME ); return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
} }
/** /**
@@ -393,9 +355,9 @@ abstract class BaseLicenseManagerPeer
* relative to a location on the PHP include_path. * relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php') * (e.g. path.to.MyClass -> 'path/to/MyClass.php')
* *
* @return string path.to.ClassName * @return string path.to.ClassName
*/ */
public static function getOMClass () public static function getOMClass()
{ {
return LicenseManagerPeer::CLASS_DEFAULT; return LicenseManagerPeer::CLASS_DEFAULT;
} }
@@ -403,16 +365,16 @@ abstract class BaseLicenseManagerPeer
/** /**
* Method perform an INSERT on the database, given a LicenseManager or Criteria object. * Method perform an INSERT on the database, given a LicenseManager or Criteria object.
* *
* @param mixed $values Criteria or LicenseManager object containing data that is used to create the INSERT statement. * @param mixed $values Criteria or LicenseManager object containing data that is used to create the INSERT statement.
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return mixed The new primary key. * @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doInsert ($values, $con = null) public static function doInsert($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
if ($values instanceof Criteria) { if ($values instanceof Criteria) {
@@ -421,14 +383,15 @@ abstract class BaseLicenseManagerPeer
$criteria = $values->buildCriteria(); // build Criteria from LicenseManager object $criteria = $values->buildCriteria(); // build Criteria from LicenseManager object
} }
// Set the correct dbName // Set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
try { try {
// use transaction because $criteria could contain info // use transaction because $criteria could contain info
// for more than one table (I guess, conceivably) // for more than one table (I guess, conceivably)
$con->begin(); $con->begin();
$pk = BasePeer::doInsert( $criteria, $con ); $pk = BasePeer::doInsert($criteria, $con);
$con->commit(); $con->commit();
} catch (PropelException $e) { } catch (PropelException $e) {
$con->rollback(); $con->rollback();
@@ -441,53 +404,53 @@ abstract class BaseLicenseManagerPeer
/** /**
* Method perform an UPDATE on the database, given a LicenseManager or Criteria object. * Method perform an UPDATE on the database, given a LicenseManager or Criteria object.
* *
* @param mixed $values Criteria or LicenseManager object containing data that is used to create the UPDATE statement. * @param mixed $values Criteria or LicenseManager object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection object to exert more control over transactions). * @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver). * @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function doUpdate ($values, $con = null) public static function doUpdate($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$selectCriteria = new Criteria( self::DATABASE_NAME ); $selectCriteria = new Criteria(self::DATABASE_NAME);
if ($values instanceof Criteria) { if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity $criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison( LicenseManagerPeer::LICENSE_UID );
$selectCriteria->add( LicenseManagerPeer::LICENSE_UID, $criteria->remove( LicenseManagerPeer::LICENSE_UID ), $comparison ); $comparison = $criteria->getComparison(LicenseManagerPeer::LICENSE_UID);
$selectCriteria->add(LicenseManagerPeer::LICENSE_UID, $criteria->remove(LicenseManagerPeer::LICENSE_UID), $comparison);
} else { } else {
// $values is LicenseManager object
$criteria = $values->buildCriteria(); // gets full criteria $criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s) $selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
} }
// set the correct dbName // set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
return BasePeer::doUpdate( $selectCriteria, $criteria, $con ); return BasePeer::doUpdate($selectCriteria, $criteria, $con);
} }
/** /**
* Method to DELETE all rows from the LICENSE_MANAGER table. * Method to DELETE all rows from the LICENSE_MANAGER table.
* *
* @return int The number of affected rows (if supported by underlying database driver). * @return int The number of affected rows (if supported by underlying database driver).
*/ */
public static function doDeleteAll ($con = null) public static function doDeleteAll($con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$affectedRows = 0; // initialize var to track total num of affected rows $affectedRows = 0; // initialize var to track total num of affected rows
try { try {
// use transaction because $criteria could contain info // use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc. // for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin(); $con->begin();
$affectedRows += BasePeer::doDeleteAll( LicenseManagerPeer::TABLE_NAME, $con ); $affectedRows += BasePeer::doDeleteAll(LicenseManagerPeer::TABLE_NAME, $con);
$con->commit(); $con->commit();
return $affectedRows; return $affectedRows;
} catch (PropelException $e) { } catch (PropelException $e) {
@@ -499,32 +462,34 @@ abstract class BaseLicenseManagerPeer
/** /**
* Method perform a DELETE on the database, given a LicenseManager or Criteria object OR a primary key value. * Method perform a DELETE on the database, given a LicenseManager or Criteria object OR a primary key value.
* *
* @param mixed $values Criteria or LicenseManager object or primary key or array of primary keys * @param mixed $values Criteria or LicenseManager object or primary key or array of primary keys
* which is used to create the DELETE statement * which is used to create the DELETE statement
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows * @return int The number of affected rows (if supported by underlying database driver).
* if supported by native driver or if emulated using Propel. * This includes CASCADE-related rows
* @throws PropelException Any exceptions caught during processing will be * if supported by native driver or if emulated using Propel.
* rethrown wrapped into a PropelException. * @throws PropelException Any exceptions caught during processing will be
*/ * rethrown wrapped into a PropelException.
public static function doDelete ($values, $con = null) */
public static function doDelete($values, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( LicenseManagerPeer::DATABASE_NAME ); $con = Propel::getConnection(LicenseManagerPeer::DATABASE_NAME);
} }
if ($values instanceof Criteria) { if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity $criteria = clone $values; // rename for clarity
} elseif ($values instanceof LicenseManager) { } elseif ($values instanceof LicenseManager) {
$criteria = $values->buildPkeyCriteria(); $criteria = $values->buildPkeyCriteria();
} else { } else {
// it must be the primary key // it must be the primary key
$criteria = new Criteria( self::DATABASE_NAME ); $criteria = new Criteria(self::DATABASE_NAME);
$criteria->add( LicenseManagerPeer::LICENSE_UID, (array) $values, Criteria::IN ); $criteria->add(LicenseManagerPeer::LICENSE_UID, (array) $values, Criteria::IN);
} }
// Set the correct dbName // Set the correct dbName
$criteria->setDbName( self::DATABASE_NAME ); $criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows $affectedRows = 0; // initialize var to track total num of affected rows
@@ -533,7 +498,7 @@ abstract class BaseLicenseManagerPeer
// for more than one table or we could emulating ON DELETE CASCADE, etc. // for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin(); $con->begin();
$affectedRows += BasePeer::doDelete( $criteria, $con ); $affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit(); $con->commit();
return $affectedRows; return $affectedRows;
} catch (PropelException $e) { } catch (PropelException $e) {
@@ -549,28 +514,26 @@ abstract class BaseLicenseManagerPeer
* *
* NOTICE: This does not apply to primary or foreign keys for now. * NOTICE: This does not apply to primary or foreign keys for now.
* *
* @param LicenseManager $obj The object to validate. * @param LicenseManager $obj The object to validate.
* @param mixed $cols Column name or array of column names. * @param mixed $cols Column name or array of column names.
* *
* @return mixed TRUE if all columns are valid or the error message of the first invalid column. * @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/ */
public static function doValidate (LicenseManager $obj, $cols = null) public static function doValidate(LicenseManager $obj, $cols = null)
{ {
$columns = array (); $columns = array();
if ($cols) { if ($cols) {
$dbMap = Propel::getDatabaseMap( LicenseManagerPeer::DATABASE_NAME ); $dbMap = Propel::getDatabaseMap(LicenseManagerPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable( LicenseManagerPeer::TABLE_NAME ); $tableMap = $dbMap->getTable(LicenseManagerPeer::TABLE_NAME);
if (! is_array( $cols )) { if (! is_array($cols)) {
$cols = array ( $cols = array($cols);
$cols
);
} }
foreach ($cols as $colName) { foreach ($cols as $colName) {
if ($tableMap->containsColumn( $colName )) { if ($tableMap->containsColumn($colName)) {
$get = 'get' . $tableMap->getColumn( $colName )->getPhpName(); $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
$columns[$colName] = $obj->$get(); $columns[$colName] = $obj->$get();
} }
} }
@@ -578,57 +541,59 @@ abstract class BaseLicenseManagerPeer
} }
return BasePeer::doValidate( LicenseManagerPeer::DATABASE_NAME, LicenseManagerPeer::TABLE_NAME, $columns ); return BasePeer::doValidate(LicenseManagerPeer::DATABASE_NAME, LicenseManagerPeer::TABLE_NAME, $columns);
} }
/** /**
* Retrieve a single object by pkey. * Retrieve a single object by pkey.
* *
* @param mixed $pk the primary key. * @param mixed $pk the primary key.
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @return LicenseManager * @return LicenseManager
*/ */
public static function retrieveByPK ($pk, $con = null) public static function retrieveByPK($pk, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$criteria = new Criteria( LicenseManagerPeer::DATABASE_NAME ); $criteria = new Criteria(LicenseManagerPeer::DATABASE_NAME);
$criteria->add( LicenseManagerPeer::LICENSE_UID, $pk ); $criteria->add(LicenseManagerPeer::LICENSE_UID, $pk);
$v = LicenseManagerPeer::doSelect( $criteria, $con );
return ! empty( $v ) > 0 ? $v[0] : null; $v = LicenseManagerPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
} }
/** /**
* Retrieve multiple objects by pkey. * Retrieve multiple objects by pkey.
* *
* @param array $pks List of primary keys * @param array $pks List of primary keys
* @param Connection $con the connection to use * @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be * @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException. * rethrown wrapped into a PropelException.
*/ */
public static function retrieveByPKs ($pks, $con = null) public static function retrieveByPKs($pks, $con = null)
{ {
if ($con === null) { if ($con === null) {
$con = Propel::getConnection( self::DATABASE_NAME ); $con = Propel::getConnection(self::DATABASE_NAME);
} }
$objs = null; $objs = null;
if (empty( $pks )) { if (empty($pks)) {
$objs = array (); $objs = array();
} else { } else {
$criteria = new Criteria(); $criteria = new Criteria();
$criteria->add( LicenseManagerPeer::LICENSE_UID, $pks, Criteria::IN ); $criteria->add(LicenseManagerPeer::LICENSE_UID, $pks, Criteria::IN);
$objs = LicenseManagerPeer::doSelect( $criteria, $con ); $objs = LicenseManagerPeer::doSelect($criteria, $con);
} }
return $objs; return $objs;
} }
} }
// static code to register the map builder for this Peer with the main Propel class // static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) { if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization // the MapBuilder classes register themselves with Propel during initialization
@@ -636,12 +601,12 @@ if (Propel::isInit()) {
try { try {
BaseLicenseManagerPeer::getMapBuilder(); BaseLicenseManagerPeer::getMapBuilder();
} catch (Exception $e) { } catch (Exception $e) {
Propel::log( 'Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR ); Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
} }
} else { } else {
// even if Propel is not yet initialized, the map builder class can be registered // even if Propel is not yet initialized, the map builder class can be registered
// now and then it will be loaded when Propel initializes. // now and then it will be loaded when Propel initializes.
require_once 'classes/model/map/LicenseManagerMapBuilder.php'; require_once 'classes/model/map/LicenseManagerMapBuilder.php';
Propel::registerMapBuilder( 'classes.model.map.LicenseManagerMapBuilder' ); Propel::registerMapBuilder('classes.model.map.LicenseManagerMapBuilder');
} }

View File

@@ -49,55 +49,67 @@ abstract class BaseProReporting extends BaseObject implements Persistent
* The value for the avg_time field. * The value for the avg_time field.
* @var double * @var double
*/ */
protected $avg_time; protected $avg_time = 0;
/** /**
* The value for the sdv_time field. * The value for the sdv_time field.
* @var double * @var double
*/ */
protected $sdv_time; protected $sdv_time = 0;
/** /**
* The value for the total_cases_in field. * The value for the total_cases_in field.
* @var double * @var double
*/ */
protected $total_cases_in; protected $total_cases_in = 0;
/** /**
* The value for the total_cases_out field. * The value for the total_cases_out field.
* @var double * @var double
*/ */
protected $total_cases_out; protected $total_cases_out = 0;
/** /**
* The value for the configured_process_time field. * The value for the configured_process_time field.
* @var double * @var double
*/ */
protected $configured_process_time; protected $configured_process_time = 0;
/** /**
* The value for the configured_process_cost field. * The value for the configured_process_cost field.
* @var double * @var double
*/ */
protected $configured_process_cost; protected $configured_process_cost = 0;
/** /**
* The value for the total_cases_open field. * The value for the total_cases_open field.
* @var double * @var double
*/ */
protected $total_cases_open; protected $total_cases_open = 0;
/** /**
* The value for the total_cases_overdue field. * The value for the total_cases_overdue field.
* @var double * @var double
*/ */
protected $total_cases_overdue; protected $total_cases_overdue = 0;
/** /**
* The value for the total_cases_on_time field. * The value for the total_cases_on_time field.
* @var double * @var double
*/ */
protected $total_cases_on_time; protected $total_cases_on_time = 0;
/**
* The value for the pro_cost field.
* @var double
*/
protected $pro_cost = 0;
/**
* The value for the pro_unit_cost field.
* @var string
*/
protected $pro_unit_cost = '';
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
@@ -245,6 +257,28 @@ abstract class BaseProReporting extends BaseObject implements Persistent
return $this->total_cases_on_time; return $this->total_cases_on_time;
} }
/**
* Get the [pro_cost] column value.
*
* @return double
*/
public function getProCost()
{
return $this->pro_cost;
}
/**
* Get the [pro_unit_cost] column value.
*
* @return string
*/
public function getProUnitCost()
{
return $this->pro_unit_cost;
}
/** /**
* Set the value of [pro_uid] column. * Set the value of [pro_uid] column.
* *
@@ -320,7 +354,7 @@ abstract class BaseProReporting extends BaseObject implements Persistent
public function setAvgTime($v) public function setAvgTime($v)
{ {
if ($this->avg_time !== $v) { if ($this->avg_time !== $v || $v === 0) {
$this->avg_time = $v; $this->avg_time = $v;
$this->modifiedColumns[] = ProReportingPeer::AVG_TIME; $this->modifiedColumns[] = ProReportingPeer::AVG_TIME;
} }
@@ -336,7 +370,7 @@ abstract class BaseProReporting extends BaseObject implements Persistent
public function setSdvTime($v) public function setSdvTime($v)
{ {
if ($this->sdv_time !== $v) { if ($this->sdv_time !== $v || $v === 0) {
$this->sdv_time = $v; $this->sdv_time = $v;
$this->modifiedColumns[] = ProReportingPeer::SDV_TIME; $this->modifiedColumns[] = ProReportingPeer::SDV_TIME;
} }
@@ -352,7 +386,7 @@ abstract class BaseProReporting extends BaseObject implements Persistent
public function setTotalCasesIn($v) public function setTotalCasesIn($v)
{ {
if ($this->total_cases_in !== $v) { if ($this->total_cases_in !== $v || $v === 0) {
$this->total_cases_in = $v; $this->total_cases_in = $v;
$this->modifiedColumns[] = ProReportingPeer::TOTAL_CASES_IN; $this->modifiedColumns[] = ProReportingPeer::TOTAL_CASES_IN;
} }
@@ -368,7 +402,7 @@ abstract class BaseProReporting extends BaseObject implements Persistent
public function setTotalCasesOut($v) public function setTotalCasesOut($v)
{ {
if ($this->total_cases_out !== $v) { if ($this->total_cases_out !== $v || $v === 0) {
$this->total_cases_out = $v; $this->total_cases_out = $v;
$this->modifiedColumns[] = ProReportingPeer::TOTAL_CASES_OUT; $this->modifiedColumns[] = ProReportingPeer::TOTAL_CASES_OUT;
} }
@@ -384,7 +418,7 @@ abstract class BaseProReporting extends BaseObject implements Persistent
public function setConfiguredProcessTime($v) public function setConfiguredProcessTime($v)
{ {
if ($this->configured_process_time !== $v) { if ($this->configured_process_time !== $v || $v === 0) {
$this->configured_process_time = $v; $this->configured_process_time = $v;
$this->modifiedColumns[] = ProReportingPeer::CONFIGURED_PROCESS_TIME; $this->modifiedColumns[] = ProReportingPeer::CONFIGURED_PROCESS_TIME;
} }
@@ -400,7 +434,7 @@ abstract class BaseProReporting extends BaseObject implements Persistent
public function setConfiguredProcessCost($v) public function setConfiguredProcessCost($v)
{ {
if ($this->configured_process_cost !== $v) { if ($this->configured_process_cost !== $v || $v === 0) {
$this->configured_process_cost = $v; $this->configured_process_cost = $v;
$this->modifiedColumns[] = ProReportingPeer::CONFIGURED_PROCESS_COST; $this->modifiedColumns[] = ProReportingPeer::CONFIGURED_PROCESS_COST;
} }
@@ -416,7 +450,7 @@ abstract class BaseProReporting extends BaseObject implements Persistent
public function setTotalCasesOpen($v) public function setTotalCasesOpen($v)
{ {
if ($this->total_cases_open !== $v) { if ($this->total_cases_open !== $v || $v === 0) {
$this->total_cases_open = $v; $this->total_cases_open = $v;
$this->modifiedColumns[] = ProReportingPeer::TOTAL_CASES_OPEN; $this->modifiedColumns[] = ProReportingPeer::TOTAL_CASES_OPEN;
} }
@@ -432,7 +466,7 @@ abstract class BaseProReporting extends BaseObject implements Persistent
public function setTotalCasesOverdue($v) public function setTotalCasesOverdue($v)
{ {
if ($this->total_cases_overdue !== $v) { if ($this->total_cases_overdue !== $v || $v === 0) {
$this->total_cases_overdue = $v; $this->total_cases_overdue = $v;
$this->modifiedColumns[] = ProReportingPeer::TOTAL_CASES_OVERDUE; $this->modifiedColumns[] = ProReportingPeer::TOTAL_CASES_OVERDUE;
} }
@@ -448,13 +482,51 @@ abstract class BaseProReporting extends BaseObject implements Persistent
public function setTotalCasesOnTime($v) public function setTotalCasesOnTime($v)
{ {
if ($this->total_cases_on_time !== $v) { if ($this->total_cases_on_time !== $v || $v === 0) {
$this->total_cases_on_time = $v; $this->total_cases_on_time = $v;
$this->modifiedColumns[] = ProReportingPeer::TOTAL_CASES_ON_TIME; $this->modifiedColumns[] = ProReportingPeer::TOTAL_CASES_ON_TIME;
} }
} // setTotalCasesOnTime() } // setTotalCasesOnTime()
/**
* Set the value of [pro_cost] column.
*
* @param double $v new value
* @return void
*/
public function setProCost($v)
{
if ($this->pro_cost !== $v || $v === 0) {
$this->pro_cost = $v;
$this->modifiedColumns[] = ProReportingPeer::PRO_COST;
}
} // setProCost()
/**
* Set the value of [pro_unit_cost] column.
*
* @param string $v new value
* @return void
*/
public function setProUnitCost($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->pro_unit_cost !== $v || $v === '') {
$this->pro_unit_cost = $v;
$this->modifiedColumns[] = ProReportingPeer::PRO_UNIT_COST;
}
} // setProUnitCost()
/** /**
* Hydrates (populates) the object variables with values from the database resultset. * Hydrates (populates) the object variables with values from the database resultset.
* *
@@ -496,12 +568,16 @@ abstract class BaseProReporting extends BaseObject implements Persistent
$this->total_cases_on_time = $rs->getFloat($startcol + 11); $this->total_cases_on_time = $rs->getFloat($startcol + 11);
$this->pro_cost = $rs->getFloat($startcol + 12);
$this->pro_unit_cost = $rs->getString($startcol + 13);
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer. // FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 12; // 12 = ProReportingPeer::NUM_COLUMNS - ProReportingPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 14; // 14 = ProReportingPeer::NUM_COLUMNS - ProReportingPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating ProReporting object", $e); throw new PropelException("Error populating ProReporting object", $e);
@@ -741,6 +817,12 @@ abstract class BaseProReporting extends BaseObject implements Persistent
case 11: case 11:
return $this->getTotalCasesOnTime(); return $this->getTotalCasesOnTime();
break; break;
case 12:
return $this->getProCost();
break;
case 13:
return $this->getProUnitCost();
break;
default: default:
return null; return null;
break; break;
@@ -773,6 +855,8 @@ abstract class BaseProReporting extends BaseObject implements Persistent
$keys[9] => $this->getTotalCasesOpen(), $keys[9] => $this->getTotalCasesOpen(),
$keys[10] => $this->getTotalCasesOverdue(), $keys[10] => $this->getTotalCasesOverdue(),
$keys[11] => $this->getTotalCasesOnTime(), $keys[11] => $this->getTotalCasesOnTime(),
$keys[12] => $this->getProCost(),
$keys[13] => $this->getProUnitCost(),
); );
return $result; return $result;
} }
@@ -840,6 +924,12 @@ abstract class BaseProReporting extends BaseObject implements Persistent
case 11: case 11:
$this->setTotalCasesOnTime($value); $this->setTotalCasesOnTime($value);
break; break;
case 12:
$this->setProCost($value);
break;
case 13:
$this->setProUnitCost($value);
break;
} // switch() } // switch()
} }
@@ -911,6 +1001,14 @@ abstract class BaseProReporting extends BaseObject implements Persistent
$this->setTotalCasesOnTime($arr[$keys[11]]); $this->setTotalCasesOnTime($arr[$keys[11]]);
} }
if (array_key_exists($keys[12], $arr)) {
$this->setProCost($arr[$keys[12]]);
}
if (array_key_exists($keys[13], $arr)) {
$this->setProUnitCost($arr[$keys[13]]);
}
} }
/** /**
@@ -970,6 +1068,14 @@ abstract class BaseProReporting extends BaseObject implements Persistent
$criteria->add(ProReportingPeer::TOTAL_CASES_ON_TIME, $this->total_cases_on_time); $criteria->add(ProReportingPeer::TOTAL_CASES_ON_TIME, $this->total_cases_on_time);
} }
if ($this->isColumnModified(ProReportingPeer::PRO_COST)) {
$criteria->add(ProReportingPeer::PRO_COST, $this->pro_cost);
}
if ($this->isColumnModified(ProReportingPeer::PRO_UNIT_COST)) {
$criteria->add(ProReportingPeer::PRO_UNIT_COST, $this->pro_unit_cost);
}
return $criteria; return $criteria;
} }
@@ -1059,6 +1165,10 @@ abstract class BaseProReporting extends BaseObject implements Persistent
$copyObj->setTotalCasesOnTime($this->total_cases_on_time); $copyObj->setTotalCasesOnTime($this->total_cases_on_time);
$copyObj->setProCost($this->pro_cost);
$copyObj->setProUnitCost($this->pro_unit_cost);
$copyObj->setNew(true); $copyObj->setNew(true);

View File

@@ -25,7 +25,7 @@ abstract class BaseProReportingPeer
const CLASS_DEFAULT = 'classes.model.ProReporting'; const CLASS_DEFAULT = 'classes.model.ProReporting';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 12; const NUM_COLUMNS = 14;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -67,6 +67,12 @@ abstract class BaseProReportingPeer
/** the column name for the TOTAL_CASES_ON_TIME field */ /** the column name for the TOTAL_CASES_ON_TIME field */
const TOTAL_CASES_ON_TIME = 'PRO_REPORTING.TOTAL_CASES_ON_TIME'; const TOTAL_CASES_ON_TIME = 'PRO_REPORTING.TOTAL_CASES_ON_TIME';
/** the column name for the PRO_COST field */
const PRO_COST = 'PRO_REPORTING.PRO_COST';
/** the column name for the PRO_UNIT_COST field */
const PRO_UNIT_COST = 'PRO_REPORTING.PRO_UNIT_COST';
/** The PHP to DB Name Mapping */ /** The PHP to DB Name Mapping */
private static $phpNameMap = null; private static $phpNameMap = null;
@@ -78,10 +84,10 @@ abstract class BaseProReportingPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('ProUid', 'Month', 'Year', 'AvgTime', 'SdvTime', 'TotalCasesIn', 'TotalCasesOut', 'ConfiguredProcessTime', 'ConfiguredProcessCost', 'TotalCasesOpen', 'TotalCasesOverdue', 'TotalCasesOnTime', ), BasePeer::TYPE_PHPNAME => array ('ProUid', 'Month', 'Year', 'AvgTime', 'SdvTime', 'TotalCasesIn', 'TotalCasesOut', 'ConfiguredProcessTime', 'ConfiguredProcessCost', 'TotalCasesOpen', 'TotalCasesOverdue', 'TotalCasesOnTime', 'ProCost', 'ProUnitCost', ),
BasePeer::TYPE_COLNAME => array (ProReportingPeer::PRO_UID, ProReportingPeer::MONTH, ProReportingPeer::YEAR, ProReportingPeer::AVG_TIME, ProReportingPeer::SDV_TIME, ProReportingPeer::TOTAL_CASES_IN, ProReportingPeer::TOTAL_CASES_OUT, ProReportingPeer::CONFIGURED_PROCESS_TIME, ProReportingPeer::CONFIGURED_PROCESS_COST, ProReportingPeer::TOTAL_CASES_OPEN, ProReportingPeer::TOTAL_CASES_OVERDUE, ProReportingPeer::TOTAL_CASES_ON_TIME, ), BasePeer::TYPE_COLNAME => array (ProReportingPeer::PRO_UID, ProReportingPeer::MONTH, ProReportingPeer::YEAR, ProReportingPeer::AVG_TIME, ProReportingPeer::SDV_TIME, ProReportingPeer::TOTAL_CASES_IN, ProReportingPeer::TOTAL_CASES_OUT, ProReportingPeer::CONFIGURED_PROCESS_TIME, ProReportingPeer::CONFIGURED_PROCESS_COST, ProReportingPeer::TOTAL_CASES_OPEN, ProReportingPeer::TOTAL_CASES_OVERDUE, ProReportingPeer::TOTAL_CASES_ON_TIME, ProReportingPeer::PRO_COST, ProReportingPeer::PRO_UNIT_COST, ),
BasePeer::TYPE_FIELDNAME => array ('PRO_UID', 'MONTH', 'YEAR', 'AVG_TIME', 'SDV_TIME', 'TOTAL_CASES_IN', 'TOTAL_CASES_OUT', 'CONFIGURED_PROCESS_TIME', 'CONFIGURED_PROCESS_COST', 'TOTAL_CASES_OPEN', 'TOTAL_CASES_OVERDUE', 'TOTAL_CASES_ON_TIME', ), BasePeer::TYPE_FIELDNAME => array ('PRO_UID', 'MONTH', 'YEAR', 'AVG_TIME', 'SDV_TIME', 'TOTAL_CASES_IN', 'TOTAL_CASES_OUT', 'CONFIGURED_PROCESS_TIME', 'CONFIGURED_PROCESS_COST', 'TOTAL_CASES_OPEN', 'TOTAL_CASES_OVERDUE', 'TOTAL_CASES_ON_TIME', 'PRO_COST', 'PRO_UNIT_COST', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
); );
/** /**
@@ -91,10 +97,10 @@ abstract class BaseProReportingPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('ProUid' => 0, 'Month' => 1, 'Year' => 2, 'AvgTime' => 3, 'SdvTime' => 4, 'TotalCasesIn' => 5, 'TotalCasesOut' => 6, 'ConfiguredProcessTime' => 7, 'ConfiguredProcessCost' => 8, 'TotalCasesOpen' => 9, 'TotalCasesOverdue' => 10, 'TotalCasesOnTime' => 11, ), BasePeer::TYPE_PHPNAME => array ('ProUid' => 0, 'Month' => 1, 'Year' => 2, 'AvgTime' => 3, 'SdvTime' => 4, 'TotalCasesIn' => 5, 'TotalCasesOut' => 6, 'ConfiguredProcessTime' => 7, 'ConfiguredProcessCost' => 8, 'TotalCasesOpen' => 9, 'TotalCasesOverdue' => 10, 'TotalCasesOnTime' => 11, 'ProCost' => 12, 'ProUnitCost' => 13, ),
BasePeer::TYPE_COLNAME => array (ProReportingPeer::PRO_UID => 0, ProReportingPeer::MONTH => 1, ProReportingPeer::YEAR => 2, ProReportingPeer::AVG_TIME => 3, ProReportingPeer::SDV_TIME => 4, ProReportingPeer::TOTAL_CASES_IN => 5, ProReportingPeer::TOTAL_CASES_OUT => 6, ProReportingPeer::CONFIGURED_PROCESS_TIME => 7, ProReportingPeer::CONFIGURED_PROCESS_COST => 8, ProReportingPeer::TOTAL_CASES_OPEN => 9, ProReportingPeer::TOTAL_CASES_OVERDUE => 10, ProReportingPeer::TOTAL_CASES_ON_TIME => 11, ), BasePeer::TYPE_COLNAME => array (ProReportingPeer::PRO_UID => 0, ProReportingPeer::MONTH => 1, ProReportingPeer::YEAR => 2, ProReportingPeer::AVG_TIME => 3, ProReportingPeer::SDV_TIME => 4, ProReportingPeer::TOTAL_CASES_IN => 5, ProReportingPeer::TOTAL_CASES_OUT => 6, ProReportingPeer::CONFIGURED_PROCESS_TIME => 7, ProReportingPeer::CONFIGURED_PROCESS_COST => 8, ProReportingPeer::TOTAL_CASES_OPEN => 9, ProReportingPeer::TOTAL_CASES_OVERDUE => 10, ProReportingPeer::TOTAL_CASES_ON_TIME => 11, ProReportingPeer::PRO_COST => 12, ProReportingPeer::PRO_UNIT_COST => 13, ),
BasePeer::TYPE_FIELDNAME => array ('PRO_UID' => 0, 'MONTH' => 1, 'YEAR' => 2, 'AVG_TIME' => 3, 'SDV_TIME' => 4, 'TOTAL_CASES_IN' => 5, 'TOTAL_CASES_OUT' => 6, 'CONFIGURED_PROCESS_TIME' => 7, 'CONFIGURED_PROCESS_COST' => 8, 'TOTAL_CASES_OPEN' => 9, 'TOTAL_CASES_OVERDUE' => 10, 'TOTAL_CASES_ON_TIME' => 11, ), BasePeer::TYPE_FIELDNAME => array ('PRO_UID' => 0, 'MONTH' => 1, 'YEAR' => 2, 'AVG_TIME' => 3, 'SDV_TIME' => 4, 'TOTAL_CASES_IN' => 5, 'TOTAL_CASES_OUT' => 6, 'CONFIGURED_PROCESS_TIME' => 7, 'CONFIGURED_PROCESS_COST' => 8, 'TOTAL_CASES_OPEN' => 9, 'TOTAL_CASES_OVERDUE' => 10, 'TOTAL_CASES_ON_TIME' => 11, 'PRO_COST' => 12, 'PRO_UNIT_COST' => 13, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
); );
/** /**
@@ -219,6 +225,10 @@ abstract class BaseProReportingPeer
$criteria->addSelectColumn(ProReportingPeer::TOTAL_CASES_ON_TIME); $criteria->addSelectColumn(ProReportingPeer::TOTAL_CASES_ON_TIME);
$criteria->addSelectColumn(ProReportingPeer::PRO_COST);
$criteria->addSelectColumn(ProReportingPeer::PRO_UNIT_COST);
} }
const COUNT = 'COUNT(PRO_REPORTING.PRO_UID)'; const COUNT = 'COUNT(PRO_REPORTING.PRO_UID)';

View File

@@ -355,7 +355,7 @@ abstract class BaseRoute extends BaseObject implements Persistent
/** /**
* Get the [rou_element_origin] column value. * Get the [rou_element_origin] column value.
* *
* @return string * @return string
*/ */
public function getRouElementOrigin() public function getRouElementOrigin()
@@ -762,7 +762,7 @@ abstract class BaseRoute extends BaseObject implements Persistent
/** /**
* Set the value of [rou_element_origin] column. * Set the value of [rou_element_origin] column.
* *
* @param string $v new value * @param string $v new value
* @return void * @return void
*/ */

View File

@@ -101,7 +101,7 @@ abstract class BaseRoutePeer
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('RouUid', 'RouParent', 'ProUid', 'TasUid', 'RouNextTask', 'RouCase', 'RouType', 'RouDefault', 'RouCondition', 'RouToLastUser', 'RouOptional', 'RouSendEmail', 'RouSourceanchor', 'RouTargetanchor', 'RouToPort', 'RouFromPort', 'RouEvnUid', 'GatUid', 'RouElementOrigin', ), BasePeer::TYPE_PHPNAME => array ('RouUid', 'RouParent', 'ProUid', 'TasUid', 'RouNextTask', 'RouCase', 'RouType', 'RouDefault', 'RouCondition', 'RouToLastUser', 'RouOptional', 'RouSendEmail', 'RouSourceanchor', 'RouTargetanchor', 'RouToPort', 'RouFromPort', 'RouEvnUid', 'GatUid', 'RouElementOrigin', ),
BasePeer::TYPE_COLNAME => array (RoutePeer::ROU_UID, RoutePeer::ROU_PARENT, RoutePeer::PRO_UID, RoutePeer::TAS_UID, RoutePeer::ROU_NEXT_TASK, RoutePeer::ROU_CASE, RoutePeer::ROU_TYPE, RoutePeer::ROU_DEFAULT, RoutePeer::ROU_CONDITION, RoutePeer::ROU_TO_LAST_USER, RoutePeer::ROU_OPTIONAL, RoutePeer::ROU_SEND_EMAIL, RoutePeer::ROU_SOURCEANCHOR, RoutePeer::ROU_TARGETANCHOR, RoutePeer::ROU_TO_PORT, RoutePeer::ROU_FROM_PORT, RoutePeer::ROU_EVN_UID, RoutePeer::GAT_UID, RoutePeer::ROU_ELEMENT_ORIGIN, ), BasePeer::TYPE_COLNAME => array (RoutePeer::ROU_UID, RoutePeer::ROU_PARENT, RoutePeer::PRO_UID, RoutePeer::TAS_UID, RoutePeer::ROU_NEXT_TASK, RoutePeer::ROU_CASE, RoutePeer::ROU_TYPE, RoutePeer::ROU_DEFAULT, RoutePeer::ROU_CONDITION, RoutePeer::ROU_TO_LAST_USER, RoutePeer::ROU_OPTIONAL, RoutePeer::ROU_SEND_EMAIL, RoutePeer::ROU_SOURCEANCHOR, RoutePeer::ROU_TARGETANCHOR, RoutePeer::ROU_TO_PORT, RoutePeer::ROU_FROM_PORT, RoutePeer::ROU_EVN_UID, RoutePeer::GAT_UID, RoutePeer::ROU_ELEMENT_ORIGIN, ),
BasePeer::TYPE_FIELDNAME => array ('ROU_UID', 'ROU_PARENT', 'PRO_UID', 'TAS_UID', 'ROU_NEXT_TASK', 'ROU_CASE', 'ROU_TYPE', 'ROU_DEFAULT', 'ROU_CONDITION', 'ROU_TO_LAST_USER', 'ROU_OPTIONAL', 'ROU_SEND_EMAIL', 'ROU_SOURCEANCHOR', 'ROU_TARGETANCHOR', 'ROU_TO_PORT', 'ROU_FROM_PORT', 'ROU_EVN_UID', 'GAT_UID', 'ROU_ELEMENT_ORIGIN' ), BasePeer::TYPE_FIELDNAME => array ('ROU_UID', 'ROU_PARENT', 'PRO_UID', 'TAS_UID', 'ROU_NEXT_TASK', 'ROU_CASE', 'ROU_TYPE', 'ROU_DEFAULT', 'ROU_CONDITION', 'ROU_TO_LAST_USER', 'ROU_OPTIONAL', 'ROU_SEND_EMAIL', 'ROU_SOURCEANCHOR', 'ROU_TARGETANCHOR', 'ROU_TO_PORT', 'ROU_FROM_PORT', 'ROU_EVN_UID', 'GAT_UID', 'ROU_ELEMENT_ORIGIN', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
); );

View File

@@ -57,59 +57,77 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
*/ */
protected $year = 0; protected $year = 0;
/**
* The value for the total_queue_time_by_task field.
* @var double
*/
protected $total_queue_time_by_task = 0;
/** /**
* The value for the total_time_by_task field. * The value for the total_time_by_task field.
* @var double * @var double
*/ */
protected $total_time_by_task; protected $total_time_by_task = 0;
/** /**
* The value for the total_cases_in field. * The value for the total_cases_in field.
* @var double * @var double
*/ */
protected $total_cases_in; protected $total_cases_in = 0;
/** /**
* The value for the total_cases_out field. * The value for the total_cases_out field.
* @var double * @var double
*/ */
protected $total_cases_out; protected $total_cases_out = 0;
/** /**
* The value for the user_hour_cost field. * The value for the user_hour_cost field.
* @var double * @var double
*/ */
protected $user_hour_cost; protected $user_hour_cost = 0;
/** /**
* The value for the avg_time field. * The value for the avg_time field.
* @var double * @var double
*/ */
protected $avg_time; protected $avg_time = 0;
/** /**
* The value for the sdv_time field. * The value for the sdv_time field.
* @var double * @var double
*/ */
protected $sdv_time; protected $sdv_time = 0;
/** /**
* The value for the configured_task_time field. * The value for the configured_task_time field.
* @var double * @var double
*/ */
protected $configured_task_time; protected $configured_task_time = 0;
/** /**
* The value for the total_cases_overdue field. * The value for the total_cases_overdue field.
* @var double * @var double
*/ */
protected $total_cases_overdue; protected $total_cases_overdue = 0;
/** /**
* The value for the total_cases_on_time field. * The value for the total_cases_on_time field.
* @var double * @var double
*/ */
protected $total_cases_on_time; protected $total_cases_on_time = 0;
/**
* The value for the pro_cost field.
* @var double
*/
protected $pro_cost = 0;
/**
* The value for the pro_unit_cost field.
* @var string
*/
protected $pro_unit_cost = '';
/** /**
* Flag to prevent endless save loop, if this object is referenced * Flag to prevent endless save loop, if this object is referenced
@@ -180,6 +198,17 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
return $this->year; return $this->year;
} }
/**
* Get the [total_queue_time_by_task] column value.
*
* @return double
*/
public function getTotalQueueTimeByTask()
{
return $this->total_queue_time_by_task;
}
/** /**
* Get the [total_time_by_task] column value. * Get the [total_time_by_task] column value.
* *
@@ -279,6 +308,28 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
return $this->total_cases_on_time; return $this->total_cases_on_time;
} }
/**
* Get the [pro_cost] column value.
*
* @return double
*/
public function getProCost()
{
return $this->pro_cost;
}
/**
* Get the [pro_unit_cost] column value.
*
* @return string
*/
public function getProUnitCost()
{
return $this->pro_unit_cost;
}
/** /**
* Set the value of [usr_uid] column. * Set the value of [usr_uid] column.
* *
@@ -389,6 +440,22 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
} // setYear() } // setYear()
/**
* Set the value of [total_queue_time_by_task] column.
*
* @param double $v new value
* @return void
*/
public function setTotalQueueTimeByTask($v)
{
if ($this->total_queue_time_by_task !== $v || $v === 0) {
$this->total_queue_time_by_task = $v;
$this->modifiedColumns[] = UsrReportingPeer::TOTAL_QUEUE_TIME_BY_TASK;
}
} // setTotalQueueTimeByTask()
/** /**
* Set the value of [total_time_by_task] column. * Set the value of [total_time_by_task] column.
* *
@@ -398,7 +465,7 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
public function setTotalTimeByTask($v) public function setTotalTimeByTask($v)
{ {
if ($this->total_time_by_task !== $v) { if ($this->total_time_by_task !== $v || $v === 0) {
$this->total_time_by_task = $v; $this->total_time_by_task = $v;
$this->modifiedColumns[] = UsrReportingPeer::TOTAL_TIME_BY_TASK; $this->modifiedColumns[] = UsrReportingPeer::TOTAL_TIME_BY_TASK;
} }
@@ -414,7 +481,7 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
public function setTotalCasesIn($v) public function setTotalCasesIn($v)
{ {
if ($this->total_cases_in !== $v) { if ($this->total_cases_in !== $v || $v === 0) {
$this->total_cases_in = $v; $this->total_cases_in = $v;
$this->modifiedColumns[] = UsrReportingPeer::TOTAL_CASES_IN; $this->modifiedColumns[] = UsrReportingPeer::TOTAL_CASES_IN;
} }
@@ -430,7 +497,7 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
public function setTotalCasesOut($v) public function setTotalCasesOut($v)
{ {
if ($this->total_cases_out !== $v) { if ($this->total_cases_out !== $v || $v === 0) {
$this->total_cases_out = $v; $this->total_cases_out = $v;
$this->modifiedColumns[] = UsrReportingPeer::TOTAL_CASES_OUT; $this->modifiedColumns[] = UsrReportingPeer::TOTAL_CASES_OUT;
} }
@@ -446,7 +513,7 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
public function setUserHourCost($v) public function setUserHourCost($v)
{ {
if ($this->user_hour_cost !== $v) { if ($this->user_hour_cost !== $v || $v === 0) {
$this->user_hour_cost = $v; $this->user_hour_cost = $v;
$this->modifiedColumns[] = UsrReportingPeer::USER_HOUR_COST; $this->modifiedColumns[] = UsrReportingPeer::USER_HOUR_COST;
} }
@@ -462,7 +529,7 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
public function setAvgTime($v) public function setAvgTime($v)
{ {
if ($this->avg_time !== $v) { if ($this->avg_time !== $v || $v === 0) {
$this->avg_time = $v; $this->avg_time = $v;
$this->modifiedColumns[] = UsrReportingPeer::AVG_TIME; $this->modifiedColumns[] = UsrReportingPeer::AVG_TIME;
} }
@@ -478,7 +545,7 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
public function setSdvTime($v) public function setSdvTime($v)
{ {
if ($this->sdv_time !== $v) { if ($this->sdv_time !== $v || $v === 0) {
$this->sdv_time = $v; $this->sdv_time = $v;
$this->modifiedColumns[] = UsrReportingPeer::SDV_TIME; $this->modifiedColumns[] = UsrReportingPeer::SDV_TIME;
} }
@@ -494,7 +561,7 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
public function setConfiguredTaskTime($v) public function setConfiguredTaskTime($v)
{ {
if ($this->configured_task_time !== $v) { if ($this->configured_task_time !== $v || $v === 0) {
$this->configured_task_time = $v; $this->configured_task_time = $v;
$this->modifiedColumns[] = UsrReportingPeer::CONFIGURED_TASK_TIME; $this->modifiedColumns[] = UsrReportingPeer::CONFIGURED_TASK_TIME;
} }
@@ -510,7 +577,7 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
public function setTotalCasesOverdue($v) public function setTotalCasesOverdue($v)
{ {
if ($this->total_cases_overdue !== $v) { if ($this->total_cases_overdue !== $v || $v === 0) {
$this->total_cases_overdue = $v; $this->total_cases_overdue = $v;
$this->modifiedColumns[] = UsrReportingPeer::TOTAL_CASES_OVERDUE; $this->modifiedColumns[] = UsrReportingPeer::TOTAL_CASES_OVERDUE;
} }
@@ -526,13 +593,51 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
public function setTotalCasesOnTime($v) public function setTotalCasesOnTime($v)
{ {
if ($this->total_cases_on_time !== $v) { if ($this->total_cases_on_time !== $v || $v === 0) {
$this->total_cases_on_time = $v; $this->total_cases_on_time = $v;
$this->modifiedColumns[] = UsrReportingPeer::TOTAL_CASES_ON_TIME; $this->modifiedColumns[] = UsrReportingPeer::TOTAL_CASES_ON_TIME;
} }
} // setTotalCasesOnTime() } // setTotalCasesOnTime()
/**
* Set the value of [pro_cost] column.
*
* @param double $v new value
* @return void
*/
public function setProCost($v)
{
if ($this->pro_cost !== $v || $v === 0) {
$this->pro_cost = $v;
$this->modifiedColumns[] = UsrReportingPeer::PRO_COST;
}
} // setProCost()
/**
* Set the value of [pro_unit_cost] column.
*
* @param string $v new value
* @return void
*/
public function setProUnitCost($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->pro_unit_cost !== $v || $v === '') {
$this->pro_unit_cost = $v;
$this->modifiedColumns[] = UsrReportingPeer::PRO_UNIT_COST;
}
} // setProUnitCost()
/** /**
* Hydrates (populates) the object variables with values from the database resultset. * Hydrates (populates) the object variables with values from the database resultset.
* *
@@ -560,30 +665,36 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
$this->year = $rs->getInt($startcol + 4); $this->year = $rs->getInt($startcol + 4);
$this->total_time_by_task = $rs->getFloat($startcol + 5); $this->total_queue_time_by_task = $rs->getFloat($startcol + 5);
$this->total_cases_in = $rs->getFloat($startcol + 6); $this->total_time_by_task = $rs->getFloat($startcol + 6);
$this->total_cases_out = $rs->getFloat($startcol + 7); $this->total_cases_in = $rs->getFloat($startcol + 7);
$this->user_hour_cost = $rs->getFloat($startcol + 8); $this->total_cases_out = $rs->getFloat($startcol + 8);
$this->avg_time = $rs->getFloat($startcol + 9); $this->user_hour_cost = $rs->getFloat($startcol + 9);
$this->sdv_time = $rs->getFloat($startcol + 10); $this->avg_time = $rs->getFloat($startcol + 10);
$this->configured_task_time = $rs->getFloat($startcol + 11); $this->sdv_time = $rs->getFloat($startcol + 11);
$this->total_cases_overdue = $rs->getFloat($startcol + 12); $this->configured_task_time = $rs->getFloat($startcol + 12);
$this->total_cases_on_time = $rs->getFloat($startcol + 13); $this->total_cases_overdue = $rs->getFloat($startcol + 13);
$this->total_cases_on_time = $rs->getFloat($startcol + 14);
$this->pro_cost = $rs->getFloat($startcol + 15);
$this->pro_unit_cost = $rs->getString($startcol + 16);
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer. // FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 14; // 14 = UsrReportingPeer::NUM_COLUMNS - UsrReportingPeer::NUM_LAZY_LOAD_COLUMNS). return $startcol + 17; // 17 = UsrReportingPeer::NUM_COLUMNS - UsrReportingPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating UsrReporting object", $e); throw new PropelException("Error populating UsrReporting object", $e);
@@ -803,32 +914,41 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
return $this->getYear(); return $this->getYear();
break; break;
case 5: case 5:
return $this->getTotalTimeByTask(); return $this->getTotalQueueTimeByTask();
break; break;
case 6: case 6:
return $this->getTotalCasesIn(); return $this->getTotalTimeByTask();
break; break;
case 7: case 7:
return $this->getTotalCasesOut(); return $this->getTotalCasesIn();
break; break;
case 8: case 8:
return $this->getUserHourCost(); return $this->getTotalCasesOut();
break; break;
case 9: case 9:
return $this->getAvgTime(); return $this->getUserHourCost();
break; break;
case 10: case 10:
return $this->getSdvTime(); return $this->getAvgTime();
break; break;
case 11: case 11:
return $this->getConfiguredTaskTime(); return $this->getSdvTime();
break; break;
case 12: case 12:
return $this->getTotalCasesOverdue(); return $this->getConfiguredTaskTime();
break; break;
case 13: case 13:
return $this->getTotalCasesOverdue();
break;
case 14:
return $this->getTotalCasesOnTime(); return $this->getTotalCasesOnTime();
break; break;
case 15:
return $this->getProCost();
break;
case 16:
return $this->getProUnitCost();
break;
default: default:
return null; return null;
break; break;
@@ -854,15 +974,18 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
$keys[2] => $this->getProUid(), $keys[2] => $this->getProUid(),
$keys[3] => $this->getMonth(), $keys[3] => $this->getMonth(),
$keys[4] => $this->getYear(), $keys[4] => $this->getYear(),
$keys[5] => $this->getTotalTimeByTask(), $keys[5] => $this->getTotalQueueTimeByTask(),
$keys[6] => $this->getTotalCasesIn(), $keys[6] => $this->getTotalTimeByTask(),
$keys[7] => $this->getTotalCasesOut(), $keys[7] => $this->getTotalCasesIn(),
$keys[8] => $this->getUserHourCost(), $keys[8] => $this->getTotalCasesOut(),
$keys[9] => $this->getAvgTime(), $keys[9] => $this->getUserHourCost(),
$keys[10] => $this->getSdvTime(), $keys[10] => $this->getAvgTime(),
$keys[11] => $this->getConfiguredTaskTime(), $keys[11] => $this->getSdvTime(),
$keys[12] => $this->getTotalCasesOverdue(), $keys[12] => $this->getConfiguredTaskTime(),
$keys[13] => $this->getTotalCasesOnTime(), $keys[13] => $this->getTotalCasesOverdue(),
$keys[14] => $this->getTotalCasesOnTime(),
$keys[15] => $this->getProCost(),
$keys[16] => $this->getProUnitCost(),
); );
return $result; return $result;
} }
@@ -910,32 +1033,41 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
$this->setYear($value); $this->setYear($value);
break; break;
case 5: case 5:
$this->setTotalTimeByTask($value); $this->setTotalQueueTimeByTask($value);
break; break;
case 6: case 6:
$this->setTotalCasesIn($value); $this->setTotalTimeByTask($value);
break; break;
case 7: case 7:
$this->setTotalCasesOut($value); $this->setTotalCasesIn($value);
break; break;
case 8: case 8:
$this->setUserHourCost($value); $this->setTotalCasesOut($value);
break; break;
case 9: case 9:
$this->setAvgTime($value); $this->setUserHourCost($value);
break; break;
case 10: case 10:
$this->setSdvTime($value); $this->setAvgTime($value);
break; break;
case 11: case 11:
$this->setConfiguredTaskTime($value); $this->setSdvTime($value);
break; break;
case 12: case 12:
$this->setTotalCasesOverdue($value); $this->setConfiguredTaskTime($value);
break; break;
case 13: case 13:
$this->setTotalCasesOverdue($value);
break;
case 14:
$this->setTotalCasesOnTime($value); $this->setTotalCasesOnTime($value);
break; break;
case 15:
$this->setProCost($value);
break;
case 16:
$this->setProUnitCost($value);
break;
} // switch() } // switch()
} }
@@ -980,39 +1112,51 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
} }
if (array_key_exists($keys[5], $arr)) { if (array_key_exists($keys[5], $arr)) {
$this->setTotalTimeByTask($arr[$keys[5]]); $this->setTotalQueueTimeByTask($arr[$keys[5]]);
} }
if (array_key_exists($keys[6], $arr)) { if (array_key_exists($keys[6], $arr)) {
$this->setTotalCasesIn($arr[$keys[6]]); $this->setTotalTimeByTask($arr[$keys[6]]);
} }
if (array_key_exists($keys[7], $arr)) { if (array_key_exists($keys[7], $arr)) {
$this->setTotalCasesOut($arr[$keys[7]]); $this->setTotalCasesIn($arr[$keys[7]]);
} }
if (array_key_exists($keys[8], $arr)) { if (array_key_exists($keys[8], $arr)) {
$this->setUserHourCost($arr[$keys[8]]); $this->setTotalCasesOut($arr[$keys[8]]);
} }
if (array_key_exists($keys[9], $arr)) { if (array_key_exists($keys[9], $arr)) {
$this->setAvgTime($arr[$keys[9]]); $this->setUserHourCost($arr[$keys[9]]);
} }
if (array_key_exists($keys[10], $arr)) { if (array_key_exists($keys[10], $arr)) {
$this->setSdvTime($arr[$keys[10]]); $this->setAvgTime($arr[$keys[10]]);
} }
if (array_key_exists($keys[11], $arr)) { if (array_key_exists($keys[11], $arr)) {
$this->setConfiguredTaskTime($arr[$keys[11]]); $this->setSdvTime($arr[$keys[11]]);
} }
if (array_key_exists($keys[12], $arr)) { if (array_key_exists($keys[12], $arr)) {
$this->setTotalCasesOverdue($arr[$keys[12]]); $this->setConfiguredTaskTime($arr[$keys[12]]);
} }
if (array_key_exists($keys[13], $arr)) { if (array_key_exists($keys[13], $arr)) {
$this->setTotalCasesOnTime($arr[$keys[13]]); $this->setTotalCasesOverdue($arr[$keys[13]]);
}
if (array_key_exists($keys[14], $arr)) {
$this->setTotalCasesOnTime($arr[$keys[14]]);
}
if (array_key_exists($keys[15], $arr)) {
$this->setProCost($arr[$keys[15]]);
}
if (array_key_exists($keys[16], $arr)) {
$this->setProUnitCost($arr[$keys[16]]);
} }
} }
@@ -1046,6 +1190,10 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
$criteria->add(UsrReportingPeer::YEAR, $this->year); $criteria->add(UsrReportingPeer::YEAR, $this->year);
} }
if ($this->isColumnModified(UsrReportingPeer::TOTAL_QUEUE_TIME_BY_TASK)) {
$criteria->add(UsrReportingPeer::TOTAL_QUEUE_TIME_BY_TASK, $this->total_queue_time_by_task);
}
if ($this->isColumnModified(UsrReportingPeer::TOTAL_TIME_BY_TASK)) { if ($this->isColumnModified(UsrReportingPeer::TOTAL_TIME_BY_TASK)) {
$criteria->add(UsrReportingPeer::TOTAL_TIME_BY_TASK, $this->total_time_by_task); $criteria->add(UsrReportingPeer::TOTAL_TIME_BY_TASK, $this->total_time_by_task);
} }
@@ -1082,6 +1230,14 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
$criteria->add(UsrReportingPeer::TOTAL_CASES_ON_TIME, $this->total_cases_on_time); $criteria->add(UsrReportingPeer::TOTAL_CASES_ON_TIME, $this->total_cases_on_time);
} }
if ($this->isColumnModified(UsrReportingPeer::PRO_COST)) {
$criteria->add(UsrReportingPeer::PRO_COST, $this->pro_cost);
}
if ($this->isColumnModified(UsrReportingPeer::PRO_UNIT_COST)) {
$criteria->add(UsrReportingPeer::PRO_UNIT_COST, $this->pro_unit_cost);
}
return $criteria; return $criteria;
} }
@@ -1160,6 +1316,8 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
$copyObj->setProUid($this->pro_uid); $copyObj->setProUid($this->pro_uid);
$copyObj->setTotalQueueTimeByTask($this->total_queue_time_by_task);
$copyObj->setTotalTimeByTask($this->total_time_by_task); $copyObj->setTotalTimeByTask($this->total_time_by_task);
$copyObj->setTotalCasesIn($this->total_cases_in); $copyObj->setTotalCasesIn($this->total_cases_in);
@@ -1178,6 +1336,10 @@ abstract class BaseUsrReporting extends BaseObject implements Persistent
$copyObj->setTotalCasesOnTime($this->total_cases_on_time); $copyObj->setTotalCasesOnTime($this->total_cases_on_time);
$copyObj->setProCost($this->pro_cost);
$copyObj->setProUnitCost($this->pro_unit_cost);
$copyObj->setNew(true); $copyObj->setNew(true);

View File

@@ -25,7 +25,7 @@ abstract class BaseUsrReportingPeer
const CLASS_DEFAULT = 'classes.model.UsrReporting'; const CLASS_DEFAULT = 'classes.model.UsrReporting';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 14; const NUM_COLUMNS = 17;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -46,6 +46,9 @@ abstract class BaseUsrReportingPeer
/** the column name for the YEAR field */ /** the column name for the YEAR field */
const YEAR = 'USR_REPORTING.YEAR'; const YEAR = 'USR_REPORTING.YEAR';
/** the column name for the TOTAL_QUEUE_TIME_BY_TASK field */
const TOTAL_QUEUE_TIME_BY_TASK = 'USR_REPORTING.TOTAL_QUEUE_TIME_BY_TASK';
/** the column name for the TOTAL_TIME_BY_TASK field */ /** the column name for the TOTAL_TIME_BY_TASK field */
const TOTAL_TIME_BY_TASK = 'USR_REPORTING.TOTAL_TIME_BY_TASK'; const TOTAL_TIME_BY_TASK = 'USR_REPORTING.TOTAL_TIME_BY_TASK';
@@ -73,6 +76,12 @@ abstract class BaseUsrReportingPeer
/** the column name for the TOTAL_CASES_ON_TIME field */ /** the column name for the TOTAL_CASES_ON_TIME field */
const TOTAL_CASES_ON_TIME = 'USR_REPORTING.TOTAL_CASES_ON_TIME'; const TOTAL_CASES_ON_TIME = 'USR_REPORTING.TOTAL_CASES_ON_TIME';
/** the column name for the PRO_COST field */
const PRO_COST = 'USR_REPORTING.PRO_COST';
/** the column name for the PRO_UNIT_COST field */
const PRO_UNIT_COST = 'USR_REPORTING.PRO_UNIT_COST';
/** The PHP to DB Name Mapping */ /** The PHP to DB Name Mapping */
private static $phpNameMap = null; private static $phpNameMap = null;
@@ -84,10 +93,10 @@ abstract class BaseUsrReportingPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/ */
private static $fieldNames = array ( private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('UsrUid', 'TasUid', 'ProUid', 'Month', 'Year', 'TotalTimeByTask', 'TotalCasesIn', 'TotalCasesOut', 'UserHourCost', 'AvgTime', 'SdvTime', 'ConfiguredTaskTime', 'TotalCasesOverdue', 'TotalCasesOnTime', ), BasePeer::TYPE_PHPNAME => array ('UsrUid', 'TasUid', 'ProUid', 'Month', 'Year', 'TotalQueueTimeByTask', 'TotalTimeByTask', 'TotalCasesIn', 'TotalCasesOut', 'UserHourCost', 'AvgTime', 'SdvTime', 'ConfiguredTaskTime', 'TotalCasesOverdue', 'TotalCasesOnTime', 'ProCost', 'ProUnitCost', ),
BasePeer::TYPE_COLNAME => array (UsrReportingPeer::USR_UID, UsrReportingPeer::TAS_UID, UsrReportingPeer::PRO_UID, UsrReportingPeer::MONTH, UsrReportingPeer::YEAR, UsrReportingPeer::TOTAL_TIME_BY_TASK, UsrReportingPeer::TOTAL_CASES_IN, UsrReportingPeer::TOTAL_CASES_OUT, UsrReportingPeer::USER_HOUR_COST, UsrReportingPeer::AVG_TIME, UsrReportingPeer::SDV_TIME, UsrReportingPeer::CONFIGURED_TASK_TIME, UsrReportingPeer::TOTAL_CASES_OVERDUE, UsrReportingPeer::TOTAL_CASES_ON_TIME, ), BasePeer::TYPE_COLNAME => array (UsrReportingPeer::USR_UID, UsrReportingPeer::TAS_UID, UsrReportingPeer::PRO_UID, UsrReportingPeer::MONTH, UsrReportingPeer::YEAR, UsrReportingPeer::TOTAL_QUEUE_TIME_BY_TASK, UsrReportingPeer::TOTAL_TIME_BY_TASK, UsrReportingPeer::TOTAL_CASES_IN, UsrReportingPeer::TOTAL_CASES_OUT, UsrReportingPeer::USER_HOUR_COST, UsrReportingPeer::AVG_TIME, UsrReportingPeer::SDV_TIME, UsrReportingPeer::CONFIGURED_TASK_TIME, UsrReportingPeer::TOTAL_CASES_OVERDUE, UsrReportingPeer::TOTAL_CASES_ON_TIME, UsrReportingPeer::PRO_COST, UsrReportingPeer::PRO_UNIT_COST, ),
BasePeer::TYPE_FIELDNAME => array ('USR_UID', 'TAS_UID', 'PRO_UID', 'MONTH', 'YEAR', 'TOTAL_TIME_BY_TASK', 'TOTAL_CASES_IN', 'TOTAL_CASES_OUT', 'USER_HOUR_COST', 'AVG_TIME', 'SDV_TIME', 'CONFIGURED_TASK_TIME', 'TOTAL_CASES_OVERDUE', 'TOTAL_CASES_ON_TIME', ), BasePeer::TYPE_FIELDNAME => array ('USR_UID', 'TAS_UID', 'PRO_UID', 'MONTH', 'YEAR', 'TOTAL_QUEUE_TIME_BY_TASK', 'TOTAL_TIME_BY_TASK', 'TOTAL_CASES_IN', 'TOTAL_CASES_OUT', 'USER_HOUR_COST', 'AVG_TIME', 'SDV_TIME', 'CONFIGURED_TASK_TIME', 'TOTAL_CASES_OVERDUE', 'TOTAL_CASES_ON_TIME', 'PRO_COST', 'PRO_UNIT_COST', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
); );
/** /**
@@ -97,10 +106,10 @@ abstract class BaseUsrReportingPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
private static $fieldKeys = array ( private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('UsrUid' => 0, 'TasUid' => 1, 'ProUid' => 2, 'Month' => 3, 'Year' => 4, 'TotalTimeByTask' => 5, 'TotalCasesIn' => 6, 'TotalCasesOut' => 7, 'UserHourCost' => 8, 'AvgTime' => 9, 'SdvTime' => 10, 'ConfiguredTaskTime' => 11, 'TotalCasesOverdue' => 12, 'TotalCasesOnTime' => 13, ), BasePeer::TYPE_PHPNAME => array ('UsrUid' => 0, 'TasUid' => 1, 'ProUid' => 2, 'Month' => 3, 'Year' => 4, 'TotalQueueTimeByTask' => 5, 'TotalTimeByTask' => 6, 'TotalCasesIn' => 7, 'TotalCasesOut' => 8, 'UserHourCost' => 9, 'AvgTime' => 10, 'SdvTime' => 11, 'ConfiguredTaskTime' => 12, 'TotalCasesOverdue' => 13, 'TotalCasesOnTime' => 14, 'ProCost' => 15, 'ProUnitCost' => 16, ),
BasePeer::TYPE_COLNAME => array (UsrReportingPeer::USR_UID => 0, UsrReportingPeer::TAS_UID => 1, UsrReportingPeer::PRO_UID => 2, UsrReportingPeer::MONTH => 3, UsrReportingPeer::YEAR => 4, UsrReportingPeer::TOTAL_TIME_BY_TASK => 5, UsrReportingPeer::TOTAL_CASES_IN => 6, UsrReportingPeer::TOTAL_CASES_OUT => 7, UsrReportingPeer::USER_HOUR_COST => 8, UsrReportingPeer::AVG_TIME => 9, UsrReportingPeer::SDV_TIME => 10, UsrReportingPeer::CONFIGURED_TASK_TIME => 11, UsrReportingPeer::TOTAL_CASES_OVERDUE => 12, UsrReportingPeer::TOTAL_CASES_ON_TIME => 13, ), BasePeer::TYPE_COLNAME => array (UsrReportingPeer::USR_UID => 0, UsrReportingPeer::TAS_UID => 1, UsrReportingPeer::PRO_UID => 2, UsrReportingPeer::MONTH => 3, UsrReportingPeer::YEAR => 4, UsrReportingPeer::TOTAL_QUEUE_TIME_BY_TASK => 5, UsrReportingPeer::TOTAL_TIME_BY_TASK => 6, UsrReportingPeer::TOTAL_CASES_IN => 7, UsrReportingPeer::TOTAL_CASES_OUT => 8, UsrReportingPeer::USER_HOUR_COST => 9, UsrReportingPeer::AVG_TIME => 10, UsrReportingPeer::SDV_TIME => 11, UsrReportingPeer::CONFIGURED_TASK_TIME => 12, UsrReportingPeer::TOTAL_CASES_OVERDUE => 13, UsrReportingPeer::TOTAL_CASES_ON_TIME => 14, UsrReportingPeer::PRO_COST => 15, UsrReportingPeer::PRO_UNIT_COST => 16, ),
BasePeer::TYPE_FIELDNAME => array ('USR_UID' => 0, 'TAS_UID' => 1, 'PRO_UID' => 2, 'MONTH' => 3, 'YEAR' => 4, 'TOTAL_TIME_BY_TASK' => 5, 'TOTAL_CASES_IN' => 6, 'TOTAL_CASES_OUT' => 7, 'USER_HOUR_COST' => 8, 'AVG_TIME' => 9, 'SDV_TIME' => 10, 'CONFIGURED_TASK_TIME' => 11, 'TOTAL_CASES_OVERDUE' => 12, 'TOTAL_CASES_ON_TIME' => 13, ), BasePeer::TYPE_FIELDNAME => array ('USR_UID' => 0, 'TAS_UID' => 1, 'PRO_UID' => 2, 'MONTH' => 3, 'YEAR' => 4, 'TOTAL_QUEUE_TIME_BY_TASK' => 5, 'TOTAL_TIME_BY_TASK' => 6, 'TOTAL_CASES_IN' => 7, 'TOTAL_CASES_OUT' => 8, 'USER_HOUR_COST' => 9, 'AVG_TIME' => 10, 'SDV_TIME' => 11, 'CONFIGURED_TASK_TIME' => 12, 'TOTAL_CASES_OVERDUE' => 13, 'TOTAL_CASES_ON_TIME' => 14, 'PRO_COST' => 15, 'PRO_UNIT_COST' => 16, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
); );
/** /**
@@ -211,6 +220,8 @@ abstract class BaseUsrReportingPeer
$criteria->addSelectColumn(UsrReportingPeer::YEAR); $criteria->addSelectColumn(UsrReportingPeer::YEAR);
$criteria->addSelectColumn(UsrReportingPeer::TOTAL_QUEUE_TIME_BY_TASK);
$criteria->addSelectColumn(UsrReportingPeer::TOTAL_TIME_BY_TASK); $criteria->addSelectColumn(UsrReportingPeer::TOTAL_TIME_BY_TASK);
$criteria->addSelectColumn(UsrReportingPeer::TOTAL_CASES_IN); $criteria->addSelectColumn(UsrReportingPeer::TOTAL_CASES_IN);
@@ -229,6 +240,10 @@ abstract class BaseUsrReportingPeer
$criteria->addSelectColumn(UsrReportingPeer::TOTAL_CASES_ON_TIME); $criteria->addSelectColumn(UsrReportingPeer::TOTAL_CASES_ON_TIME);
$criteria->addSelectColumn(UsrReportingPeer::PRO_COST);
$criteria->addSelectColumn(UsrReportingPeer::PRO_UNIT_COST);
} }
const COUNT = 'COUNT(USR_REPORTING.USR_UID)'; const COUNT = 'COUNT(USR_REPORTING.USR_UID)';

View File

@@ -280,7 +280,7 @@
<column name="APP_MSG_ATTACH" type="LONGVARCHAR" required="false"/> <column name="APP_MSG_ATTACH" type="LONGVARCHAR" required="false"/>
<column name="APP_MSG_SEND_DATE" type="TIMESTAMP" required="true"/> <column name="APP_MSG_SEND_DATE" type="TIMESTAMP" required="true"/>
<column name="APP_MSG_SHOW_MESSAGE" type="TINYINT" required="true" default="1"/> <column name="APP_MSG_SHOW_MESSAGE" type="TINYINT" required="true" default="1"/>
<column name="APP_MSG_ERROR" type="LONGVARCHAR" required="false" default=""/> <column name="APP_MSG_ERROR" type="LONGVARCHAR" required="false"/>
</table> </table>
<table name="APP_OWNER"> <table name="APP_OWNER">
<vendor type="mysql"> <vendor type="mysql">
@@ -502,7 +502,7 @@
<parameter name="Create_options" value=""/> <parameter name="Create_options" value=""/>
<parameter name="Comment" value=""/> <parameter name="Comment" value=""/>
</vendor> </vendor>
<column name="GRP_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/> <column name="GRP_UID" type="VARCHAR" size="32" required="true" primaryKey="true"/>
<column name="GRP_STATUS" type="CHAR" size="8" required="true" default="ACTIVE"/> <column name="GRP_STATUS" type="CHAR" size="8" required="true" default="ACTIVE"/>
<column name="GRP_LDAP_DN" type="VARCHAR" size="255" required="true" default=""/> <column name="GRP_LDAP_DN" type="VARCHAR" size="255" required="true" default=""/>
<column name="GRP_UX" type="VARCHAR" size="128" default="NORMAL"/> <column name="GRP_UX" type="VARCHAR" size="128" default="NORMAL"/>
@@ -2523,6 +2523,15 @@
<parameter name="Seq_in_index" value="1"/> <parameter name="Seq_in_index" value="1"/>
</vendor> </vendor>
</index> </index>
<index name="taskUid">
<index-column name="TAS_UID"/>
<vendor type="mysql">
<parameter name="Table" value="APP_CACHE_VIEW"/>
<parameter name="Non_unique" value="1"/>
<parameter name="Key_name" value="taskUid"/>
<parameter name="Seq_in_index" value="1"/>
</vendor>
</index>
<index name="indexAppUser"> <index name="indexAppUser">
<index-column name="USR_UID"/> <index-column name="USR_UID"/>
<index-column name="APP_STATUS"/> <index-column name="APP_STATUS"/>
@@ -3951,7 +3960,7 @@
<column name="DEL_INDEX" type="INTEGER" required="true" default="0" /> <column name="DEL_INDEX" type="INTEGER" required="true" default="0" />
<column name="PRO_UID" type="VARCHAR" size="32" required="true" /> <column name="PRO_UID" type="VARCHAR" size="32" required="true" />
<column name="TAS_UID" type="VARCHAR" size="32" required="true" /> <column name="TAS_UID" type="VARCHAR" size="32" required="true" />
<column name="GRP_UID" type="LONGVARCHAR" required="true" default="" /> <column name="GRP_UID" type="LONGVARCHAR" required="true" />
</table> </table>
<table name="LIST_INBOX"> <table name="LIST_INBOX">
@@ -5097,7 +5106,7 @@
<column name="CAT_LABEL_ID" type="VARCHAR" size="100" required="true" default=""/> <column name="CAT_LABEL_ID" type="VARCHAR" size="100" required="true" default=""/>
<column name="CAT_TYPE" type="VARCHAR" size="100" required="true" primaryKey="true" default=""/> <column name="CAT_TYPE" type="VARCHAR" size="100" required="true" primaryKey="true" default=""/>
<column name="CAT_FLAG" type="VARCHAR" size="50" required="false" default=""/> <column name="CAT_FLAG" type="VARCHAR" size="50" required="false" default=""/>
<column name="CAT_OBSERVATION" type="LONGVARCHAR" required="false" default=""/> <column name="CAT_OBSERVATION" type="LONGVARCHAR" required="false" />
<column name="CAT_CREATE_DATE" type="TIMESTAMP" required="true" /> <column name="CAT_CREATE_DATE" type="TIMESTAMP" required="true" />
<column name="CAT_UPDATE_DATE" type="TIMESTAMP" required="false" /> <column name="CAT_UPDATE_DATE" type="TIMESTAMP" required="false" />
<index name="indexType"> <index name="indexType">
@@ -5164,7 +5173,7 @@
<column name="TMREVN_DAY" type="VARCHAR" size="5" required="true" default="" /> <column name="TMREVN_DAY" type="VARCHAR" size="5" required="true" default="" />
<column name="TMREVN_HOUR" type="VARCHAR" size="5" required="true" default="" /> <column name="TMREVN_HOUR" type="VARCHAR" size="5" required="true" default="" />
<column name="TMREVN_MINUTE" type="VARCHAR" size="5" required="true" default="" /> <column name="TMREVN_MINUTE" type="VARCHAR" size="5" required="true" default="" />
<column name="TMREVN_CONFIGURATION_DATA" type="LONGVARCHAR" required="true" default="" /> <column name="TMREVN_CONFIGURATION_DATA" type="LONGVARCHAR" required="true" />
<column name="TMREVN_NEXT_RUN_DATE" type="TIMESTAMP" required="false" /> <column name="TMREVN_NEXT_RUN_DATE" type="TIMESTAMP" required="false" />
<column name="TMREVN_LAST_RUN_DATE" type="TIMESTAMP" required="false" /> <column name="TMREVN_LAST_RUN_DATE" type="TIMESTAMP" required="false" />
<column name="TMREVN_LAST_EXECUTION_DATE" type="TIMESTAMP" required="false" /> <column name="TMREVN_LAST_EXECUTION_DATE" type="TIMESTAMP" required="false" />

View File

@@ -2,7 +2,6 @@
# This is a fix for InnoDB in MySQL >= 4.1.x # This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set. # It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0; SET FOREIGN_KEY_CHECKS = 0;
SET @@global.sql_mode='MYSQL40';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- APPLICATION #-- APPLICATION
@@ -29,9 +28,9 @@ CREATE TABLE `APPLICATION`
`APP_UPDATE_DATE` DATETIME NOT NULL, `APP_UPDATE_DATE` DATETIME NOT NULL,
`APP_DATA` MEDIUMTEXT NOT NULL, `APP_DATA` MEDIUMTEXT NOT NULL,
`APP_PIN` VARCHAR(32) default '' NOT NULL, `APP_PIN` VARCHAR(32) default '' NOT NULL,
`APP_DURATION` DOUBLE default 0, `APP_DURATION` DOUBLE default 0,
`APP_DELAY_DURATION` DOUBLE default 0, `APP_DELAY_DURATION` DOUBLE default 0,
`APP_DRIVE_FOLDER_UID` VARCHAR(32) DEFAULT '', `APP_DRIVE_FOLDER_UID` VARCHAR(32) default '',
PRIMARY KEY (`APP_UID`), PRIMARY KEY (`APP_UID`),
KEY `indexApp`(`PRO_UID`, `APP_STATUS`, `APP_UID`), KEY `indexApp`(`PRO_UID`, `APP_STATUS`, `APP_UID`),
KEY `indexAppNumber`(`APP_NUMBER`), KEY `indexAppNumber`(`APP_NUMBER`),
@@ -60,9 +59,9 @@ CREATE TABLE `APP_DELEGATION`
`DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL, `DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL,
`DEL_DELEGATE_DATE` DATETIME NOT NULL, `DEL_DELEGATE_DATE` DATETIME NOT NULL,
`DEL_INIT_DATE` DATETIME, `DEL_INIT_DATE` DATETIME,
`DEL_FINISH_DATE` DATETIME, `DEL_FINISH_DATE` DATETIME,
`DEL_TASK_DUE_DATE` DATETIME, `DEL_TASK_DUE_DATE` DATETIME,
`DEL_RISK_DATE` DATETIME, `DEL_RISK_DATE` DATETIME,
`DEL_DURATION` DOUBLE default 0, `DEL_DURATION` DOUBLE default 0,
`DEL_QUEUE_DURATION` DOUBLE default 0, `DEL_QUEUE_DURATION` DOUBLE default 0,
`DEL_DELAY_DURATION` DOUBLE default 0, `DEL_DELAY_DURATION` DOUBLE default 0,
@@ -97,7 +96,7 @@ CREATE TABLE `APP_DOCUMENT`
`APP_DOC_STATUS` VARCHAR(32) default 'ACTIVE' NOT NULL, `APP_DOC_STATUS` VARCHAR(32) default 'ACTIVE' NOT NULL,
`APP_DOC_STATUS_DATE` DATETIME, `APP_DOC_STATUS_DATE` DATETIME,
`APP_DOC_FIELDNAME` VARCHAR(150), `APP_DOC_FIELDNAME` VARCHAR(150),
`APP_DOC_DRIVE_DOWNLOAD` MEDIUMTEXT, `APP_DOC_DRIVE_DOWNLOAD` MEDIUMTEXT,
PRIMARY KEY (`APP_DOC_UID`,`DOC_VERSION`), PRIMARY KEY (`APP_DOC_UID`,`DOC_VERSION`),
KEY `indexAppDocument`(`FOLDER_UID`, `APP_DOC_UID`) KEY `indexAppDocument`(`FOLDER_UID`, `APP_DOC_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Documents in an Application'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Documents in an Application';
@@ -127,7 +126,7 @@ CREATE TABLE `APP_MESSAGE`
`APP_MSG_ATTACH` MEDIUMTEXT, `APP_MSG_ATTACH` MEDIUMTEXT,
`APP_MSG_SEND_DATE` DATETIME NOT NULL, `APP_MSG_SEND_DATE` DATETIME NOT NULL,
`APP_MSG_SHOW_MESSAGE` TINYINT default 1 NOT NULL, `APP_MSG_SHOW_MESSAGE` TINYINT default 1 NOT NULL,
`APP_MSG_ERROR` MEDIUMTEXT default '' NOT NULL, `APP_MSG_ERROR` MEDIUMTEXT,
PRIMARY KEY (`APP_MSG_UID`) PRIMARY KEY (`APP_MSG_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Messages in an Application'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Messages in an Application';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -214,7 +213,7 @@ CREATE TABLE `DYNAFORM`
`DYN_CONTENT` MEDIUMTEXT, `DYN_CONTENT` MEDIUMTEXT,
`DYN_LABEL` MEDIUMTEXT, `DYN_LABEL` MEDIUMTEXT,
`DYN_VERSION` INTEGER NOT NULL, `DYN_VERSION` INTEGER NOT NULL,
`DYN_UPDATE_DATE` DATETIME NOT NULL, `DYN_UPDATE_DATE` DATETIME,
PRIMARY KEY (`DYN_UID`) PRIMARY KEY (`DYN_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Forms required'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Forms required';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -226,7 +225,7 @@ DROP TABLE IF EXISTS `GROUPWF`;
CREATE TABLE `GROUPWF` CREATE TABLE `GROUPWF`
( (
`GRP_UID` VARCHAR(32) default '' NOT NULL, `GRP_UID` VARCHAR(32) NOT NULL,
`GRP_STATUS` CHAR(8) default 'ACTIVE' NOT NULL, `GRP_STATUS` CHAR(8) default 'ACTIVE' NOT NULL,
`GRP_LDAP_DN` VARCHAR(255) default '' NOT NULL, `GRP_LDAP_DN` VARCHAR(255) default '' NOT NULL,
`GRP_UX` VARCHAR(128) default 'NORMAL', `GRP_UX` VARCHAR(128) default 'NORMAL',
@@ -433,8 +432,8 @@ CREATE TABLE `PROCESS`
`PRO_DEBUG` INTEGER default 0 NOT NULL, `PRO_DEBUG` INTEGER default 0 NOT NULL,
`PRO_DYNAFORMS` MEDIUMTEXT, `PRO_DYNAFORMS` MEDIUMTEXT,
`PRO_DERIVATION_SCREEN_TPL` VARCHAR(128) default '', `PRO_DERIVATION_SCREEN_TPL` VARCHAR(128) default '',
`PRO_COST` DECIMAL(7,2) default 0, `PRO_COST` DECIMAL(7,2) default 0,
`PRO_UNIT_COST` VARCHAR(50) default '', `PRO_UNIT_COST` VARCHAR(50) default '',
PRIMARY KEY (`PRO_UID`) PRIMARY KEY (`PRO_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Store process Information'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Store process Information';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -512,7 +511,7 @@ CREATE TABLE `ROUTE`
`ROU_FROM_PORT` INTEGER default 2 NOT NULL, `ROU_FROM_PORT` INTEGER default 2 NOT NULL,
`ROU_EVN_UID` VARCHAR(32) default '' NOT NULL, `ROU_EVN_UID` VARCHAR(32) default '' NOT NULL,
`GAT_UID` VARCHAR(32) default '' NOT NULL, `GAT_UID` VARCHAR(32) default '' NOT NULL,
`ROU_ELEMENT_ORIGIN` VARCHAR(32) default '' NOT NULL, `ROU_ELEMENT_ORIGIN` VARCHAR(32) default '',
PRIMARY KEY (`ROU_UID`) PRIMARY KEY (`ROU_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Differents flows for a flow in business process'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Differents flows for a flow in business process';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -717,12 +716,12 @@ CREATE TABLE `USERS`
`USR_TOTAL_PAUSED` INTEGER default 0, `USR_TOTAL_PAUSED` INTEGER default 0,
`USR_TOTAL_COMPLETED` INTEGER default 0, `USR_TOTAL_COMPLETED` INTEGER default 0,
`USR_TOTAL_UNASSIGNED` INTEGER default 0, `USR_TOTAL_UNASSIGNED` INTEGER default 0,
`USR_COST_BY_HOUR` DECIMAL(7,2) default 0, `USR_COST_BY_HOUR` DECIMAL(7,2) default 0,
`USR_UNIT_COST` VARCHAR(50) default '', `USR_UNIT_COST` VARCHAR(50) default '',
`USR_PMDRIVE_FOLDER_UID` VARCHAR(32) DEFAULT '', `USR_PMDRIVE_FOLDER_UID` VARCHAR(32) default '',
`USR_BOOKMARK_START_CASES` MEDIUMTEXT, `USR_BOOKMARK_START_CASES` MEDIUMTEXT,
`USR_TIME_ZONE` VARCHAR(100) default '', `USR_TIME_ZONE` VARCHAR(100) default '',
`USR_DEFAULT_LANG` VARCHAR(10) default '', `USR_DEFAULT_LANG` VARCHAR(10) default '',
PRIMARY KEY (`USR_UID`) PRIMARY KEY (`USR_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Users'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Users';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -1169,9 +1168,9 @@ CREATE TABLE `APP_CACHE_VIEW`
`PRO_UID` VARCHAR(32) default '' NOT NULL, `PRO_UID` VARCHAR(32) default '' NOT NULL,
`DEL_DELEGATE_DATE` DATETIME NOT NULL, `DEL_DELEGATE_DATE` DATETIME NOT NULL,
`DEL_INIT_DATE` DATETIME, `DEL_INIT_DATE` DATETIME,
`DEL_FINISH_DATE` DATETIME, `DEL_FINISH_DATE` DATETIME,
`DEL_TASK_DUE_DATE` DATETIME, `DEL_TASK_DUE_DATE` DATETIME,
`DEL_RISK_DATE` DATETIME, `DEL_RISK_DATE` DATETIME,
`DEL_THREAD_STATUS` VARCHAR(32) default 'OPEN', `DEL_THREAD_STATUS` VARCHAR(32) default 'OPEN',
`APP_THREAD_STATUS` VARCHAR(32) default 'OPEN', `APP_THREAD_STATUS` VARCHAR(32) default 'OPEN',
`APP_TITLE` VARCHAR(255) default '' NOT NULL, `APP_TITLE` VARCHAR(255) default '' NOT NULL,
@@ -1195,6 +1194,7 @@ CREATE TABLE `APP_CACHE_VIEW`
KEY `protitle`(`APP_PRO_TITLE`), KEY `protitle`(`APP_PRO_TITLE`),
KEY `appupdatedate`(`APP_UPDATE_DATE`), KEY `appupdatedate`(`APP_UPDATE_DATE`),
KEY `tastitle`(`APP_TAS_TITLE`), KEY `tastitle`(`APP_TAS_TITLE`),
KEY `taskUid`(`TAS_UID`),
KEY `indexAppUser`(`USR_UID`, `APP_STATUS`) KEY `indexAppUser`(`USR_UID`, `APP_STATUS`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Application cache view'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Application cache view';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -1340,12 +1340,12 @@ CREATE TABLE `CASE_SCHEDULER`
`SCH_EVERY_DAYS` TINYINT default 0, `SCH_EVERY_DAYS` TINYINT default 0,
`SCH_WEEK_DAYS` CHAR(14) default '0|0|0|0|0|0|0' NOT NULL, `SCH_WEEK_DAYS` CHAR(14) default '0|0|0|0|0|0|0' NOT NULL,
`SCH_START_DAY` CHAR(6) default '' NOT NULL, `SCH_START_DAY` CHAR(6) default '' NOT NULL,
`SCH_MONTHS` CHAR(27) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL, `SCH_MONTHS` CHAR(27) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
`SCH_END_DATE` DATETIME, `SCH_END_DATE` DATETIME,
`SCH_REPEAT_EVERY` VARCHAR(15) default '' NOT NULL, `SCH_REPEAT_EVERY` VARCHAR(15) default '' NOT NULL,
`SCH_REPEAT_UNTIL` VARCHAR(15) default '' NOT NULL, `SCH_REPEAT_UNTIL` VARCHAR(15) default '' NOT NULL,
`SCH_REPEAT_STOP_IF_RUNNING` TINYINT default 0, `SCH_REPEAT_STOP_IF_RUNNING` TINYINT default 0,
`SCH_EXECUTION_DATE` DATETIME, `SCH_EXECUTION_DATE` DATETIME,
`CASE_SH_PLUGIN_UID` VARCHAR(100), `CASE_SH_PLUGIN_UID` VARCHAR(100),
PRIMARY KEY (`SCH_UID`) PRIMARY KEY (`SCH_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Conditions store to show or hide dynaform fields..'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Conditions store to show or hide dynaform fields..';
@@ -2130,7 +2130,7 @@ CREATE TABLE `PROCESS_VARIABLES`
`VAR_NULL` TINYINT(32) default 0, `VAR_NULL` TINYINT(32) default 0,
`VAR_DEFAULT` VARCHAR(32) default '', `VAR_DEFAULT` VARCHAR(32) default '',
`VAR_ACCEPTED_VALUES` MEDIUMTEXT, `VAR_ACCEPTED_VALUES` MEDIUMTEXT,
`INP_DOC_UID` VARCHAR(32) default '', `INP_DOC_UID` VARCHAR(32) default '',
PRIMARY KEY (`VAR_UID`) PRIMARY KEY (`VAR_UID`)
)ENGINE=InnoDB ; )ENGINE=InnoDB ;
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -2226,7 +2226,7 @@ CREATE TABLE `APP_ASSIGN_SELF_SERVICE_VALUE`
`DEL_INDEX` INTEGER default 0 NOT NULL, `DEL_INDEX` INTEGER default 0 NOT NULL,
`PRO_UID` VARCHAR(32) NOT NULL, `PRO_UID` VARCHAR(32) NOT NULL,
`TAS_UID` VARCHAR(32) NOT NULL, `TAS_UID` VARCHAR(32) NOT NULL,
`GRP_UID` MEDIUMTEXT default '' NOT NULL `GRP_UID` MEDIUMTEXT NOT NULL
)ENGINE=InnoDB DEFAULT CHARSET='utf8'; )ENGINE=InnoDB DEFAULT CHARSET='utf8';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- LIST_INBOX #-- LIST_INBOX
@@ -2255,7 +2255,7 @@ CREATE TABLE `LIST_INBOX`
`DEL_DELEGATE_DATE` DATETIME NOT NULL, `DEL_DELEGATE_DATE` DATETIME NOT NULL,
`DEL_INIT_DATE` DATETIME, `DEL_INIT_DATE` DATETIME,
`DEL_DUE_DATE` DATETIME, `DEL_DUE_DATE` DATETIME,
`DEL_RISK_DATE` DATETIME, `DEL_RISK_DATE` DATETIME,
`DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL, `DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL,
PRIMARY KEY (`APP_UID`,`DEL_INDEX`), PRIMARY KEY (`APP_UID`,`DEL_INDEX`),
KEY `indexInboxUser`(`USR_UID`, `DEL_DELEGATE_DATE`), KEY `indexInboxUser`(`USR_UID`, `DEL_DELEGATE_DATE`),
@@ -2304,7 +2304,7 @@ CREATE TABLE `LIST_PARTICIPATED_LAST`
( (
`APP_UID` VARCHAR(32) default '' NOT NULL, `APP_UID` VARCHAR(32) default '' NOT NULL,
`USR_UID` VARCHAR(32) default '' NOT NULL, `USR_UID` VARCHAR(32) default '' NOT NULL,
`DEL_INDEX` INTEGER default 0 NOT NULL, `DEL_INDEX` INTEGER default NOT NULL,
`TAS_UID` VARCHAR(32) default '' NOT NULL, `TAS_UID` VARCHAR(32) default '' NOT NULL,
`PRO_UID` VARCHAR(32) default '' NOT NULL, `PRO_UID` VARCHAR(32) default '' NOT NULL,
`APP_NUMBER` INTEGER default 0 NOT NULL, `APP_NUMBER` INTEGER default 0 NOT NULL,
@@ -2544,7 +2544,7 @@ CREATE TABLE `EMAIL_SERVER`
`MESS_FROM_NAME` VARCHAR(256) default '', `MESS_FROM_NAME` VARCHAR(256) default '',
`SMTPSECURE` VARCHAR(3) default 'No' NOT NULL, `SMTPSECURE` VARCHAR(3) default 'No' NOT NULL,
`MESS_TRY_SEND_INMEDIATLY` INTEGER default 0 NOT NULL, `MESS_TRY_SEND_INMEDIATLY` INTEGER default 0 NOT NULL,
`MAIL_TO` VARCHAR(256) default '' NOT NULL, `MAIL_TO` VARCHAR(256) default '',
`MESS_DEFAULT` INTEGER default 0 NOT NULL, `MESS_DEFAULT` INTEGER default 0 NOT NULL,
PRIMARY KEY (`MESS_UID`) PRIMARY KEY (`MESS_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8'; )ENGINE=InnoDB DEFAULT CHARSET='utf8';
@@ -2636,7 +2636,7 @@ CREATE TABLE `ELEMENT_TASK_RELATION`
`ELEMENT_UID` VARCHAR(32) NOT NULL, `ELEMENT_UID` VARCHAR(32) NOT NULL,
`ELEMENT_TYPE` VARCHAR(50) default '' NOT NULL, `ELEMENT_TYPE` VARCHAR(50) default '' NOT NULL,
`TAS_UID` VARCHAR(32) NOT NULL, `TAS_UID` VARCHAR(32) NOT NULL,
`ELEMENT_UID_DEST` VARCHAR(32) default '' NOT NULL, `ELEMENT_UID_DEST` VARCHAR(32) default '',
PRIMARY KEY (`ETR_UID`) PRIMARY KEY (`ETR_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8'; )ENGINE=InnoDB DEFAULT CHARSET='utf8';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -2660,9 +2660,9 @@ CREATE TABLE `ABE_CONFIGURATION`
`ABE_CASE_NOTE_IN_RESPONSE` INTEGER default 0, `ABE_CASE_NOTE_IN_RESPONSE` INTEGER default 0,
`ABE_CREATE_DATE` DATETIME NOT NULL, `ABE_CREATE_DATE` DATETIME NOT NULL,
`ABE_UPDATE_DATE` DATETIME, `ABE_UPDATE_DATE` DATETIME,
`ABE_SUBJECT_FIELD` VARCHAR(100) default '' NOT NULL, `ABE_SUBJECT_FIELD` VARCHAR(100) default '',
`ABE_MAILSERVER_OR_MAILCURRENT` INTEGER default 0 NOT NULL, `ABE_MAILSERVER_OR_MAILCURRENT` INTEGER default 0,
`ABE_CUSTOM_GRID` TEXT, `ABE_CUSTOM_GRID` MEDIUMTEXT,
PRIMARY KEY (`ABE_UID`) PRIMARY KEY (`ABE_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='The plugin table for actionsByEmail'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='The plugin table for actionsByEmail';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -2704,10 +2704,6 @@ CREATE TABLE `ABE_RESPONSES`
`ABE_RES_MESSAGE` VARCHAR(255) default '', `ABE_RES_MESSAGE` VARCHAR(255) default '',
PRIMARY KEY (`ABE_RES_UID`) PRIMARY KEY (`ABE_RES_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='The plugin table for actionsByEmail'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='The plugin table for actionsByEmail';
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- USR_REPORTING #-- USR_REPORTING
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -2717,25 +2713,25 @@ DROP TABLE IF EXISTS `USR_REPORTING`;
CREATE TABLE `USR_REPORTING` CREATE TABLE `USR_REPORTING`
( (
`USR_UID` VARCHAR(32) NOT NULL, `USR_UID` VARCHAR(32) NOT NULL,
`TAS_UID` VARCHAR(32) NOT NULL, `TAS_UID` VARCHAR(32) NOT NULL,
`PRO_UID` VARCHAR(32) NOT NULL, `PRO_UID` VARCHAR(32) NOT NULL,
`MONTH` INTEGER default 0 NOT NULL, `MONTH` INTEGER default 0 NOT NULL,
`YEAR` INTEGER default 0 NOT NULL, `YEAR` INTEGER default 0 NOT NULL,
`TOTAL_QUEUE_TIME_BY_TASK` DECIMAL(7,2) default 0, `TOTAL_QUEUE_TIME_BY_TASK` DECIMAL(7,2) default 0,
`TOTAL_TIME_BY_TASK` DECIMAL(7,2) default 0, `TOTAL_TIME_BY_TASK` DECIMAL(7,2) default 0,
`TOTAL_CASES_IN` DECIMAL(7,2) default 0, `TOTAL_CASES_IN` DECIMAL(7,2) default 0,
`TOTAL_CASES_OUT` DECIMAL(7,2) default 0, `TOTAL_CASES_OUT` DECIMAL(7,2) default 0,
`USER_HOUR_COST` DECIMAL(7,2) default 0, `USER_HOUR_COST` DECIMAL(7,2) default 0,
`AVG_TIME` DECIMAL(7,2) default 0, `AVG_TIME` DECIMAL(7,2) default 0,
`SDV_TIME` DECIMAL(7,2) default 0, `SDV_TIME` DECIMAL(7,2) default 0,
`CONFIGURED_TASK_TIME` DECIMAL(7,2) default 0, `CONFIGURED_TASK_TIME` DECIMAL(7,2) default 0,
`TOTAL_CASES_OVERDUE` DECIMAL(7,2) default 0, `TOTAL_CASES_OVERDUE` DECIMAL(7,2) default 0,
`TOTAL_CASES_ON_TIME` DECIMAL(7,2) default 0, `TOTAL_CASES_ON_TIME` DECIMAL(7,2) default 0,
`PRO_COST` DECIMAL(7,2) default 0, `PRO_COST` DECIMAL(7,2) default 0,
`PRO_UNIT_COST` VARCHAR(50) default '', `PRO_UNIT_COST` VARCHAR(50) default '',
PRIMARY KEY (`USR_UID`, `TAS_UID`,`MONTH`,`YEAR`), PRIMARY KEY (`USR_UID`,`TAS_UID`,`MONTH`,`YEAR`),
KEY `indexReporting`(`USR_UID`, `TAS_UID`, `PRO_UID`) KEY `indexReporting`(`USR_UID`, `TAS_UID`, `PRO_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Data calculated users by task'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Data calculated users by task';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- PRO_REPORTING #-- PRO_REPORTING
@@ -2746,21 +2742,21 @@ DROP TABLE IF EXISTS `PRO_REPORTING`;
CREATE TABLE `PRO_REPORTING` CREATE TABLE `PRO_REPORTING`
( (
`PRO_UID` VARCHAR(32) NOT NULL, `PRO_UID` VARCHAR(32) NOT NULL,
`MONTH` INTEGER default 0 NOT NULL, `MONTH` INTEGER default 0 NOT NULL,
`YEAR` INTEGER default 0 NOT NULL, `YEAR` INTEGER default 0 NOT NULL,
`AVG_TIME` DECIMAL(7,2) default 0, `AVG_TIME` DECIMAL(7,2) default 0,
`SDV_TIME` DECIMAL(7,2) default 0, `SDV_TIME` DECIMAL(7,2) default 0,
`TOTAL_CASES_IN` DECIMAL(7,2) default 0, `TOTAL_CASES_IN` DECIMAL(7,2) default 0,
`TOTAL_CASES_OUT` DECIMAL(7,2) default 0, `TOTAL_CASES_OUT` DECIMAL(7,2) default 0,
`CONFIGURED_PROCESS_TIME` DECIMAL(7,2) default 0, `CONFIGURED_PROCESS_TIME` DECIMAL(7,2) default 0,
`CONFIGURED_PROCESS_COST` DECIMAL(7,2) default 0, `CONFIGURED_PROCESS_COST` DECIMAL(7,2) default 0,
`TOTAL_CASES_OPEN` DECIMAL(7,2) default 0, `TOTAL_CASES_OPEN` DECIMAL(7,2) default 0,
`TOTAL_CASES_OVERDUE` DECIMAL(7,2) default 0, `TOTAL_CASES_OVERDUE` DECIMAL(7,2) default 0,
`TOTAL_CASES_ON_TIME` DECIMAL(7,2) default 0, `TOTAL_CASES_ON_TIME` DECIMAL(7,2) default 0,
`PRO_COST` DECIMAL(7,2) default 0, `PRO_COST` DECIMAL(7,2) default 0,
`PRO_UNIT_COST` VARCHAR(50) default '', `PRO_UNIT_COST` VARCHAR(50) default '',
PRIMARY KEY (`PRO_UID`,`MONTH`,`YEAR`) PRIMARY KEY (`PRO_UID`,`MONTH`,`YEAR`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Data calculated by process'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Data calculated by process';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- DASHBOARD #-- DASHBOARD
@@ -2771,14 +2767,14 @@ DROP TABLE IF EXISTS `DASHBOARD`;
CREATE TABLE `DASHBOARD` CREATE TABLE `DASHBOARD`
( (
`DAS_UID` VARCHAR(32) default '' NOT NULL, `DAS_UID` VARCHAR(32) default '' NOT NULL,
`DAS_TITLE` VARCHAR(255) default '' NOT NULL, `DAS_TITLE` VARCHAR(255) default '' NOT NULL,
`DAS_DESCRIPTION` MEDIUMTEXT, `DAS_DESCRIPTION` MEDIUMTEXT,
`DAS_CREATE_DATE` DATETIME NOT NULL, `DAS_CREATE_DATE` DATETIME NOT NULL,
`DAS_UPDATE_DATE` DATETIME, `DAS_UPDATE_DATE` DATETIME,
`DAS_STATUS` TINYINT default 1 NOT NULL, `DAS_STATUS` TINYINT default 1 NOT NULL,
PRIMARY KEY (`DAS_UID`) PRIMARY KEY (`DAS_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Dashboard definitions'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Dashboard definitions.';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- DASHBOARD_INDICATOR #-- DASHBOARD_INDICATOR
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -2788,25 +2784,25 @@ DROP TABLE IF EXISTS `DASHBOARD_INDICATOR`;
CREATE TABLE `DASHBOARD_INDICATOR` CREATE TABLE `DASHBOARD_INDICATOR`
( (
`DAS_IND_UID` VARCHAR(32) default '' NOT NULL, `DAS_IND_UID` VARCHAR(32) default '' NOT NULL,
`DAS_UID` VARCHAR(32) default '' NOT NULL, `DAS_UID` VARCHAR(32) default '' NOT NULL,
`DAS_IND_TYPE` VARCHAR(32) default '' NOT NULL, `DAS_IND_TYPE` VARCHAR(32) default '' NOT NULL,
`DAS_IND_TITLE` VARCHAR(255) default '' NOT NULL, `DAS_IND_TITLE` VARCHAR(255) default '' NOT NULL,
`DAS_IND_GOAL` DECIMAL(7,2) default 0, `DAS_IND_GOAL` DECIMAL(7,2) default 0,
`DAS_IND_DIRECTION` TINYINT default 2 NOT NULL, `DAS_IND_DIRECTION` TINYINT default 2 NOT NULL,
`DAS_UID_PROCESS` VARCHAR(32) default '' NOT NULL, `DAS_UID_PROCESS` VARCHAR(32) default '' NOT NULL,
`DAS_IND_FIRST_FIGURE` VARCHAR(32) default '', `DAS_IND_FIRST_FIGURE` VARCHAR(32) default '',
`DAS_IND_FIRST_FREQUENCY` VARCHAR(32) default '', `DAS_IND_FIRST_FREQUENCY` VARCHAR(32) default '',
`DAS_IND_SECOND_FIGURE` VARCHAR(32) default '', `DAS_IND_SECOND_FIGURE` VARCHAR(32) default '',
`DAS_IND_SECOND_FREQUENCY` VARCHAR(32) default '', `DAS_IND_SECOND_FREQUENCY` VARCHAR(32) default '',
`DAS_IND_CREATE_DATE` DATETIME NOT NULL, `DAS_IND_CREATE_DATE` DATETIME NOT NULL,
`DAS_IND_UPDATE_DATE` DATETIME, `DAS_IND_UPDATE_DATE` DATETIME,
`DAS_IND_STATUS` TINYINT default 1 NOT NULL, `DAS_IND_STATUS` TINYINT default 1 NOT NULL,
PRIMARY KEY (`DAS_IND_UID`), PRIMARY KEY (`DAS_IND_UID`),
KEY `indexDashboard`(`DAS_UID`, `DAS_IND_TYPE`), KEY `indexDashboard`(`DAS_UID`, `DAS_IND_TYPE`),
CONSTRAINT `fk_dashboard_indicator_dashboard` CONSTRAINT `fk_dashboard_indicator_dashboard`
FOREIGN KEY (`DAS_UID`) FOREIGN KEY (`DAS_UID`)
REFERENCES `DASHBOARD` (`DAS_UID`) REFERENCES `DASHBOARD` (`DAS_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Dashboard Indicators definitions.'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Dashboard Indicators definitions.';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- DASHBOARD_DAS_IND #-- DASHBOARD_DAS_IND
@@ -2817,13 +2813,13 @@ DROP TABLE IF EXISTS `DASHBOARD_DAS_IND`;
CREATE TABLE `DASHBOARD_DAS_IND` CREATE TABLE `DASHBOARD_DAS_IND`
( (
`DAS_UID` VARCHAR(32) default '' NOT NULL, `DAS_UID` VARCHAR(32) default '' NOT NULL,
`OWNER_UID` VARCHAR(32) default '' NOT NULL, `OWNER_UID` VARCHAR(32) default '' NOT NULL,
`OWNER_TYPE` VARCHAR(15) default '' NOT NULL, `OWNER_TYPE` VARCHAR(15) default '' NOT NULL,
PRIMARY KEY (`DAS_UID`,`OWNER_UID`), PRIMARY KEY (`DAS_UID`,`OWNER_UID`),
CONSTRAINT `fk_dashboard_indicator_dashboard_das_ind` CONSTRAINT `fk_dashboard_indicator_dashboard_das_ind`
FOREIGN KEY (`DAS_UID`) FOREIGN KEY (`DAS_UID`)
REFERENCES `DASHBOARD` (`DAS_UID`) REFERENCES `DASHBOARD` (`DAS_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Dashboard definitions to user.'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Dashboard definitions to user.';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- CATALOG #-- CATALOG
@@ -2834,65 +2830,64 @@ DROP TABLE IF EXISTS `CATALOG`;
CREATE TABLE `CATALOG` CREATE TABLE `CATALOG`
( (
`CAT_UID` VARCHAR(32) default '' NOT NULL, `CAT_UID` VARCHAR(32) default '' NOT NULL,
`CAT_LABEL_ID` VARCHAR(100) default '' NOT NULL, `CAT_LABEL_ID` VARCHAR(100) default '' NOT NULL,
`CAT_TYPE` VARCHAR(100) default '' NOT NULL, `CAT_TYPE` VARCHAR(100) default '' NOT NULL,
`CAT_FLAG` VARCHAR(50) default '', `CAT_FLAG` VARCHAR(50) default '',
`CAT_OBSERVATION` MEDIUMTEXT, `CAT_OBSERVATION` MEDIUMTEXT,
`CAT_CREATE_DATE` DATETIME NOT NULL, `CAT_CREATE_DATE` DATETIME NOT NULL,
`CAT_UPDATE_DATE` DATETIME, `CAT_UPDATE_DATE` DATETIME,
PRIMARY KEY (`CAT_UID`, `CAT_TYPE`), PRIMARY KEY (`CAT_UID`,`CAT_TYPE`),
KEY `indexType`( `CAT_TYPE`) KEY `indexType`(`CAT_TYPE`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Definitions catalog.'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Definitions catalog.';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- TABLE: SCRIPT_TASK #-- SCRIPT_TASK
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
DROP TABLE IF EXISTS SCRIPT_TASK; DROP TABLE IF EXISTS `SCRIPT_TASK`;
CREATE TABLE SCRIPT_TASK
CREATE TABLE `SCRIPT_TASK`
( (
SCRTAS_UID VARCHAR(32) NOT NULL, `SCRTAS_UID` VARCHAR(32) default '' NOT NULL,
PRJ_UID VARCHAR(32) NOT NULL, `PRJ_UID` VARCHAR(32) default '' NOT NULL,
ACT_UID VARCHAR(32) NOT NULL, `ACT_UID` VARCHAR(32) default '' NOT NULL,
SCRTAS_OBJ_TYPE VARCHAR(10) default 'TRIGGER' NOT NULL, `SCRTAS_OBJ_TYPE` VARCHAR(10) default 'TRIGGER' NOT NULL,
SCRTAS_OBJ_UID VARCHAR(32) NOT NULL, `SCRTAS_OBJ_UID` VARCHAR(32) default '' NOT NULL,
PRIMARY KEY (`SCRTAS_UID`)
PRIMARY KEY (SCRTAS_UID) )ENGINE=InnoDB DEFAULT CHARSET='utf8';
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- TIMER_EVENT #-- TIMER_EVENT
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
DROP TABLE IF EXISTS TIMER_EVENT; DROP TABLE IF EXISTS `TIMER_EVENT`;
CREATE TABLE TIMER_EVENT
CREATE TABLE `TIMER_EVENT`
( (
TMREVN_UID VARCHAR(32) NOT NULL, `TMREVN_UID` VARCHAR(32) NOT NULL,
PRJ_UID VARCHAR(32) NOT NULL, `PRJ_UID` VARCHAR(32) NOT NULL,
EVN_UID VARCHAR(32) NOT NULL, `EVN_UID` VARCHAR(32) NOT NULL,
TMREVN_OPTION VARCHAR(50) default 'DAILY' NOT NULL, `TMREVN_OPTION` VARCHAR(50) default 'DAILY' NOT NULL,
TMREVN_START_DATE DATE, `TMREVN_START_DATE` DATE,
TMREVN_END_DATE DATE, `TMREVN_END_DATE` DATE,
TMREVN_DAY VARCHAR(5) default '' NOT NULL, `TMREVN_DAY` VARCHAR(5) default '' NOT NULL,
TMREVN_HOUR VARCHAR(5) default '' NOT NULL, `TMREVN_HOUR` VARCHAR(5) default '' NOT NULL,
TMREVN_MINUTE VARCHAR(5) default '' NOT NULL, `TMREVN_MINUTE` VARCHAR(5) default '' NOT NULL,
TMREVN_CONFIGURATION_DATA MEDIUMTEXT default '' NOT NULL, `TMREVN_CONFIGURATION_DATA` MEDIUMTEXT NOT NULL,
TMREVN_NEXT_RUN_DATE DATETIME, `TMREVN_NEXT_RUN_DATE` DATETIME,
TMREVN_LAST_RUN_DATE DATETIME, `TMREVN_LAST_RUN_DATE` DATETIME,
TMREVN_LAST_EXECUTION_DATE DATETIME, `TMREVN_LAST_EXECUTION_DATE` DATETIME,
TMREVN_STATUS VARCHAR(25) default 'ACTIVE' NOT NULL, `TMREVN_STATUS` VARCHAR(25) default 'ACTIVE' NOT NULL,
PRIMARY KEY (`TMREVN_UID`)
PRIMARY KEY (TMREVN_UID) )ENGINE=InnoDB DEFAULT CHARSET='utf8';
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- EMAIL_EVENT #-- EMAIL_EVENT
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `EMAIL_EVENT`; DROP TABLE IF EXISTS `EMAIL_EVENT`;
CREATE TABLE `EMAIL_EVENT` CREATE TABLE `EMAIL_EVENT`
( (
`EMAIL_EVENT_UID` VARCHAR(32) NOT NULL, `EMAIL_EVENT_UID` VARCHAR(32) NOT NULL,
@@ -2900,31 +2895,28 @@ CREATE TABLE `EMAIL_EVENT`
`EVN_UID` VARCHAR(32) NOT NULL, `EVN_UID` VARCHAR(32) NOT NULL,
`EMAIL_EVENT_FROM` VARCHAR(100) default '' NOT NULL, `EMAIL_EVENT_FROM` VARCHAR(100) default '' NOT NULL,
`EMAIL_EVENT_TO` MEDIUMTEXT NOT NULL, `EMAIL_EVENT_TO` MEDIUMTEXT NOT NULL,
`EMAIL_EVENT_SUBJECT` VARCHAR(150) default '' NOT NULL, `EMAIL_EVENT_SUBJECT` VARCHAR(150) default '',
`PRF_UID` VARCHAR(32) default '' NOT NULL, `PRF_UID` VARCHAR(32) default '',
PRIMARY KEY (`EMAIL_EVENT_UID`) PRIMARY KEY (`EMAIL_EVENT_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8'; )ENGINE=InnoDB DEFAULT CHARSET='utf8';
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- NOTIFICATION_DEVICE #-- NOTIFICATION_DEVICE
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `NOTIFICATION_DEVICE`; DROP TABLE IF EXISTS `NOTIFICATION_DEVICE`;
CREATE TABLE `NOTIFICATION_DEVICE` CREATE TABLE `NOTIFICATION_DEVICE`
( (
`DEV_UID` VARCHAR(32) default '' NOT NULL, `DEV_UID` VARCHAR(32) default '' NOT NULL,
`USR_UID` VARCHAR(32) default '' NOT NULL, `USR_UID` VARCHAR(32) default '' NOT NULL,
`SYS_LANG` VARCHAR(10) default '', `SYS_LANG` VARCHAR(10) default '',
`DEV_REG_ID` VARCHAR(150) default '' NOT NULL, `DEV_REG_ID` VARCHAR(150) default '' NOT NULL,
`DEV_TYPE` VARCHAR(50) default '', `DEV_TYPE` VARCHAR(50) default '' NOT NULL,
`DEV_CREATE` DATETIME NOT NULL, `DEV_CREATE` DATETIME NOT NULL,
`DEV_UPDATE` DATETIME NOT NULL, `DEV_UPDATE` DATETIME NOT NULL,
PRIMARY KEY (`DEV_UID`, `USR_UID`), PRIMARY KEY (`DEV_UID`,`USR_UID`),
KEY `indexUserNotification`(`USR_UID`) KEY `indexUserNotification`(`USR_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Definitions Notification device.'; )ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Definitions Notification device.';
# This restores the fkey checks, after having unset them earlier # This restores the fkey checks, after having unset them earlier
# SET FOREIGN_KEY_CHECKS = 1; SET FOREIGN_KEY_CHECKS = 1;