PMC-1367
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
parent
480c67ac37
commit
cedc5bbae5
@@ -67,6 +67,8 @@ class AppSequenceMapBuilder
|
|||||||
|
|
||||||
$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
|
$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
|
||||||
|
|
||||||
|
$tMap->addColumn('APP_TYPE', 'AppType', 'string', CreoleTypes::VARCHAR, true, 20);
|
||||||
|
|
||||||
} // doBuild()
|
} // doBuild()
|
||||||
|
|
||||||
} // AppSequenceMapBuilder
|
} // AppSequenceMapBuilder
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
|
|||||||
*/
|
*/
|
||||||
protected $id;
|
protected $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the app_type field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $app_type = 'NORMAL';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@@ -58,6 +64,17 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
|
|||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [app_type] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getAppType()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->app_type;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [id] column.
|
* Set the value of [id] column.
|
||||||
*
|
*
|
||||||
@@ -80,6 +97,28 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
|
|||||||
|
|
||||||
} // setId()
|
} // setId()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [app_type] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setAppType($v)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Since the native PHP type for this column is string,
|
||||||
|
// we will cast the input to a string (if it is not).
|
||||||
|
if ($v !== null && !is_string($v)) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->app_type !== $v || $v === 'NORMAL') {
|
||||||
|
$this->app_type = $v;
|
||||||
|
$this->modifiedColumns[] = AppSequencePeer::APP_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // setAppType()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hydrates (populates) the object variables with values from the database resultset.
|
* Hydrates (populates) the object variables with values from the database resultset.
|
||||||
*
|
*
|
||||||
@@ -99,12 +138,14 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
|
|||||||
|
|
||||||
$this->id = $rs->getInt($startcol + 0);
|
$this->id = $rs->getInt($startcol + 0);
|
||||||
|
|
||||||
|
$this->app_type = $rs->getString($startcol + 1);
|
||||||
|
|
||||||
$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 + 1; // 1 = AppSequencePeer::NUM_COLUMNS - AppSequencePeer::NUM_LAZY_LOAD_COLUMNS).
|
return $startcol + 2; // 2 = AppSequencePeer::NUM_COLUMNS - AppSequencePeer::NUM_LAZY_LOAD_COLUMNS).
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating AppSequence object", $e);
|
throw new PropelException("Error populating AppSequence object", $e);
|
||||||
@@ -311,6 +352,9 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
|
|||||||
case 0:
|
case 0:
|
||||||
return $this->getId();
|
return $this->getId();
|
||||||
break;
|
break;
|
||||||
|
case 1:
|
||||||
|
return $this->getAppType();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
break;
|
break;
|
||||||
@@ -332,6 +376,7 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
|
|||||||
$keys = AppSequencePeer::getFieldNames($keyType);
|
$keys = AppSequencePeer::getFieldNames($keyType);
|
||||||
$result = array(
|
$result = array(
|
||||||
$keys[0] => $this->getId(),
|
$keys[0] => $this->getId(),
|
||||||
|
$keys[1] => $this->getAppType(),
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@@ -366,6 +411,9 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
|
|||||||
case 0:
|
case 0:
|
||||||
$this->setId($value);
|
$this->setId($value);
|
||||||
break;
|
break;
|
||||||
|
case 1:
|
||||||
|
$this->setAppType($value);
|
||||||
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -393,6 +441,10 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
|
|||||||
$this->setId($arr[$keys[0]]);
|
$this->setId($arr[$keys[0]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (array_key_exists($keys[1], $arr)) {
|
||||||
|
$this->setAppType($arr[$keys[1]]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -408,6 +460,10 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
|
|||||||
$criteria->add(AppSequencePeer::ID, $this->id);
|
$criteria->add(AppSequencePeer::ID, $this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->isColumnModified(AppSequencePeer::APP_TYPE)) {
|
||||||
|
$criteria->add(AppSequencePeer::APP_TYPE, $this->app_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
@@ -462,6 +518,8 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
|
|||||||
public function copyInto($copyObj, $deepCopy = false)
|
public function copyInto($copyObj, $deepCopy = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$copyObj->setAppType($this->app_type);
|
||||||
|
|
||||||
|
|
||||||
$copyObj->setNew(true);
|
$copyObj->setNew(true);
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ abstract class BaseAppSequencePeer
|
|||||||
const CLASS_DEFAULT = 'classes.model.AppSequence';
|
const CLASS_DEFAULT = 'classes.model.AppSequence';
|
||||||
|
|
||||||
/** The total number of columns. */
|
/** The total number of columns. */
|
||||||
const NUM_COLUMNS = 1;
|
const NUM_COLUMNS = 2;
|
||||||
|
|
||||||
/** The number of lazy-loaded columns. */
|
/** The number of lazy-loaded columns. */
|
||||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
@@ -34,6 +34,9 @@ abstract class BaseAppSequencePeer
|
|||||||
/** the column name for the ID field */
|
/** the column name for the ID field */
|
||||||
const ID = 'APP_SEQUENCE.ID';
|
const ID = 'APP_SEQUENCE.ID';
|
||||||
|
|
||||||
|
/** the column name for the APP_TYPE field */
|
||||||
|
const APP_TYPE = 'APP_SEQUENCE.APP_TYPE';
|
||||||
|
|
||||||
/** The PHP to DB Name Mapping */
|
/** The PHP to DB Name Mapping */
|
||||||
private static $phpNameMap = null;
|
private static $phpNameMap = null;
|
||||||
|
|
||||||
@@ -45,10 +48,10 @@ abstract class BaseAppSequencePeer
|
|||||||
* 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 ('Id', ),
|
BasePeer::TYPE_PHPNAME => array ('Id', 'AppType', ),
|
||||||
BasePeer::TYPE_COLNAME => array (AppSequencePeer::ID, ),
|
BasePeer::TYPE_COLNAME => array (AppSequencePeer::ID, AppSequencePeer::APP_TYPE, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('ID', ),
|
BasePeer::TYPE_FIELDNAME => array ('ID', 'APP_TYPE', ),
|
||||||
BasePeer::TYPE_NUM => array (0, )
|
BasePeer::TYPE_NUM => array (0, 1, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -58,10 +61,10 @@ abstract class BaseAppSequencePeer
|
|||||||
* 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 ('Id' => 0, ),
|
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'AppType' => 1, ),
|
||||||
BasePeer::TYPE_COLNAME => array (AppSequencePeer::ID => 0, ),
|
BasePeer::TYPE_COLNAME => array (AppSequencePeer::ID => 0, AppSequencePeer::APP_TYPE => 1, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('ID' => 0, ),
|
BasePeer::TYPE_FIELDNAME => array ('ID' => 0, 'APP_TYPE' => 1, ),
|
||||||
BasePeer::TYPE_NUM => array (0, )
|
BasePeer::TYPE_NUM => array (0, 1, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -164,6 +167,8 @@ abstract class BaseAppSequencePeer
|
|||||||
|
|
||||||
$criteria->addSelectColumn(AppSequencePeer::ID);
|
$criteria->addSelectColumn(AppSequencePeer::ID);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(AppSequencePeer::APP_TYPE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const COUNT = 'COUNT(APP_SEQUENCE.ID)';
|
const COUNT = 'COUNT(APP_SEQUENCE.ID)';
|
||||||
|
|||||||
@@ -118,6 +118,7 @@
|
|||||||
</table>
|
</table>
|
||||||
<table name="APP_SEQUENCE" idMethod="native">
|
<table name="APP_SEQUENCE" idMethod="native">
|
||||||
<column name="ID" type="INTEGER" required="true" primaryKey="true"/>
|
<column name="ID" type="INTEGER" required="true" primaryKey="true"/>
|
||||||
|
<column name="APP_TYPE" type="VARCHAR" size="20" required="true" default="NORMAL"/>
|
||||||
</table>
|
</table>
|
||||||
<table name="APP_DELEGATION" idMethod="native">
|
<table name="APP_DELEGATION" idMethod="native">
|
||||||
<vendor type="mysql">
|
<vendor type="mysql">
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ DROP TABLE IF EXISTS `APP_SEQUENCE`;
|
|||||||
CREATE TABLE `APP_SEQUENCE`
|
CREATE TABLE `APP_SEQUENCE`
|
||||||
(
|
(
|
||||||
`ID` INTEGER NOT NULL,
|
`ID` INTEGER NOT NULL,
|
||||||
|
`APP_TYPE` VARCHAR(20) default 'NORMAL' NOT NULL,
|
||||||
PRIMARY KEY (`ID`)
|
PRIMARY KEY (`ID`)
|
||||||
)ENGINE=InnoDB ;
|
)ENGINE=InnoDB ;
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user