This commit is contained in:
Andrea Adamczyk
2019-11-08 09:48:59 -04:00
committed by Julio Cesar Laura Avendaño
parent 480c67ac37
commit cedc5bbae5
5 changed files with 77 additions and 10 deletions

View File

@@ -67,6 +67,8 @@ class AppSequenceMapBuilder
$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('APP_TYPE', 'AppType', 'string', CreoleTypes::VARCHAR, true, 20);
} // doBuild()
} // AppSequenceMapBuilder

View File

@@ -33,6 +33,12 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
*/
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
* by another object which falls in this transaction.
@@ -58,6 +64,17 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
return $this->id;
}
/**
* Get the [app_type] column value.
*
* @return string
*/
public function getAppType()
{
return $this->app_type;
}
/**
* Set the value of [id] column.
*
@@ -80,6 +97,28 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
} // 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.
*
@@ -99,12 +138,14 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
$this->id = $rs->getInt($startcol + 0);
$this->app_type = $rs->getString($startcol + 1);
$this->resetModified();
$this->setNew(false);
// 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) {
throw new PropelException("Error populating AppSequence object", $e);
@@ -311,6 +352,9 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
case 0:
return $this->getId();
break;
case 1:
return $this->getAppType();
break;
default:
return null;
break;
@@ -332,6 +376,7 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
$keys = AppSequencePeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getId(),
$keys[1] => $this->getAppType(),
);
return $result;
}
@@ -366,6 +411,9 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
case 0:
$this->setId($value);
break;
case 1:
$this->setAppType($value);
break;
} // switch()
}
@@ -393,6 +441,10 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
$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);
}
if ($this->isColumnModified(AppSequencePeer::APP_TYPE)) {
$criteria->add(AppSequencePeer::APP_TYPE, $this->app_type);
}
return $criteria;
}
@@ -462,6 +518,8 @@ abstract class BaseAppSequence extends BaseObject implements Persistent
public function copyInto($copyObj, $deepCopy = false)
{
$copyObj->setAppType($this->app_type);
$copyObj->setNew(true);

View File

@@ -25,7 +25,7 @@ abstract class BaseAppSequencePeer
const CLASS_DEFAULT = 'classes.model.AppSequence';
/** The total number of columns. */
const NUM_COLUMNS = 1;
const NUM_COLUMNS = 2;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -34,6 +34,9 @@ abstract class BaseAppSequencePeer
/** the column name for the ID field */
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 */
private static $phpNameMap = null;
@@ -45,10 +48,10 @@ abstract class BaseAppSequencePeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('Id', ),
BasePeer::TYPE_COLNAME => array (AppSequencePeer::ID, ),
BasePeer::TYPE_FIELDNAME => array ('ID', ),
BasePeer::TYPE_NUM => array (0, )
BasePeer::TYPE_PHPNAME => array ('Id', 'AppType', ),
BasePeer::TYPE_COLNAME => array (AppSequencePeer::ID, AppSequencePeer::APP_TYPE, ),
BasePeer::TYPE_FIELDNAME => array ('ID', 'APP_TYPE', ),
BasePeer::TYPE_NUM => array (0, 1, )
);
/**
@@ -58,10 +61,10 @@ abstract class BaseAppSequencePeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('Id' => 0, ),
BasePeer::TYPE_COLNAME => array (AppSequencePeer::ID => 0, ),
BasePeer::TYPE_FIELDNAME => array ('ID' => 0, ),
BasePeer::TYPE_NUM => array (0, )
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'AppType' => 1, ),
BasePeer::TYPE_COLNAME => array (AppSequencePeer::ID => 0, AppSequencePeer::APP_TYPE => 1, ),
BasePeer::TYPE_FIELDNAME => array ('ID' => 0, 'APP_TYPE' => 1, ),
BasePeer::TYPE_NUM => array (0, 1, )
);
/**
@@ -164,6 +167,8 @@ abstract class BaseAppSequencePeer
$criteria->addSelectColumn(AppSequencePeer::ID);
$criteria->addSelectColumn(AppSequencePeer::APP_TYPE);
}
const COUNT = 'COUNT(APP_SEQUENCE.ID)';