excluding files from pull request part 3
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -15,80 +15,126 @@ include_once 'classes/model/AddonsManager.php';
|
|||||||
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
|
||||||
*
|
*
|
||||||
@@ -96,10 +142,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)
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -109,22 +155,24 @@ 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.
|
||||||
*
|
*
|
||||||
@@ -133,12 +181,12 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* 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();
|
||||||
}
|
}
|
||||||
@@ -146,6 +194,7 @@ abstract class BaseAddonsManagerPeer
|
|||||||
}
|
}
|
||||||
return self::$phpNameMap;
|
return self::$phpNameMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translates a fieldname to another type
|
* Translates a fieldname to another type
|
||||||
*
|
*
|
||||||
@@ -155,12 +204,12 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* @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];
|
||||||
}
|
}
|
||||||
@@ -174,10 +223,10 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* @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];
|
||||||
}
|
}
|
||||||
@@ -190,13 +239,14 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* $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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -210,44 +260,44 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* @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 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,32 +312,33 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* @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.
|
||||||
*
|
*
|
||||||
@@ -297,16 +348,17 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* @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.
|
||||||
*
|
*
|
||||||
@@ -316,10 +368,11 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* @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.
|
||||||
@@ -334,24 +387,25 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* @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.
|
||||||
@@ -359,33 +413,35 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* @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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -397,7 +453,7 @@ abstract class BaseAddonsManagerPeer
|
|||||||
*
|
*
|
||||||
* @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;
|
||||||
}
|
}
|
||||||
@@ -411,10 +467,10 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* @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) {
|
||||||
@@ -423,15 +479,14 @@ 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();
|
||||||
@@ -444,38 +499,39 @@ 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 create the UPDATE statement.
|
* @param mixed $values Criteria or AddonsManager object containing data that is used to create the UPDATE statement.
|
||||||
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
|
* @param Connection $con The connection to use (specify Connection object to 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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -483,17 +539,17 @@ abstract class BaseAddonsManagerPeer
|
|||||||
*
|
*
|
||||||
* @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) {
|
||||||
@@ -508,46 +564,44 @@ abstract class BaseAddonsManagerPeer
|
|||||||
* @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).
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
* This includes CASCADE-related rows
|
|
||||||
* if supported by native driver or if emulated using Propel.
|
* if supported by native driver or if emulated using Propel.
|
||||||
* @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 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);
|
$values = array (
|
||||||
|
$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::ADDON_ID, $vals[0], Criteria::IN);
|
$criteria->add( AddonsManagerPeer::STORE_ID, $vals[1], 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
|
||||||
|
|
||||||
@@ -556,7 +610,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) {
|
||||||
@@ -577,21 +631,23 @@ abstract class BaseAddonsManagerPeer
|
|||||||
*
|
*
|
||||||
* @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);
|
$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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -599,31 +655,32 @@ 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
|
||||||
@@ -631,12 +688,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' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ 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';
|
||||||
@@ -23,36 +22,42 @@ 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;
|
||||||
@@ -60,6 +65,7 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
/**
|
/**
|
||||||
* 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;
|
||||||
@@ -67,6 +73,7 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
/**
|
/**
|
||||||
* 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;
|
||||||
@@ -76,9 +83,8 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getStoreId()
|
public function getStoreId ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->store_id;
|
return $this->store_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,9 +93,8 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getStoreVersion()
|
public function getStoreVersion ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->store_version;
|
return $this->store_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,9 +103,8 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getStoreLocation()
|
public function getStoreLocation ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->store_location;
|
return $this->store_location;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,9 +113,8 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getStoreType()
|
public function getStoreType ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->store_type;
|
return $this->store_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,27 +126,26 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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) {
|
||||||
throw new PropelException("Unable to parse value of [store_last_updated] as date/time value: " .
|
// in PHP 5.1 return value changes to FALSE
|
||||||
var_export($this->store_last_updated, true));
|
throw new PropelException( "Unable to parse value of [store_last_updated] as date/time value: " . 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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,12 +155,11 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +167,6 @@ 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()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -175,20 +175,17 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -197,20 +194,17 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -219,20 +213,17 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -241,18 +232,13 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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 )) {
|
||||||
if ($v !== null && !is_int($v)) {
|
$ts = strtotime( $v );
|
||||||
$ts = strtotime($v);
|
if ($ts === - 1 || $ts === false) {
|
||||||
//Date/time accepts null values
|
// in PHP 5.1 return value changes to FALSE
|
||||||
if ($v == '') {
|
throw new PropelException( "Unable to parse date/time value for [store_last_updated] from input: " . var_export( $v, true ) );
|
||||||
$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;
|
||||||
@@ -261,7 +247,6 @@ 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()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -277,29 +262,29 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,20 +297,18 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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();
|
||||||
@@ -334,28 +317,27 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores the object in the database. If the object is new,
|
* Stores the object in the database.
|
||||||
|
* 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
|
* @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
|
||||||
* @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) {
|
||||||
@@ -371,32 +353,28 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* 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
|
* @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
|
||||||
* @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;
|
||||||
@@ -404,9 +382,10 @@ 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().
|
||||||
@@ -415,7 +394,7 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @return array ValidationFailed[]
|
* @return array ValidationFailed[]
|
||||||
* @see validate()
|
* @see validate()
|
||||||
*/
|
*/
|
||||||
public function getValidationFailures()
|
public function getValidationFailures ()
|
||||||
{
|
{
|
||||||
return $this->validationFailures;
|
return $this->validationFailures;
|
||||||
}
|
}
|
||||||
@@ -431,11 +410,11 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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;
|
||||||
@@ -451,28 +430,20 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* 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;
|
* @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
|
||||||
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 ();
|
||||||
$failureMap = array();
|
if (($retval = AddonsStorePeer::doValidate( $this, $columns )) !== true) {
|
||||||
|
$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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -484,10 +455,10 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* 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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -497,9 +468,9 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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;
|
||||||
@@ -531,15 +502,15 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* 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;
|
||||||
}
|
}
|
||||||
@@ -554,10 +525,10 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* 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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -568,23 +539,23 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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()
|
||||||
}
|
}
|
||||||
@@ -605,30 +576,25 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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 )) {
|
||||||
if (array_key_exists($keys[1], $arr)) {
|
$this->setStoreVersion( $arr[$keys[1]] );
|
||||||
$this->setStoreVersion($arr[$keys[1]]);
|
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[2], $arr )) {
|
||||||
if (array_key_exists($keys[2], $arr)) {
|
$this->setStoreLocation( $arr[$keys[2]] );
|
||||||
$this->setStoreLocation($arr[$keys[2]]);
|
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[3], $arr )) {
|
||||||
if (array_key_exists($keys[3], $arr)) {
|
$this->setStoreType( $arr[$keys[3]] );
|
||||||
$this->setStoreType($arr[$keys[3]]);
|
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[4], $arr )) {
|
||||||
if (array_key_exists($keys[4], $arr)) {
|
$this->setStoreLastUpdated( $arr[$keys[4]] );
|
||||||
$this->setStoreLastUpdated($arr[$keys[4]]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -636,31 +602,25 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @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 )) {
|
||||||
if ($this->isColumnModified(AddonsStorePeer::STORE_VERSION)) {
|
$criteria->add( AddonsStorePeer::STORE_VERSION, $this->store_version );
|
||||||
$criteria->add(AddonsStorePeer::STORE_VERSION, $this->store_version);
|
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( AddonsStorePeer::STORE_LOCATION )) {
|
||||||
if ($this->isColumnModified(AddonsStorePeer::STORE_LOCATION)) {
|
$criteria->add( AddonsStorePeer::STORE_LOCATION, $this->store_location );
|
||||||
$criteria->add(AddonsStorePeer::STORE_LOCATION, $this->store_location);
|
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( AddonsStorePeer::STORE_TYPE )) {
|
||||||
if ($this->isColumnModified(AddonsStorePeer::STORE_TYPE)) {
|
$criteria->add( AddonsStorePeer::STORE_TYPE, $this->store_type );
|
||||||
$criteria->add(AddonsStorePeer::STORE_TYPE, $this->store_type);
|
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( AddonsStorePeer::STORE_LAST_UPDATED )) {
|
||||||
if ($this->isColumnModified(AddonsStorePeer::STORE_LAST_UPDATED)) {
|
$criteria->add( AddonsStorePeer::STORE_LAST_UPDATED, $this->store_last_updated );
|
||||||
$criteria->add(AddonsStorePeer::STORE_LAST_UPDATED, $this->store_last_updated);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -672,20 +632,21 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @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();
|
||||||
}
|
}
|
||||||
@@ -696,9 +657,9 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -711,22 +672,19 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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->setStoreVersion($this->store_version);
|
$copyObj->setStoreLocation( $this->store_location );
|
||||||
|
|
||||||
$copyObj->setStoreLocation($this->store_location);
|
$copyObj->setStoreType( $this->store_type );
|
||||||
|
|
||||||
$copyObj->setStoreType($this->store_type);
|
$copyObj->setStoreLastUpdated( $this->store_last_updated );
|
||||||
|
|
||||||
$copyObj->setStoreLastUpdated($this->store_last_updated);
|
$copyObj->setNew( true );
|
||||||
|
|
||||||
|
|
||||||
$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
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -741,12 +699,12 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
* @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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -759,7 +717,7 @@ abstract class BaseAddonsStore extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @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();
|
||||||
|
|||||||
@@ -15,41 +15,61 @@ include_once 'classes/model/AddonsStore.php';
|
|||||||
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
|
||||||
*
|
*
|
||||||
@@ -57,10 +77,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)
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -70,22 +90,24 @@ 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.
|
||||||
*
|
*
|
||||||
@@ -94,12 +116,12 @@ abstract class BaseAddonsStorePeer
|
|||||||
* 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();
|
||||||
}
|
}
|
||||||
@@ -107,6 +129,7 @@ abstract class BaseAddonsStorePeer
|
|||||||
}
|
}
|
||||||
return self::$phpNameMap;
|
return self::$phpNameMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translates a fieldname to another type
|
* Translates a fieldname to another type
|
||||||
*
|
*
|
||||||
@@ -116,12 +139,12 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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];
|
||||||
}
|
}
|
||||||
@@ -135,10 +158,10 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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];
|
||||||
}
|
}
|
||||||
@@ -151,13 +174,14 @@ abstract class BaseAddonsStorePeer
|
|||||||
* $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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,18 +195,18 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,32 +221,33 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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.
|
||||||
*
|
*
|
||||||
@@ -232,16 +257,17 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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.
|
||||||
*
|
*
|
||||||
@@ -251,10 +277,11 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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.
|
||||||
@@ -269,24 +296,25 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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.
|
||||||
@@ -294,33 +322,35 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -332,7 +362,7 @@ abstract class BaseAddonsStorePeer
|
|||||||
*
|
*
|
||||||
* @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;
|
||||||
}
|
}
|
||||||
@@ -346,10 +376,10 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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) {
|
||||||
@@ -358,15 +388,14 @@ 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();
|
||||||
@@ -379,35 +408,33 @@ 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 create the UPDATE statement.
|
* @param mixed $values Criteria or AddonsStore object containing data that is used to create the UPDATE statement.
|
||||||
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
|
* @param Connection $con The connection to use (specify Connection object to 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 );
|
||||||
$comparison = $criteria->getComparison(AddonsStorePeer::STORE_ID);
|
$selectCriteria->add( AddonsStorePeer::STORE_ID, $criteria->remove( AddonsStorePeer::STORE_ID ), $comparison );
|
||||||
$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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -415,17 +442,17 @@ abstract class BaseAddonsStorePeer
|
|||||||
*
|
*
|
||||||
* @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) {
|
||||||
@@ -440,31 +467,28 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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).
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
* This includes CASCADE-related rows
|
|
||||||
* if supported by native driver or if emulated using Propel.
|
* if supported by native driver or if emulated using Propel.
|
||||||
* @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 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
|
||||||
|
|
||||||
@@ -472,8 +496,7 @@ 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) {
|
||||||
@@ -494,29 +517,26 @@ abstract class BaseAddonsStorePeer
|
|||||||
*
|
*
|
||||||
* @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 )) {
|
||||||
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
return BasePeer::doValidate( AddonsStorePeer::DATABASE_NAME, AddonsStorePeer::TABLE_NAME, $columns );
|
||||||
return BasePeer::doValidate(AddonsStorePeer::DATABASE_NAME, AddonsStorePeer::TABLE_NAME, $columns);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -526,20 +546,19 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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 );
|
||||||
|
|
||||||
$v = AddonsStorePeer::doSelect($criteria, $con);
|
return ! empty( $v ) > 0 ? $v[0] : null;
|
||||||
|
|
||||||
return !empty($v) > 0 ? $v[0] : null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -550,25 +569,24 @@ abstract class BaseAddonsStorePeer
|
|||||||
* @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
|
||||||
@@ -576,12 +594,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' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ 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/LicenseManagerPeer.php';
|
include_once 'classes/model/LicenseManagerPeer.php';
|
||||||
@@ -13,8 +12,7 @@ include_once 'classes/model/LicenseManagerPeer.php';
|
|||||||
* Base class that represents a row from the 'LICENSE_MANAGER' table.
|
* Base class that represents a row from the 'LICENSE_MANAGER' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
* @package classes.model.om
|
||||||
* @package workflow.classes.model.om
|
|
||||||
*/
|
*/
|
||||||
abstract class BaseLicenseManager extends BaseObject implements Persistent
|
abstract class BaseLicenseManager extends BaseObject implements Persistent
|
||||||
{
|
{
|
||||||
@@ -23,66 +21,77 @@ abstract class BaseLicenseManager 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 LicenseManagerPeer
|
* @var LicenseManagerPeer
|
||||||
*/
|
*/
|
||||||
protected static $peer;
|
protected static $peer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the license_uid field.
|
* The value for the license_uid field.
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $license_uid;
|
protected $license_uid = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the license_user field.
|
* The value for the license_user field.
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $license_user = '0';
|
protected $license_user = '0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the license_start field.
|
* The value for the license_start field.
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $license_start = 0;
|
protected $license_start = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the license_end field.
|
* The value for the license_end field.
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $license_end = 0;
|
protected $license_end = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the license_span field.
|
* The value for the license_span field.
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected $license_span = 0;
|
protected $license_span = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the license_status field.
|
* The value for the license_status field.
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $license_status = '';
|
protected $license_status = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the license_data field.
|
* The value for the license_data field.
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $license_data;
|
protected $license_data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the license_path field.
|
* The value for the license_path field.
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $license_path = '0';
|
protected $license_path = '0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the license_workspace field.
|
* The value for the license_workspace field.
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $license_workspace = '0';
|
protected $license_workspace = '0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the license_type field.
|
* The value for the license_type field.
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $license_type = '0';
|
protected $license_type = '0';
|
||||||
@@ -90,6 +99,7 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
/**
|
/**
|
||||||
* 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;
|
||||||
@@ -97,6 +107,7 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
/**
|
/**
|
||||||
* 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;
|
||||||
@@ -106,9 +117,8 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLicenseUid()
|
public function getLicenseUid ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->license_uid;
|
return $this->license_uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,9 +127,8 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLicenseUser()
|
public function getLicenseUser ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->license_user;
|
return $this->license_user;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,9 +137,8 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getLicenseStart()
|
public function getLicenseStart ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->license_start;
|
return $this->license_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,9 +147,8 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getLicenseEnd()
|
public function getLicenseEnd ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->license_end;
|
return $this->license_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,9 +157,8 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getLicenseSpan()
|
public function getLicenseSpan ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->license_span;
|
return $this->license_span;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,9 +167,8 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLicenseStatus()
|
public function getLicenseStatus ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->license_status;
|
return $this->license_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,9 +177,8 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLicenseData()
|
public function getLicenseData ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->license_data;
|
return $this->license_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,9 +187,8 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLicensePath()
|
public function getLicensePath ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->license_path;
|
return $this->license_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,9 +197,8 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLicenseWorkspace()
|
public function getLicenseWorkspace ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->license_workspace;
|
return $this->license_workspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,9 +207,8 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLicenseType()
|
public function getLicenseType ()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->license_type;
|
return $this->license_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,20 +218,18 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLicenseUid($v)
|
public function setLicenseUid ($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->license_uid !== $v) {
|
if ($this->license_uid !== $v || $v === '') {
|
||||||
$this->license_uid = $v;
|
$this->license_uid = $v;
|
||||||
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_UID;
|
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_UID;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setLicenseUid()
|
} // setLicenseUid()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -239,12 +238,11 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLicenseUser($v)
|
public function setLicenseUser ($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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +250,6 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
$this->license_user = $v;
|
$this->license_user = $v;
|
||||||
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_USER;
|
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_USER;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setLicenseUser()
|
} // setLicenseUser()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -261,20 +258,17 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @param int $v new value
|
* @param int $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLicenseStart($v)
|
public function setLicenseStart ($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->license_start !== $v || $v === 0) {
|
if ($this->license_start !== $v || $v === 0) {
|
||||||
$this->license_start = $v;
|
$this->license_start = $v;
|
||||||
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_START;
|
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_START;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setLicenseStart()
|
} // setLicenseStart()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -283,12 +277,11 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @param int $v new value
|
* @param int $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLicenseEnd($v)
|
public function setLicenseEnd ($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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,12 +298,11 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @param int $v new value
|
* @param int $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLicenseSpan($v)
|
public function setLicenseSpan ($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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,7 +310,6 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
$this->license_span = $v;
|
$this->license_span = $v;
|
||||||
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_SPAN;
|
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_SPAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setLicenseSpan()
|
} // setLicenseSpan()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -327,12 +318,11 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLicenseStatus($v)
|
public function setLicenseStatus ($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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,7 +330,6 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
$this->license_status = $v;
|
$this->license_status = $v;
|
||||||
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_STATUS;
|
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setLicenseStatus()
|
} // setLicenseStatus()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -349,12 +338,11 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLicenseData($v)
|
public function setLicenseData ($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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,20 +359,17 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLicensePath($v)
|
public function setLicensePath ($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->license_path !== $v || $v === '0') {
|
if ($this->license_path !== $v || $v === '0') {
|
||||||
$this->license_path = $v;
|
$this->license_path = $v;
|
||||||
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_PATH;
|
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_PATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setLicensePath()
|
} // setLicensePath()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -393,12 +378,11 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLicenseWorkspace($v)
|
public function setLicenseWorkspace ($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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -406,7 +390,6 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
$this->license_workspace = $v;
|
$this->license_workspace = $v;
|
||||||
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_WORKSPACE;
|
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_WORKSPACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setLicenseWorkspace()
|
} // setLicenseWorkspace()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -415,12 +398,12 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLicenseType($v)
|
public function setLicenseType ($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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -428,7 +411,6 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
$this->license_type = $v;
|
$this->license_type = $v;
|
||||||
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_TYPE;
|
$this->modifiedColumns[] = LicenseManagerPeer::LICENSE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setLicenseType()
|
} // setLicenseType()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -444,39 +426,39 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @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->license_uid = $rs->getString($startcol + 0);
|
$this->license_uid = $rs->getString( $startcol + 0 );
|
||||||
|
|
||||||
$this->license_user = $rs->getString($startcol + 1);
|
$this->license_user = $rs->getString( $startcol + 1 );
|
||||||
|
|
||||||
$this->license_start = $rs->getInt($startcol + 2);
|
$this->license_start = $rs->getInt( $startcol + 2 );
|
||||||
|
|
||||||
$this->license_end = $rs->getInt($startcol + 3);
|
$this->license_end = $rs->getInt( $startcol + 3 );
|
||||||
|
|
||||||
$this->license_span = $rs->getInt($startcol + 4);
|
$this->license_span = $rs->getInt( $startcol + 4 );
|
||||||
|
|
||||||
$this->license_status = $rs->getString($startcol + 5);
|
$this->license_status = $rs->getString( $startcol + 5 );
|
||||||
|
|
||||||
$this->license_data = $rs->getString($startcol + 6);
|
$this->license_data = $rs->getString( $startcol + 6 );
|
||||||
|
|
||||||
$this->license_path = $rs->getString($startcol + 7);
|
$this->license_path = $rs->getString( $startcol + 7 );
|
||||||
|
|
||||||
$this->license_workspace = $rs->getString($startcol + 8);
|
$this->license_workspace = $rs->getString( $startcol + 8 );
|
||||||
|
|
||||||
$this->license_type = $rs->getString($startcol + 9);
|
$this->license_type = $rs->getString( $startcol + 9 );
|
||||||
|
|
||||||
$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 + 10; // 10 = LicenseManagerPeer::NUM_COLUMNS - LicenseManagerPeer::NUM_LAZY_LOAD_COLUMNS).
|
return $startcol + 10; // 10 = LicenseManagerPeer::NUM_COLUMNS - LicenseManagerPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating LicenseManager object", $e);
|
throw new PropelException( "Error populating LicenseManager object", $e );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -489,20 +471,20 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @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(LicenseManagerPeer::DATABASE_NAME);
|
$con = Propel::getConnection( LicenseManagerPeer::DATABASE_NAME );
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$con->begin();
|
$con->begin();
|
||||||
LicenseManagerPeer::doDelete($this, $con);
|
LicenseManagerPeer::doDelete( $this, $con );
|
||||||
$this->setDeleted(true);
|
$this->setDeleted( true );
|
||||||
$con->commit();
|
$con->commit();
|
||||||
} catch (PropelException $e) {
|
} catch (PropelException $e) {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
@@ -511,28 +493,29 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores the object in the database. If the object is new,
|
* Stores the object in the database.
|
||||||
|
* 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
|
* @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
|
||||||
* @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(LicenseManagerPeer::DATABASE_NAME);
|
$con = Propel::getConnection( LicenseManagerPeer::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) {
|
||||||
@@ -548,32 +531,29 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* 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
|
* @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
|
||||||
* @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 = LicenseManagerPeer::doInsert($this, $con);
|
$pk = LicenseManagerPeer::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 += LicenseManagerPeer::doUpdate($this, $con);
|
$affectedRows += LicenseManagerPeer::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;
|
||||||
@@ -581,9 +561,10 @@ abstract class BaseLicenseManager 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().
|
||||||
@@ -592,7 +573,7 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @return array ValidationFailed[]
|
* @return array ValidationFailed[]
|
||||||
* @see validate()
|
* @see validate()
|
||||||
*/
|
*/
|
||||||
public function getValidationFailures()
|
public function getValidationFailures ()
|
||||||
{
|
{
|
||||||
return $this->validationFailures;
|
return $this->validationFailures;
|
||||||
}
|
}
|
||||||
@@ -608,11 +589,11 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @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;
|
||||||
@@ -628,28 +609,24 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* 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;
|
* @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
|
||||||
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();
|
$failureMap = array ();
|
||||||
|
|
||||||
|
if (($retval = LicenseManagerPeer::doValidate( $this, $columns )) !== true) {
|
||||||
if (($retval = LicenseManagerPeer::doValidate($this, $columns)) !== true) {
|
$failureMap = array_merge( $failureMap, $retval );
|
||||||
$failureMap = array_merge($failureMap, $retval);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->alreadyInValidation = false;
|
$this->alreadyInValidation = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (!empty($failureMap) ? $failureMap : true);
|
return (! empty( $failureMap ) ? $failureMap : true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -661,10 +638,10 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* 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 = LicenseManagerPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
|
$pos = LicenseManagerPeer::translateFieldName( $name, $type, BasePeer::TYPE_NUM );
|
||||||
return $this->getByPosition($pos);
|
return $this->getByPosition( $pos );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -674,9 +651,9 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @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->getLicenseUid();
|
return $this->getLicenseUid();
|
||||||
break;
|
break;
|
||||||
@@ -710,7 +687,7 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
break;
|
break;
|
||||||
} // switch()
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -723,10 +700,10 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* 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 = LicenseManagerPeer::getFieldNames($keyType);
|
$keys = LicenseManagerPeer::getFieldNames( $keyType );
|
||||||
$result = array(
|
$result = array (
|
||||||
$keys[0] => $this->getLicenseUid(),
|
$keys[0] => $this->getLicenseUid(),
|
||||||
$keys[1] => $this->getLicenseUser(),
|
$keys[1] => $this->getLicenseUser(),
|
||||||
$keys[2] => $this->getLicenseStart(),
|
$keys[2] => $this->getLicenseStart(),
|
||||||
@@ -736,7 +713,7 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
$keys[6] => $this->getLicenseData(),
|
$keys[6] => $this->getLicenseData(),
|
||||||
$keys[7] => $this->getLicensePath(),
|
$keys[7] => $this->getLicensePath(),
|
||||||
$keys[8] => $this->getLicenseWorkspace(),
|
$keys[8] => $this->getLicenseWorkspace(),
|
||||||
$keys[9] => $this->getLicenseType(),
|
$keys[9] => $this->getLicenseType()
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@@ -751,10 +728,10 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* 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 = LicenseManagerPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
|
$pos = LicenseManagerPeer::translateFieldName( $name, $type, BasePeer::TYPE_NUM );
|
||||||
return $this->setByPosition($pos, $value);
|
return $this->setByPosition( $pos, $value );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -765,38 +742,38 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @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->setLicenseUid($value);
|
$this->setLicenseUid( $value );
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
$this->setLicenseUser($value);
|
$this->setLicenseUser( $value );
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
$this->setLicenseStart($value);
|
$this->setLicenseStart( $value );
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$this->setLicenseEnd($value);
|
$this->setLicenseEnd( $value );
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
$this->setLicenseSpan($value);
|
$this->setLicenseSpan( $value );
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
$this->setLicenseStatus($value);
|
$this->setLicenseStatus( $value );
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
$this->setLicenseData($value);
|
$this->setLicenseData( $value );
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
$this->setLicensePath($value);
|
$this->setLicensePath( $value );
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
$this->setLicenseWorkspace($value);
|
$this->setLicenseWorkspace( $value );
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
$this->setLicenseType($value);
|
$this->setLicenseType( $value );
|
||||||
break;
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
}
|
}
|
||||||
@@ -817,50 +794,40 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @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 = LicenseManagerPeer::getFieldNames($keyType);
|
$keys = LicenseManagerPeer::getFieldNames( $keyType );
|
||||||
|
|
||||||
if (array_key_exists($keys[0], $arr)) {
|
if (array_key_exists( $keys[0], $arr )) {
|
||||||
$this->setLicenseUid($arr[$keys[0]]);
|
$this->setLicenseUid( $arr[$keys[0]] );
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[1], $arr )) {
|
||||||
if (array_key_exists($keys[1], $arr)) {
|
$this->setLicenseUser( $arr[$keys[1]] );
|
||||||
$this->setLicenseUser($arr[$keys[1]]);
|
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[2], $arr )) {
|
||||||
if (array_key_exists($keys[2], $arr)) {
|
$this->setLicenseStart( $arr[$keys[2]] );
|
||||||
$this->setLicenseStart($arr[$keys[2]]);
|
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[3], $arr )) {
|
||||||
if (array_key_exists($keys[3], $arr)) {
|
$this->setLicenseEnd( $arr[$keys[3]] );
|
||||||
$this->setLicenseEnd($arr[$keys[3]]);
|
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[4], $arr )) {
|
||||||
if (array_key_exists($keys[4], $arr)) {
|
$this->setLicenseSpan( $arr[$keys[4]] );
|
||||||
$this->setLicenseSpan($arr[$keys[4]]);
|
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[5], $arr )) {
|
||||||
if (array_key_exists($keys[5], $arr)) {
|
$this->setLicenseStatus( $arr[$keys[5]] );
|
||||||
$this->setLicenseStatus($arr[$keys[5]]);
|
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[6], $arr )) {
|
||||||
if (array_key_exists($keys[6], $arr)) {
|
$this->setLicenseData( $arr[$keys[6]] );
|
||||||
$this->setLicenseData($arr[$keys[6]]);
|
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[7], $arr )) {
|
||||||
if (array_key_exists($keys[7], $arr)) {
|
$this->setLicensePath( $arr[$keys[7]] );
|
||||||
$this->setLicensePath($arr[$keys[7]]);
|
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[8], $arr )) {
|
||||||
if (array_key_exists($keys[8], $arr)) {
|
$this->setLicenseWorkspace( $arr[$keys[8]] );
|
||||||
$this->setLicenseWorkspace($arr[$keys[8]]);
|
|
||||||
}
|
}
|
||||||
|
if (array_key_exists( $keys[9], $arr )) {
|
||||||
if (array_key_exists($keys[9], $arr)) {
|
$this->setLicenseType( $arr[$keys[9]] );
|
||||||
$this->setLicenseType($arr[$keys[9]]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -868,51 +835,41 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @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(LicenseManagerPeer::DATABASE_NAME);
|
$criteria = new Criteria( LicenseManagerPeer::DATABASE_NAME );
|
||||||
|
|
||||||
if ($this->isColumnModified(LicenseManagerPeer::LICENSE_UID)) {
|
if ($this->isColumnModified( LicenseManagerPeer::LICENSE_UID )) {
|
||||||
$criteria->add(LicenseManagerPeer::LICENSE_UID, $this->license_uid);
|
$criteria->add( LicenseManagerPeer::LICENSE_UID, $this->license_uid );
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( LicenseManagerPeer::LICENSE_USER )) {
|
||||||
if ($this->isColumnModified(LicenseManagerPeer::LICENSE_USER)) {
|
$criteria->add( LicenseManagerPeer::LICENSE_USER, $this->license_user );
|
||||||
$criteria->add(LicenseManagerPeer::LICENSE_USER, $this->license_user);
|
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( LicenseManagerPeer::LICENSE_START )) {
|
||||||
if ($this->isColumnModified(LicenseManagerPeer::LICENSE_START)) {
|
$criteria->add( LicenseManagerPeer::LICENSE_START, $this->license_start );
|
||||||
$criteria->add(LicenseManagerPeer::LICENSE_START, $this->license_start);
|
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( LicenseManagerPeer::LICENSE_END )) {
|
||||||
if ($this->isColumnModified(LicenseManagerPeer::LICENSE_END)) {
|
$criteria->add( LicenseManagerPeer::LICENSE_END, $this->license_end );
|
||||||
$criteria->add(LicenseManagerPeer::LICENSE_END, $this->license_end);
|
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( LicenseManagerPeer::LICENSE_SPAN )) {
|
||||||
if ($this->isColumnModified(LicenseManagerPeer::LICENSE_SPAN)) {
|
$criteria->add( LicenseManagerPeer::LICENSE_SPAN, $this->license_span );
|
||||||
$criteria->add(LicenseManagerPeer::LICENSE_SPAN, $this->license_span);
|
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( LicenseManagerPeer::LICENSE_STATUS )) {
|
||||||
if ($this->isColumnModified(LicenseManagerPeer::LICENSE_STATUS)) {
|
$criteria->add( LicenseManagerPeer::LICENSE_STATUS, $this->license_status );
|
||||||
$criteria->add(LicenseManagerPeer::LICENSE_STATUS, $this->license_status);
|
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( LicenseManagerPeer::LICENSE_DATA )) {
|
||||||
if ($this->isColumnModified(LicenseManagerPeer::LICENSE_DATA)) {
|
$criteria->add( LicenseManagerPeer::LICENSE_DATA, $this->license_data );
|
||||||
$criteria->add(LicenseManagerPeer::LICENSE_DATA, $this->license_data);
|
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( LicenseManagerPeer::LICENSE_PATH )) {
|
||||||
if ($this->isColumnModified(LicenseManagerPeer::LICENSE_PATH)) {
|
$criteria->add( LicenseManagerPeer::LICENSE_PATH, $this->license_path );
|
||||||
$criteria->add(LicenseManagerPeer::LICENSE_PATH, $this->license_path);
|
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( LicenseManagerPeer::LICENSE_WORKSPACE )) {
|
||||||
if ($this->isColumnModified(LicenseManagerPeer::LICENSE_WORKSPACE)) {
|
$criteria->add( LicenseManagerPeer::LICENSE_WORKSPACE, $this->license_workspace );
|
||||||
$criteria->add(LicenseManagerPeer::LICENSE_WORKSPACE, $this->license_workspace);
|
|
||||||
}
|
}
|
||||||
|
if ($this->isColumnModified( LicenseManagerPeer::LICENSE_TYPE )) {
|
||||||
if ($this->isColumnModified(LicenseManagerPeer::LICENSE_TYPE)) {
|
$criteria->add( LicenseManagerPeer::LICENSE_TYPE, $this->license_type );
|
||||||
$criteria->add(LicenseManagerPeer::LICENSE_TYPE, $this->license_type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -924,20 +881,21 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @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(LicenseManagerPeer::DATABASE_NAME);
|
$criteria = new Criteria( LicenseManagerPeer::DATABASE_NAME );
|
||||||
|
|
||||||
$criteria->add(LicenseManagerPeer::LICENSE_UID, $this->license_uid);
|
$criteria->add( LicenseManagerPeer::LICENSE_UID, $this->license_uid );
|
||||||
|
|
||||||
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->getLicenseUid();
|
return $this->getLicenseUid();
|
||||||
}
|
}
|
||||||
@@ -948,9 +906,9 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @param string $key Primary key.
|
* @param string $key Primary key.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setPrimaryKey($key)
|
public function setPrimaryKey ($key)
|
||||||
{
|
{
|
||||||
$this->setLicenseUid($key);
|
$this->setLicenseUid( $key );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -963,31 +921,30 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @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->setLicenseUser($this->license_user);
|
$copyObj->setLicenseUser( $this->license_user );
|
||||||
|
|
||||||
$copyObj->setLicenseStart($this->license_start);
|
$copyObj->setLicenseStart( $this->license_start );
|
||||||
|
|
||||||
$copyObj->setLicenseEnd($this->license_end);
|
$copyObj->setLicenseEnd( $this->license_end );
|
||||||
|
|
||||||
$copyObj->setLicenseSpan($this->license_span);
|
$copyObj->setLicenseSpan( $this->license_span );
|
||||||
|
|
||||||
$copyObj->setLicenseStatus($this->license_status);
|
$copyObj->setLicenseStatus( $this->license_status );
|
||||||
|
|
||||||
$copyObj->setLicenseData($this->license_data);
|
$copyObj->setLicenseData( $this->license_data );
|
||||||
|
|
||||||
$copyObj->setLicensePath($this->license_path);
|
$copyObj->setLicensePath( $this->license_path );
|
||||||
|
|
||||||
$copyObj->setLicenseWorkspace($this->license_workspace);
|
$copyObj->setLicenseWorkspace( $this->license_workspace );
|
||||||
|
|
||||||
$copyObj->setLicenseType($this->license_type);
|
$copyObj->setLicenseType( $this->license_type );
|
||||||
|
|
||||||
|
$copyObj->setNew( true );
|
||||||
|
|
||||||
$copyObj->setNew(true);
|
$copyObj->setLicenseUid( '' ); // this is a pkey column, so set to default value
|
||||||
|
|
||||||
$copyObj->setLicenseUid(NULL); // this is a pkey column, so set to default value
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1003,12 +960,12 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
* @return LicenseManager Clone of current object.
|
* @return LicenseManager 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1021,7 +978,7 @@ abstract class BaseLicenseManager extends BaseObject implements Persistent
|
|||||||
*
|
*
|
||||||
* @return LicenseManagerPeer
|
* @return LicenseManagerPeer
|
||||||
*/
|
*/
|
||||||
public function getPeer()
|
public function getPeer ()
|
||||||
{
|
{
|
||||||
if (self::$peer === null) {
|
if (self::$peer === null) {
|
||||||
self::$peer = new LicenseManagerPeer();
|
self::$peer = new LicenseManagerPeer();
|
||||||
|
|||||||
@@ -10,61 +10,91 @@ include_once 'classes/model/LicenseManager.php';
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @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
|
||||||
*
|
*
|
||||||
@@ -72,10 +102,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)
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -85,22 +115,24 @@ 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.
|
||||||
*
|
*
|
||||||
@@ -109,12 +141,12 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* 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();
|
||||||
}
|
}
|
||||||
@@ -122,6 +154,7 @@ abstract class BaseLicenseManagerPeer
|
|||||||
}
|
}
|
||||||
return self::$phpNameMap;
|
return self::$phpNameMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translates a fieldname to another type
|
* Translates a fieldname to another type
|
||||||
*
|
*
|
||||||
@@ -131,12 +164,12 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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];
|
||||||
}
|
}
|
||||||
@@ -150,10 +183,10 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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];
|
||||||
}
|
}
|
||||||
@@ -166,13 +199,14 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* $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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -186,28 +220,28 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,32 +256,33 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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.
|
||||||
*
|
*
|
||||||
@@ -257,16 +292,17 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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.
|
||||||
*
|
*
|
||||||
@@ -276,10 +312,11 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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.
|
||||||
@@ -294,24 +331,25 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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.
|
||||||
@@ -319,33 +357,33 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -357,7 +395,7 @@ abstract class BaseLicenseManagerPeer
|
|||||||
*
|
*
|
||||||
* @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;
|
||||||
}
|
}
|
||||||
@@ -371,10 +409,10 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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) {
|
||||||
@@ -383,15 +421,14 @@ 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();
|
||||||
@@ -404,35 +441,35 @@ 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 create the UPDATE statement.
|
* @param mixed $values Criteria or LicenseManager object containing data that is used to create the UPDATE statement.
|
||||||
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
|
* @param Connection $con The connection to use (specify Connection object to 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 );
|
||||||
$comparison = $criteria->getComparison(LicenseManagerPeer::LICENSE_UID);
|
$selectCriteria->add( LicenseManagerPeer::LICENSE_UID, $criteria->remove( LicenseManagerPeer::LICENSE_UID ), $comparison );
|
||||||
$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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -440,17 +477,17 @@ abstract class BaseLicenseManagerPeer
|
|||||||
*
|
*
|
||||||
* @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) {
|
||||||
@@ -465,31 +502,29 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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).
|
* @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
|
||||||
* This includes CASCADE-related rows
|
|
||||||
* if supported by native driver or if emulated using Propel.
|
* if supported by native driver or if emulated using Propel.
|
||||||
* @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 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
|
||||||
|
|
||||||
@@ -498,7 +533,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) {
|
||||||
@@ -519,21 +554,23 @@ abstract class BaseLicenseManagerPeer
|
|||||||
*
|
*
|
||||||
* @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);
|
$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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -541,7 +578,7 @@ abstract class BaseLicenseManagerPeer
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return BasePeer::doValidate(LicenseManagerPeer::DATABASE_NAME, LicenseManagerPeer::TABLE_NAME, $columns);
|
return BasePeer::doValidate( LicenseManagerPeer::DATABASE_NAME, LicenseManagerPeer::TABLE_NAME, $columns );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -551,20 +588,19 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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 );
|
||||||
|
|
||||||
$v = LicenseManagerPeer::doSelect($criteria, $con);
|
return ! empty( $v ) > 0 ? $v[0] : null;
|
||||||
|
|
||||||
return !empty($v) > 0 ? $v[0] : null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -575,25 +611,24 @@ abstract class BaseLicenseManagerPeer
|
|||||||
* @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
|
||||||
@@ -601,12 +636,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' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1784,7 +1784,7 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
|
|||||||
|
|
||||||
$copyObj->setUsrUid(''); // this is a pkey column, so set to default value
|
$copyObj->setUsrUid(''); // this is a pkey column, so set to default value
|
||||||
|
|
||||||
$copyObj->setDelIndex(''); // this is a pkey column, so set to default value
|
$copyObj->setDelIndex('0'); // this is a pkey column, so set to default value
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user