manual merge of the upstream branch

This commit is contained in:
Gustavo Cruz
2015-03-05 16:49:50 -04:00
174 changed files with 27703 additions and 7810 deletions

2
.gitignore vendored
View File

@@ -1,4 +1,4 @@
bproject
nbproject/*
workflow/engine/config/paths_installed.php
gulliver/thirdparty/html2ps_pdf/cache
workflow/engine/content/languages/translations.environments

View File

@@ -192,7 +192,7 @@ def buildPmdynaform(homeDir, targetDir, mode)
template += s
end
htmlTemplates=["cases_Step_Pmdynaform.html","cases_Step_Pmdynaform_Preview.html","cases_Step_Pmdynaform_View.html"]
htmlTemplates=["pmdynaform.html"]
htmlTemplates.each do |htmlTemplate|
FileUtils.cp("#{Dir.pwd}/workflow/engine/templates/cases/#{htmlTemplate}", "#{pmdynaformDir}/build/#{htmlTemplate}")

View File

@@ -20,16 +20,7 @@ class UploadFormat extends Format
*
* @var array
*/
public static $allowedMimeTypes = array(
'image/jpeg',
'image/png',
'image/png',
'application/octet-stream',
'text/plain',
'text/xml',
'text/html',
'text/css'
);
public static $allowedMimeTypes = array();
/**
* use it to restrict uploads based on file size
* set it to 0 to allow all sizes
@@ -40,7 +31,7 @@ class UploadFormat extends Format
*
* @var int
*/
public static $maximumFileSize = 1048576;
public static $maximumFileSize = 0;
/**
* Your own validation function for validating each uploaded file
* it can return false or throw an exception for invalid file

View File

@@ -296,6 +296,11 @@ class WebApplication
list($host, $port) = strpos(DB_HOST, ':') !== false ? explode(':', DB_HOST) : array(DB_HOST, '');
$port = empty($port) ? '' : ";port=$port";
Services\OAuth2\Server::setDatabaseSource(DB_USER, DB_PASS, DB_ADAPTER.":host=$host;dbname=".DB_NAME.$port);
if (DB_NAME != DB_RBAC_NAME) { //it's PM < 3
list($host, $port) = strpos(DB_RBAC_HOST, ':') !== false ? explode(':', DB_RBAC_HOST) : array(DB_RBAC_HOST, '');
$port = empty($port) ? '' : ";port=$port";
Services\OAuth2\Server::setDatabaseSourceRBAC(DB_RBAC_USER, DB_RBAC_PASS, DB_ADAPTER.":host=$host;dbname=".DB_RBAC_NAME.$port);
}
// Setting default OAuth Client id, for local PM Web Designer
Services\OAuth2\Server::setPmClientId($pmOauthClientId);

View File

@@ -24,7 +24,7 @@
var sToken = token.string.trim();
if ( sToken == "(") {
token = tprop = getToken(editor, Pos(cur.line, tprop.start));
token = tprop = getToken(editor, Pos(cur.line, tprop.start));
return {list: getCompletions(token.string, keywords, options),
from: Pos(cur.line, token.start),
to: Pos(cur.line, token.end + 1)};
@@ -244,22 +244,22 @@
}
arrayFunction = arrayFunctions[functionName];
if (arrayFunction != undefined) {
forEach( arrayFunction, yesAdd);
} else {
if (functionName.trim() == "") {
forEach (phpKeywords, yesAdd);
forEach (keywords, yesAdd);
forEach (phpKeywords, yesAdd);
forEach (keywords, yesAdd);
} else if (functionName == "=") {
forEach (phpPMFunctions, yesAdd);
forEach (phpPMFunctions, yesAdd);
} else {
for (index = 0; index < phpKeywords.length; index++) {
if ( phpKeywords[index].indexOf(functionName) == 0 ) {
found.push(phpKeywords[index]);
}
}
forEach(keywords, maybeAdd);
for (index = 0; index < phpKeywords.length; index++) {
if ( phpKeywords[index].indexOf(functionName) == 0 ) {
found.push(phpKeywords[index]);
}
}
forEach(keywords, maybeAdd);
}
}
return found;

View File

@@ -55,7 +55,7 @@ class XmlForm_Field_HTML extends XmlForm_Field
* @return string
*
*/
public function render ($value, $owner = null)
public function render($value = null, $owner = null)
{
$value = ($value == '') ? '<br/>' : $value;
$html = "<div style='width:" . $this->width . ";'>";

View File

@@ -713,7 +713,7 @@ class G
* @param string $strClass
* @return void
*/
public function LoadThirdParty ($sPath, $sFile)
public static function LoadThirdParty($sPath, $sFile)
{
$classfile = PATH_THIRDPARTY . $sPath . '/' . $sFile . ((substr( $sFile, 0, - 4 ) !== '.php') ? '.php' : '');
return require_once ($classfile);
@@ -3330,7 +3330,7 @@ class G
*
* @return boolean true or false
*/
public function isHttpRequest()
public static function isHttpRequest()
{
if (isset($_SERVER['SERVER_SOFTWARE']) && strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache') !== false) {
return true;
@@ -5647,3 +5647,4 @@ function __ ($msgID, $lang = SYS_LANG, $data = null)
{
return G::LoadTranslation( $msgID, $lang, $data );
}

View File

@@ -76,7 +76,7 @@ class XmlForm_Field_XmlMenu extends XmlForm_Field
*
* @return object $out
*/
public function render ($value)
public function render($value = null, $paramDummy2 = null)
{
$this->xmlMenu = new xmlMenu( $this->xmlfile, $this->home );
$this->xmlMenu->setValues( $value );
@@ -97,7 +97,7 @@ class XmlForm_Field_XmlMenu extends XmlForm_Field
*
* @return none
*/
public function renderGrid ($value)
public function renderGrid($value = null, $paramDummy2 = null, $paramDummy3 = null, $paramDummy4 = null)
{
return $this->render( $value );
}

View File

@@ -394,7 +394,7 @@ class XmlForm_Field
* @param string value
* @return string
*/
public function render ($value = null)
public function render($value = null, $paramDummy2 = null)
{
//this is an unknown field type.
return $this->htmlentities( $value != '' ? $value : $this->name, ENT_COMPAT, 'utf-8' );
@@ -934,7 +934,7 @@ class XmlForm_Field_Title extends XmlForm_Field
* @param string value
* @return string
*/
public function render ($value = null, &$owner = null)
public function render($value = null, $owner = null)
{
$this->label = G::replaceDataField( $this->label, $owner->values );
return '<span id=\'form[' . $this->name . ']\' name=\'form[' . $this->name . ']\' ' . $this->NSFieldType() . ' >' . $this->htmlentities( $this->label ) . '</span>';
@@ -970,7 +970,7 @@ class XmlForm_Field_Subtitle extends XmlForm_Field
* @param string value
* @return string
*/
public function render ($value = null)
public function render($value = null, $paramDummy2 = null)
{
return '<span id=\'form[' . $this->name . ']\' name=\'form[' . $this->name . ']\' ' . $this->NSFieldType() . ' >' . $this->htmlentities( $this->label ) . '</span>';
}
@@ -1012,7 +1012,7 @@ class XmlForm_Field_SimpleText extends XmlForm_Field
* @param string value
* @return string
*/
public function render ($value = null, &$owner = null)
public function render($value = null, $owner = null)
{
if (($this->pmconnection != '') && ($this->pmfield != '') && $value == null) {
$value = $this->getPMTableValue( $owner );
@@ -1040,7 +1040,7 @@ class XmlForm_Field_SimpleText extends XmlForm_Field
* @param string owner
* @return string
*/
public function renderGrid ($values = array(), $owner = null)
public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
$result = array ();
$r = 1;
@@ -1204,7 +1204,7 @@ class XmlForm_Field_Text extends XmlForm_Field_SimpleText
* @param string owner
* @return string
*/
public function renderGrid ($values = array(), $owner = null)
public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
$result = $aux = array ();
$r = 1;
@@ -1257,7 +1257,7 @@ class XmlForm_Field_Text extends XmlForm_Field_SimpleText
return $result;
}
public function renderTable ($values = '', $owner = null)
public function renderTable($values = "", $owner = null, $paramDummy3 = null)
{
$result = $this->htmlentities( $values, ENT_COMPAT, 'utf-8' );
return $result;
@@ -1716,7 +1716,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek
* @param string owner
* @return string
*/
public function renderGrid ($values = array(), $owner = null)
public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
$aResult = array();
$r = 1;
@@ -1735,7 +1735,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek
* @param <String> $owner
* @return <String> $result
*/
public function renderTable ($values = '', $owner = null)
public function renderTable($values = "", $owner = null, $paramDummy3 = null)
{
$result = $this->htmlentities( $values, ENT_COMPAT, 'utf-8' );
return $result;
@@ -1812,10 +1812,8 @@ class XmlForm_Field_Caption extends XmlForm_Field
* @param $owner
* @return true
*/
public function validateValue ($value, &$owner)
public function validateValue($value)
{
/*$this->executeSQL( $owner );
return isset($value) && ( array_key_exists( $value , $this->options ) );*/
return true;
}
@@ -1897,7 +1895,7 @@ class XmlForm_Field_Password extends XmlForm_Field
* @param string value
* @return string
*/
public function render ($value = null)
public function render($value = null, $paramDummy2 = null)
{
if ($this->autocomplete === '1') {
$this->autocomplete = "on";
@@ -2013,7 +2011,7 @@ class XmlForm_Field_Textarea extends XmlForm_Field
* @param string owner
* @return string
*/
public function renderGrid ($values = array(), $owner = null)
public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
$this->gridFieldType = 'textarea';
@@ -2176,7 +2174,7 @@ class XmlForm_Field_Currency extends XmlForm_Field_SimpleText
* @param string owner
* @return string
*/
public function renderGrid ($values = array(), $owner = null)
public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
$result = array ();
$r = 1;
@@ -2242,7 +2240,7 @@ class XmlForm_Field_CaptionCurrency extends XmlForm_Field
* @param string value
* @return string
*/
public function render ($value = null)
public function render($value = null, $paramDummy2 = null)
{
return '$ ' . $this->htmlentities( $value, ENT_COMPAT, 'utf-8' );
}
@@ -2323,7 +2321,7 @@ class XmlForm_Field_Percentage extends XmlForm_Field_SimpleText
return $html;
}
public function renderGrid ($values = array(), $owner = null)
public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
$result = array ();
$r = 1;
@@ -2381,7 +2379,7 @@ class XmlForm_Field_Percentage extends XmlForm_Field_SimpleText
class XmlForm_Field_CaptionPercentage extends XmlForm_Field
{
public function render ($value = null)
public function render($value = null, $paramDummy2 = null)
{
return $this->htmlentities( $value, ENT_COMPAT, 'utf-8' );
}
@@ -2575,7 +2573,7 @@ class XmlForm_Field_Date2 extends XmlForm_Field_SimpleText
* @param $onlyValue
* @return <String>
*/
public function renderGrid ($values = null, $owner = null, $onlyValue = false)
public function renderGrid($values = null, $owner = null, $onlyValue = false, $paramDummy4 = null)
{
$result = array ();
$r = 1;
@@ -2658,7 +2656,7 @@ class XmlForm_Field_Date2 extends XmlForm_Field_SimpleText
class XmlForm_Field_DateView extends XmlForm_Field
{
public function render ($value = null)
public function render($value = null, $paramDummy2 = null)
{
return $this->htmlentities( $value, ENT_COMPAT, 'utf-8' );
}
@@ -2741,7 +2739,7 @@ class XmlForm_Field_YesNo extends XmlForm_Field
* @param $owner
* @return <array>
*/
public function renderGrid ($values = array(), $owner = null)
public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
$this->gridFieldType = 'yesno';
$result = array ();
@@ -2888,7 +2886,7 @@ class XmlForm_Field_Link extends XmlForm_Field
* @param $owner
* @return <array>
*/
public function renderGrid($value = array(), $label = array(), $owner = null)
public function renderGrid($value = array(), $label = array(), $owner = null, $paramDummy4 = null)
{
$arrayResult = array();
$row = 1;
@@ -2914,7 +2912,7 @@ class XmlForm_Field_Link extends XmlForm_Field
* @param $owner
* @return <String>
*/
public function renderTable ($value = null, $owner = null)
public function renderTable($value = null, $owner = null, $paramDummy3 = null)
{
$onclick = $this->htmlentities( G::replaceDataField( $this->onclick, $owner->values ), ENT_QUOTES, 'utf-8' );
$link = $this->htmlentities( G::replaceDataField( $this->link, $owner->values ), ENT_QUOTES, 'utf-8' );
@@ -3053,7 +3051,7 @@ class XmlForm_Field_File extends XmlForm_Field
return $html;
}
public function renderGrid ($value = array(), $owner = null, $therow = -1)
public function renderGrid($value = array(), $owner = null, $therow = -1, $paramDummy4 = null)
{
$arrayResult = array ();
$r = 1;
@@ -3142,7 +3140,7 @@ class XmlForm_Field_Checkboxpt extends XmlForm_Field
* @param $owner
* @return <Array> result
*/
public function renderGrid ($values = array(), $owner = null)
public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
$result = array ();
$r = 1;
@@ -3238,7 +3236,7 @@ class XmlForm_Field_Checkbox extends XmlForm_Field
* @param $owner
* @return <Array> result
*/
public function renderGrid ($values = array(), $owner = null)
public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
$this->gridFieldType = 'checkbox';
$result = array ();
@@ -3286,7 +3284,7 @@ class XmlForm_Field_Checkbox2 extends XmlForm_Field
{
public $required = false;
public function render ($value = null)
public function render($value = null, $paramDummy2 = null)
{
return '<input class="FormCheck" name="' . $this->name . '" type ="checkbox" disabled>' . $this->label . '</input>';
}
@@ -3461,7 +3459,7 @@ class XmlForm_Field_Hidden extends XmlForm_Field
* @param $owner
* @return <Array> result
*/
public function renderGrid ($values = null, $owner = null)
public function renderGrid($values = null, $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
$result = array ();
$r = 1;
@@ -3480,7 +3478,7 @@ class XmlForm_Field_Hidden extends XmlForm_Field
* @param $owner
* @return <Array> result
*/
public function renderTable ($value = '', $owner = null)
public function renderTable($value = "", $owner = null, $paramDummy3 = null)
{
return '<input id="form[' . $this->name . ']" name="form[' . $this->name . ']" type=\'hidden\' value=\'' . $value . '\'/>';
}
@@ -3509,10 +3507,8 @@ class XmlForm_Field_Dropdown extends XmlForm_Field
public $renderMode = '';
public $selectedValue = '';
public function validateValue ($value, &$owner)
public function validateValue($value)
{
/*$this->executeSQL( $owner );
return isset($value) && ( array_key_exists( $value , $this->options ) );*/
return true;
}
@@ -3827,7 +3823,7 @@ class XmlForm_Field_Listbox extends XmlForm_Field
* @param $owner
* @return <Array> result
*/
public function renderGrid ($value = null, $owner = null)
public function renderGrid($value = null, $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
return $this->render( $value, $owner );
}
@@ -4046,7 +4042,7 @@ class XmlForm_Field_CheckGroupView extends XmlForm_Field
* @param string value
* @return string
*/
public function render ($value = null)
public function render($value = null, $paramDummy2 = null)
{
$html = '';
foreach ($this->option as $optionName => $option) {
@@ -4125,7 +4121,7 @@ class XmlForm_Field_Grid extends XmlForm_Field
* @return <Template Object>
*/
public function render ($values, $owner = null)
public function render($values = null, $owner = null)
{
$emptyRow = $this->setScrollStyle( $owner );
return $this->renderGrid( $emptyRow, $owner );
@@ -4140,7 +4136,7 @@ class XmlForm_Field_Grid extends XmlForm_Field
* @param string values
* @return string
*/
public function renderGrid ($values, $owner = null, $therow = -1)
public function renderGrid($values = array(), $owner = null, $therow = -1, $paramDummy4 = null)
{
$this->id = $this->owner->id . $this->name;
$using_template = 'grid';
@@ -4396,7 +4392,7 @@ class XmlForm_Field_JavaScript extends XmlForm_Field
* @param string owner
* @return string
*/
public function renderGrid ($value, $owner)
public function renderGrid($values = null, $owner = null, $paramDummy3 = null, $paramDummy4 = null)
{
return array ('');
}
@@ -4571,7 +4567,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
* @param $onlyValue
* @return Array $result
*/
public function renderGrid ($values = null, $owner = null, $onlyValue = false)
public function renderGrid($values = null, $owner = null, $onlyValue = false, $paramDummy4 = null)
{
$this->gridFieldType = 'date';
$result = array ();
@@ -4999,7 +4995,7 @@ class XmlForm_Field_Date5 extends XmlForm_Field_SimpleText
* @param $onlyValue
* @return Array $result
*/
public function renderGrid ($values = null, $owner = null, $onlyValue = false)
public function renderGrid($values = null, $owner = null, $onlyValue = false, $paramDummy4 = null)
{
$result = array ();
$r = 1;
@@ -5331,7 +5327,7 @@ class XmlForm_Field_Xmlform extends XmlForm_Field
* @param string values
* @return string
*/
public function render ($values)
public function render($values = null, $paramDummy2 = null)
{
$html = '';
foreach ($this->fields as $f => $v) {
@@ -5668,7 +5664,7 @@ class XmlForm_Field_Image extends XmlForm_Field
* @param string values
* @return string
*/
public function render ($value, $owner = null)
public function render($value = null, $owner = null)
{
$url = G::replaceDataField($this->file, $owner->values);
if ($this->home === "methods") {
@@ -5804,4 +5800,5 @@ if (!function_exists('strptime')) {
);
return $ret;
}
}
}

View File

@@ -112,7 +112,7 @@ class XmlForm_Field_DVEditor extends XmlForm_Field
*
* @return string '<div> ... </div>'
*/
public function render($value, $owner = null)
public function render($value = null, $owner = null)
{
return '<div style="width:' . htmlentities($this->width, ENT_QUOTES, 'utf-8') . ';height:' . htmlentities($this->height, ENT_QUOTES, 'utf-8') . '"><input id="form[' . $this->name . ']" name="form[' . $this->name . ']" type="hidden" value="' . htmlentities($value, ENT_QUOTES, 'UTF-8') . '"/></div>';
}

View File

@@ -41,6 +41,20 @@ if (!defined('PATH_HOME')) {
require_once (PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php');
require_once PATH_TRUNK . "framework/src/Maveriks/Util/ClassLoader.php";
//Class Loader - /ProcessMaker/BusinessModel
$classLoader = \Maveriks\Util\ClassLoader::getInstance();
$classLoader->add(PATH_TRUNK . "framework" . PATH_SEP . "src" . PATH_SEP, "Maveriks");
$classLoader->add(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "src" . PATH_SEP, "ProcessMaker");
$classLoader->add(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "src" . PATH_SEP);
//Add vendors to autoloader
//$classLoader->add(PATH_TRUNK . "vendor" . PATH_SEP . "luracast" . PATH_SEP . "restler" . PATH_SEP . "vendor", "Luracast");
//$classLoader->add(PATH_TRUNK . "vendor" . PATH_SEP . "bshaffer" . PATH_SEP . "oauth2-server-php" . PATH_SEP . "src" . PATH_SEP, "OAuth2");
$classLoader->addClass("Bootstrap", PATH_TRUNK . "gulliver" . PATH_SEP . "system" . PATH_SEP . "class.bootstrap.php");
//$classLoader->addModelClassPath(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP);
//Load classes
G::LoadThirdParty('pear/json','class.json');
G::LoadThirdParty('smarty/libs','Smarty.class');
G::LoadSystem('error');
@@ -87,7 +101,7 @@ if (!defined('PATH_HOME')) {
define ('TIME_ZONE', $config['time_zone']);
}
require_once (PATH_GULLIVER . PATH_SEP . 'class.bootstrap.php');
//require_once (PATH_GULLIVER . PATH_SEP . 'class.bootstrap.php');
//define( 'PATH_GULLIVER_HOME', PATH_TRUNK . 'gulliver' . PATH_SEP );
spl_autoload_register(array('Bootstrap', 'autoloadClass'));
@@ -339,7 +353,13 @@ Bootstrap::registerClass('wsResponse', PATH_HOME . "engine/classes/clas
Bootstrap::registerClass('PMLicensedFeatures', PATH_HOME . "engine/classes/class.LicensedFeatures.php");
Bootstrap::registerClass('AddonsManagerPeer', PATH_HOME . "engine/classes/model/AddonsManagerPeer.php");
G::LoadClass("dates");
Bootstrap::registerClass("BaseEmailServer", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "om" . PATH_SEP . "BaseEmailServer.php");
Bootstrap::registerClass("EmailServer", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "EmailServer.php");
Bootstrap::registerClass("BaseEmailServerPeer", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "om" . PATH_SEP . "BaseEmailServerPeer.php");
Bootstrap::registerClass("EmailServerPeer", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "EmailServerPeer.php");
G::LoadClass("serverConfiguration");
G::LoadClass("dates"); //Load Criteria
if (!defined('SYS_SYS')) {
$sObject = $argv[1];
@@ -382,25 +402,28 @@ if (!defined('SYS_SYS')) {
eprintln("WARNING! No server info found!", 'red');
}
$sContent = file_get_contents(PATH_DB . $sObject . PATH_SEP . 'db.php');
//DB
$phpCode = "";
$sContent = str_replace('<?php', '', $sContent);
$sContent = str_replace('<?', '', $sContent);
$sContent = str_replace('?>', '', $sContent);
$sContent = str_replace('define', '', $sContent);
$sContent = str_replace("('", "$", $sContent);
$sContent = str_replace("',", '=', $sContent);
$sContent = str_replace(");", ';', $sContent);
$fileDb = fopen(PATH_DB . $sObject . PATH_SEP . "db.php", "r");
eval($sContent);
if ($fileDb) {
while (!feof($fileDb)) {
$buffer = fgets($fileDb, 4096); //Read a line
$dsn = $DB_ADAPTER . '://' . $DB_USER . ':' . $DB_PASS . '@' . $DB_HOST . '/' . $DB_NAME;
$phpCode .= preg_replace("/define\s*\(\s*[\x22\x27](.*)[\x22\x27]\s*,\s*(\x22.*\x22|\x27.*\x27)\s*\)\s*;/i", "\$$1 = $2;", $buffer);
}
$dsnRbac = $DB_ADAPTER . '://' . $DB_RBAC_USER . ':' . $DB_RBAC_PASS . '@' . $DB_RBAC_HOST . '/';
$dsnRbac = $dsnRbac . $DB_RBAC_NAME;
fclose($fileDb);
}
$dsnRp = $DB_ADAPTER . '://' . $DB_REPORT_USER . ':' . $DB_REPORT_PASS . '@' . $DB_REPORT_HOST . '/';
$dsnRp = $dsnRp . $DB_REPORT_NAME;
$phpCode = str_replace(array("<?php", "<?", "?>"), array("", "", ""), $phpCode);
eval($phpCode);
$dsn = $DB_ADAPTER . "://" . $DB_USER . ":" . $DB_PASS . "@" . $DB_HOST . "/" . $DB_NAME;
$dsnRbac = $DB_ADAPTER . "://" . $DB_RBAC_USER . ":" . $DB_RBAC_PASS . "@" . $DB_RBAC_HOST . "/" . $DB_RBAC_NAME;
$dsnRp = $DB_ADAPTER . "://" . $DB_REPORT_USER . ":" . $DB_REPORT_PASS . "@" . $DB_REPORT_HOST . "/" . $DB_REPORT_NAME;
switch ($DB_ADAPTER) {
case 'mysql':
@@ -547,7 +570,7 @@ function resendEmails()
setExecutionResultMessage("WITH ERRORS", "error");
eprintln(" '-" . $e->getMessage(), "red");
}
saveLog("resendEmails", "error", "Error Resending Emails: " . $e->getMessage());
}
}
@@ -1003,7 +1026,7 @@ function setExecutionResultMessage($m, $t='')
if ($t == 'info') {
$c = 'yellow';
}
if ($t == 'warning') {
$c = 'yellow';
}

View File

@@ -0,0 +1,139 @@
<?php
try {
//Set variables
$osIsLinux = strtoupper(substr(PHP_OS, 0, 3)) != "WIN";
//Defines constants
define("PATH_SEP", ($osIsLinux)? "/" : "\\");
$arrayPathToCron = array();
$flagPathToCron = false;
//Path to CRON by __FILE__
$arrayAux = explode(PATH_SEP, str_replace("engine" . PATH_SEP . "bin", "", dirname(__FILE__)));
array_pop($arrayAux);
if (count($arrayAux) > 0 && $arrayAux[count($arrayAux) - 1] == "workflow") {
$arrayPathToCron = $arrayAux;
$flagPathToCron = true;
}
if (!$flagPathToCron) {
throw new Exception("Error: Unable to execute the Message-Event CRON, the path is incorrect");
}
$pathHome = implode(PATH_SEP, $arrayPathToCron) . PATH_SEP;
array_pop($arrayPathToCron);
$pathTrunk = implode(PATH_SEP, $arrayPathToCron) . PATH_SEP;
array_pop($arrayPathToCron);
$pathOutTrunk = implode(PATH_SEP, $arrayPathToCron) . PATH_SEP;
define("PATH_HOME", $pathHome);
define("PATH_TRUNK", $pathTrunk);
define("PATH_OUTTRUNK", $pathOutTrunk);
//Include files
require_once(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths.php");
G::LoadClass("system");
$config = System::getSystemConfiguration();
ini_set("date.timezone", $config["time_zone"]);
//CRON command options
$arrayCommandOption = array(
"force" => "+force"
);
//CRON status
$flagIsRunning = false;
$lastExecution = "";
$processcTimeProcess = 0;
$processcTimeStart = 0;
$force = in_array($arrayCommandOption["force"], $argv);
if (!$force && file_exists(PATH_DATA . "messageeventcron")) {
//Windows flag
//Get data of CRON file
$arrayCron = unserialize(trim(file_get_contents(PATH_DATA . "messageeventcron")));
$flagIsRunning = (boolean)($arrayCron["flagIsRunning"]);
$lastExecution = $arrayCron["lastExecution"];
$processcTimeProcess = (isset($arrayCron["processcTimeProcess"]))? (int)($arrayCron["processcTimeProcess"]) : 10; //Minutes
$processcTimeStart = (isset($arrayCron["processcTimeStart"]))? $arrayCron["processcTimeStart"] : 0;
}
if (!$force && $osIsLinux) {
//Linux flag
//Check if CRON it's running
exec("ps -fea | grep messageeventcron.php | grep -v grep", $arrayOutput);
if (count($arrayOutput) > 1) {
$flagIsRunning = true;
}
}
if ($force || !$flagIsRunning) {
//Start CRON
$arrayCron = array("flagIsRunning" => "1", "lastExecution" => date("Y-m-d H:i:s"));
file_put_contents(PATH_DATA . "messageeventcron", serialize($arrayCron));
try {
$messageEventCronSinglePath = PATH_CORE . "bin" . PATH_SEP . "messageeventcron_single.php";
$workspace = "";
for ($i = 1; $i <= count($argv) - 1; $i++) {
if (preg_match("/^\+w(.+)$/", $argv[$i], $arrayMatch)) {
$workspace = $arrayMatch[1];
break;
}
}
$countw = 0;
if ($workspace == "") {
$d = dir(PATH_DB);
while (($entry = $d->read()) !== false) {
if ($entry != "" && $entry != "." && $entry != "..") {
if (is_dir(PATH_DB . $entry)) {
if (file_exists(PATH_DB . $entry . PATH_SEP . "db.php")) {
$countw++;
passthru("php -f \"$messageEventCronSinglePath\" $entry \"" . base64_encode(PATH_HOME) . "\" \"" . base64_encode(PATH_TRUNK) . "\" \"" . base64_encode(PATH_OUTTRUNK) . "\"");
}
}
}
}
} else {
$countw++;
passthru("php -f \"$messageEventCronSinglePath\" $workspace \"" . base64_encode(PATH_HOME) . "\" \"" . base64_encode(PATH_TRUNK) . "\" \"" . base64_encode(PATH_OUTTRUNK) . "\"");
}
eprintln("Finished $countw workspaces processed");
} catch (Exception $e) {
throw $e;
}
//End CRON
$arrayCron = array("flagIsRunning" => "0", "lastExecution" => date("Y-m-d H:i:s"));
file_put_contents(PATH_DATA . "messageeventcron", serialize($arrayCron));
} else {
eprintln("The Message-Event CRON is running, please wait for it to finish\nStarted in $lastExecution");
eprintln("If do you want force the execution use the option \"" . $arrayCommandOption["force"] . "\", example: php -f messageeventcron.php +wworkflow " . $arrayCommandOption["force"] ,"green");
}
echo "Done!\n";
} catch (Exception $e) {
echo $e->getMessage() . "\n";
}

View File

@@ -0,0 +1,227 @@
<?php
ini_set("memory_limit", "512M");
try {
//Verify data
if (count($argv) != 5) {
throw new Exception("Error: Invalid number of arguments");
}
for ($i = 2; $i <= count($argv) - 1; $i++) {
$argv[$i] = base64_decode($argv[$i]);
if (!is_dir($argv[$i])) {
throw new Exception("Error: The path \"" . $argv[$i] . "\" is invalid");
}
}
//Set variables
$osIsLinux = strtoupper(substr(PHP_OS, 0, 3)) != "WIN";
$pathHome = $argv[2];
$pathTrunk = $argv[3];
$pathOutTrunk = $argv[4];
//Defines constants
define("PATH_SEP", ($osIsLinux)? "/" : "\\");
define("PATH_HOME", $pathHome);
define("PATH_TRUNK", $pathTrunk);
define("PATH_OUTTRUNK", $pathOutTrunk);
define("PATH_CLASSES", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP);
define("SYS_LANG", "en");
require_once(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths.php");
require_once(PATH_TRUNK . "framework" . PATH_SEP . "src" . PATH_SEP . "Maveriks" . PATH_SEP . "Util" . PATH_SEP . "ClassLoader.php");
//Class Loader - /ProcessMaker/BusinessModel
$classLoader = \Maveriks\Util\ClassLoader::getInstance();
$classLoader->add(PATH_TRUNK . "framework" . PATH_SEP . "src" . PATH_SEP, "Maveriks");
$classLoader->add(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "src" . PATH_SEP, "ProcessMaker");
$classLoader->add(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "src" . PATH_SEP);
//Add vendors to autoloader
//$classLoader->add(PATH_TRUNK . "vendor" . PATH_SEP . "luracast" . PATH_SEP . "restler" . PATH_SEP . "vendor", "Luracast");
//$classLoader->add(PATH_TRUNK . "vendor" . PATH_SEP . "bshaffer" . PATH_SEP . "oauth2-server-php" . PATH_SEP . "src" . PATH_SEP, "OAuth2");
$classLoader->addClass("Bootstrap", PATH_TRUNK . "gulliver" . PATH_SEP . "system" . PATH_SEP . "class.bootstrap.php");
$classLoader->addModelClassPath(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP);
//Load classes
G::LoadThirdParty("pear/json", "class.json");
G::LoadThirdParty("smarty/libs", "Smarty.class");
G::LoadSystem("error");
G::LoadSystem("dbconnection");
G::LoadSystem("dbsession");
G::LoadSystem("dbrecordset");
G::LoadSystem("dbtable");
G::LoadSystem("rbac" );
G::LoadSystem("publisher");
G::LoadSystem("templatePower");
G::LoadSystem("xmlDocument");
G::LoadSystem("xmlform");
G::LoadSystem("xmlformExtension");
G::LoadSystem("form");
G::LoadSystem("menu");
G::LoadSystem("xmlMenu");
G::LoadSystem("dvEditor");
G::LoadSystem("table");
G::LoadSystem("pagedTable");
G::LoadClass("system");
require_once("propel/Propel.php");
require_once("creole/Creole.php");
$config = System::getSystemConfiguration();
$e_all = (defined("E_DEPRECATED"))? E_ALL & ~E_DEPRECATED : E_ALL;
$e_all = (defined("E_STRICT"))? $e_all & ~E_STRICT : $e_all;
$e_all = ($config["debug"])? $e_all : $e_all & ~E_NOTICE;
//Do not change any of these settings directly, use env.ini instead
ini_set("display_errors", $config["debug"]);
ini_set("error_reporting", $e_all);
ini_set("short_open_tag", "On");
ini_set("default_charset", "UTF-8");
//ini_set("memory_limit", $config["memory_limit"]);
ini_set("soap.wsdl_cache_enabled", $config["wsdl_cache"]);
ini_set("date.timezone", $config["time_zone"]);
define("DEBUG_SQL_LOG", $config["debug_sql"]);
define("DEBUG_TIME_LOG", $config["debug_time"]);
define("DEBUG_CALENDAR_LOG", $config["debug_calendar"]);
define("MEMCACHED_ENABLED", $config["memcached"]);
define("MEMCACHED_SERVER", $config["memcached_server"]);
define("TIME_ZONE", $config["time_zone"]);
//require_once(PATH_GULLIVER . PATH_SEP . "class.bootstrap.php");
//define("PATH_GULLIVER_HOME", PATH_TRUNK . "gulliver" . PATH_SEP);
spl_autoload_register(array("Bootstrap", "autoloadClass"));
//DATABASE propel classes used in "Cases" Options
Bootstrap::registerClass("PMLicensedFeatures", PATH_CLASSES . "class.licensedFeatures.php");
Bootstrap::registerClass("calendar", PATH_CLASSES . "class.calendar.php");
Bootstrap::registerClass("wsResponse", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.wsResponse.php");
G::LoadClass("processes");
G::LoadClass("derivation");
G::LoadClass("dates"); //Load Criteria
//Workflow
$workflow = $argv[1];
if (is_dir(PATH_DB . $workflow) && file_exists(PATH_DB . $workflow . PATH_SEP . "db.php")) {
define("SYS_SYS", $workflow);
include_once(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths_installed.php");
include_once(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths.php");
//PM Paths DATA
define("PATH_DATA_SITE", PATH_DATA . "sites/" . SYS_SYS . "/");
define("PATH_DOCUMENT", PATH_DATA_SITE . "files/");
define("PATH_DATA_MAILTEMPLATES", PATH_DATA_SITE . "mailTemplates/");
define("PATH_DATA_PUBLIC", PATH_DATA_SITE . "public/");
define("PATH_DATA_REPORTS", PATH_DATA_SITE . "reports/");
define("PATH_DYNAFORM", PATH_DATA_SITE . "xmlForms/");
define("PATH_IMAGES_ENVIRONMENT_FILES", PATH_DATA_SITE . "usersFiles" . PATH_SEP);
define("PATH_IMAGES_ENVIRONMENT_USERS", PATH_DATA_SITE . "usersPhotographies" . PATH_SEP);
if (is_file(PATH_DATA_SITE.PATH_SEP . ".server_info")) {
$SERVER_INFO = file_get_contents(PATH_DATA_SITE.PATH_SEP.".server_info");
$SERVER_INFO = unserialize($SERVER_INFO);
define("SERVER_NAME", $SERVER_INFO ["SERVER_NAME"]);
define("SERVER_PORT", $SERVER_INFO ["SERVER_PORT"]);
} else {
eprintln("WARNING! No server info found!", "red");
}
//DB
$phpCode = "";
$fileDb = fopen(PATH_DB . $workflow . PATH_SEP . "db.php", "r");
if ($fileDb) {
while (!feof($fileDb)) {
$buffer = fgets($fileDb, 4096); //Read a line
$phpCode .= preg_replace("/define\s*\(\s*[\x22\x27](.*)[\x22\x27]\s*,\s*(\x22.*\x22|\x27.*\x27)\s*\)\s*;/i", "\$$1 = $2;", $buffer);
}
fclose($fileDb);
}
$phpCode = str_replace(array("<?php", "<?", "?>"), array("", "", ""), $phpCode);
eval($phpCode);
$dsn = $DB_ADAPTER . "://" . $DB_USER . ":" . $DB_PASS . "@" . $DB_HOST . "/" . $DB_NAME;
$dsnRbac = $DB_ADAPTER . "://" . $DB_RBAC_USER . ":" . $DB_RBAC_PASS . "@" . $DB_RBAC_HOST . "/" . $DB_RBAC_NAME;
$dsnRp = $DB_ADAPTER . "://" . $DB_REPORT_USER . ":" . $DB_REPORT_PASS . "@" . $DB_REPORT_HOST . "/" . $DB_REPORT_NAME;
switch ($DB_ADAPTER) {
case "mysql":
$dsn .= "?encoding=utf8";
$dsnRbac .= "?encoding=utf8";
break;
case "mssql":
//$dsn .= "?sendStringAsUnicode=false";
//$dsnRbac .= "?sendStringAsUnicode=false";
break;
default:
break;
}
$pro = array();
$pro["datasources"]["workflow"]["connection"] = $dsn;
$pro["datasources"]["workflow"]["adapter"] = $DB_ADAPTER;
$pro["datasources"]["rbac"]["connection"] = $dsnRbac;
$pro["datasources"]["rbac"]["adapter"] = $DB_ADAPTER;
$pro["datasources"]["rp"]["connection"] = $dsnRp;
$pro["datasources"]["rp"]["adapter"] = $DB_ADAPTER;
//$pro["datasources"]["dbarray"]["connection"] = "dbarray://user:pass@localhost/pm_os";
//$pro["datasources"]["dbarray"]["adapter"] = "dbarray";
$oFile = fopen(PATH_CORE . "config" . PATH_SEP . "_databases_.php", "w");
fwrite($oFile, "<?php global \$pro; return \$pro; ?>");
fclose($oFile);
Propel::init(PATH_CORE . "config" . PATH_SEP . "_databases_.php");
//Creole::registerDriver("dbarray", "creole.contrib.DBArrayConnection");
//Enable RBAC
Bootstrap::LoadSystem("rbac");
$rbac = &RBAC::getSingleton(PATH_DATA, session_id());
$rbac->sSystem = "PROCESSMAKER";
if (!defined("DB_ADAPTER")) {
define("DB_ADAPTER", $DB_ADAPTER);
}
eprintln("Processing workspace: " . $workflow, "green");
try {
$case = new \ProcessMaker\BusinessModel\Cases();
$case->catchMessageEvent(true);
} catch (Exception $e) {
echo $e->getMessage() . "\n";
eprintln("Problem in workspace: " . $workflow . " it was omitted.", "red");
}
eprintln();
}
if (file_exists(PATH_CORE . "config" . PATH_SEP . "_databases_.php")) {
unlink(PATH_CORE . "config" . PATH_SEP . "_databases_.php");
}
} catch (Exception $e) {
echo $e->getMessage() . "\n";
}

View File

@@ -21,7 +21,7 @@ EOT
/*----------------------------------********---------------------------------*/
CLI::taskName('change-password-hash-method');
CLI::taskDescription(<<<EOT
Create .po file for the plugin
Change password hash method to md5 or sha256 for the specified workspace
EOT
);
CLI::taskArg('workspace', false);

View File

@@ -338,8 +338,8 @@ function database_upgrade($command, $args) {
$arrayData["MESS_RAUTH"] = (int)($emailConfiguration["MESS_RAUTH"]);
$arrayData["MESS_ACCOUNT"] = $emailConfiguration["MESS_ACCOUNT"];
$arrayData["MESS_PASSWORD"] = $emailConfiguration["MESS_PASSWORD"];
$arrayData["MESS_FROM_MAIL"] = $emailConfiguration["MESS_FROM_MAIL"];
$arrayData["MESS_FROM_NAME"] = $emailConfiguration["MESS_FROM_NAME"];
$arrayData["MESS_FROM_MAIL"] = isset($emailConfiguration["MESS_FROM_MAIL"]) ? $emailConfiguration["MESS_FROM_MAIL"] : "";
$arrayData["MESS_FROM_NAME"] = isset($emailConfiguration["MESS_FROM_NAME"]) ? $emailConfiguration["MESS_FROM_NAME"] : "";
$arrayData["SMTPSECURE"] = $emailConfiguration["SMTPSecure"];
$arrayData["MESS_TRY_SEND_INMEDIATLY"] = (int)($emailConfiguration["MESS_TRY_SEND_INMEDIATLY"]);
$arrayData["MAIL_TO"] = $emailConfiguration["MAIL_TO"];

View File

@@ -61,6 +61,7 @@ class Applications
$confCasesList = $conf->getConfiguration("casesList", ($action == "search" || $action == "simple_search")? "search" : $action);
$oAppCache->confCasesList = $confCasesList;
}
// get the action based list
switch ($action) {
case "draft":
@@ -118,7 +119,7 @@ class Applications
case "COMPLETED":
$Criteria = $oAppCache->getCompletedListCriteria($userUid);
$CriteriaCount = $oAppCache->getCompletedCountCriteria($userUid);
$Criteria->add (AppCacheViewPeer::DEL_LAST_INDEX,"1");
$CriteriaCount->add (AppCacheViewPeer::DEL_LAST_INDEX,"1");
break;
@@ -161,6 +162,14 @@ class Applications
break;
}
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
$Criteria->addJoin(AppCacheViewPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$Criteria->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$CriteriaCount->addJoin(AppCacheViewPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$CriteriaCount->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$Criteria->addAlias( 'CU', 'USERS' );
$Criteria->addJoin( AppCacheViewPeer::USR_UID, 'CU.USR_UID', Criteria::LEFT_JOIN );
$Criteria->addAsColumn( 'USR_UID', 'CU.USR_UID' );

View File

@@ -414,7 +414,7 @@ class calendar extends CalendarDefinition
$hoursDuration -= (float)($secondRes/3600);
//$dataLog[] = (float)($secondRes/3600);
} else {
$newDate = date('Y-m-d H:i:s', strtotime('+' . (((float)$hoursDuration)*3600) . ' seconds', strtotime($newDate)));
$newDate = date("Y-m-d H:i:s", strtotime("+" . round(((float)($hoursDuration)) * 3600) . " seconds", strtotime($newDate)));
//$dataLog[] = (float)($hoursDuration);
$hoursDuration = 0;
}
@@ -797,4 +797,4 @@ class calendar extends CalendarDefinition
}
}
?>
?>

View File

@@ -249,6 +249,8 @@ class Cases
$rows[] = array('uid' => 'char', 'value' => 'char');
$tasks = array();
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
$c = new Criteria();
$c->clearSelectColumns();
$c->addSelectColumn(TaskPeer::TAS_UID);
@@ -256,7 +258,7 @@ class Cases
$c->addJoin(TaskPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN);
$c->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN);
$c->add(ProcessPeer::PRO_STATUS, 'ACTIVE');
$c->add(TaskPeer::TAS_TYPE, "WEBENTRYEVENT", Criteria::NOT_EQUAL);
$c->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$c->add(TaskPeer::TAS_START, 'TRUE');
$c->add(TaskUserPeer::USR_UID, $sUIDUser);
@@ -282,7 +284,7 @@ class Cases
$c->addJoin(TaskPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN);
$c->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN);
$c->add(ProcessPeer::PRO_STATUS, 'ACTIVE');
$c->add(TaskPeer::TAS_TYPE, "WEBENTRYEVENT", Criteria::NOT_EQUAL);
$c->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$c->add(TaskPeer::TAS_START, 'TRUE');
$c->add(TaskUserPeer::USR_UID, $aGroups, Criteria::IN);
@@ -1058,6 +1060,14 @@ class Cases
$appAssignSelfServiceValue->remove($sAppUid);
}
/*----------------------------------********---------------------------------*/
if(!isset($Fields['DEL_INDEX'])){
$Fields['DEL_INDEX'] = 1;
}
$inbox = new ListInbox();
$inbox->update($Fields);
/*----------------------------------********---------------------------------*/
//Return
return $Fields;
@@ -1188,8 +1198,10 @@ class Cases
$oAppDel = AppDelegationPeer::retrieveByPk($sAppUid, $iDelIndex);
$oAppDel->setDelInitDate("now");
$oAppDel->save();
/*----------------------------------********---------------------------------*/
$inbox = new ListInbox();
$inbox->update(array('APP_UID'=>$sAppUid, 'DEL_INDEX'=>$iDelIndex, 'DEL_INIT_DATE'=>Date("Y-m-d H:i:s")));
/*----------------------------------********---------------------------------*/
//update searchindex
if ($this->appSolr != null) {
$this->appSolr->updateApplicationSearchIndex($sAppUid);
@@ -1909,8 +1921,16 @@ class Cases
throw (new PropelException('The row cannot be created!', new PropelException($msg)));
}
}
/*----------------------------------********---------------------------------*/
$inbox = new ListInbox();
$inbox->remove($sAppUid, $iDelIndex);
$data['DEL_THREAD_STATUS'] = 'CLOSED';
$data['APP_UID'] = $sAppUid;
$data['DEL_INDEX'] = $iDelIndex;
$data['USR_UID'] = $appDel->getUsrUid();
$listParticipatedLast = new ListParticipatedLast();
$listParticipatedLast->refresh($data);
/*----------------------------------********---------------------------------*/
} catch (exception $e) {
throw ($e);
}
@@ -3906,6 +3926,18 @@ class Cases
}
$this->getExecuteTriggerProcess($sApplicationUID, 'PAUSED');
/*----------------------------------********---------------------------------*/
$data = array (
'APP_UID' => $sApplicationUID,
'DEL_INDEX' => $iDelegation,
'USR_UID' => $sUserUID,
'APP_RESTART_DATE' => $sUnpauseDate
);
$data = array_merge($aFields, $data);
$oListPaused = new ListPaused();
$oListPaused->create($data);
/*----------------------------------********---------------------------------*/
}
/*
@@ -3996,6 +4028,11 @@ class Cases
}
$this->getExecuteTriggerProcess($sApplicationUID, "UNPAUSE");
/*----------------------------------********---------------------------------*/
$oListPaused = new ListPaused();
$oListPaused->remove($sApplicationUID, $iDelegation, true);
/*----------------------------------********---------------------------------*/
}
/*
@@ -4080,6 +4117,16 @@ class Cases
if ($this->appSolr != null) {
$this->appSolr->updateApplicationSearchIndex($sApplicationUID);
}
/*----------------------------------********---------------------------------*/
$data = array (
'APP_UID' => $sApplicationUID,
'DEL_INDEX' => $iIndex,
'USR_UID' => $user_logged
);
$data = array_merge($aFields, $data);
$oListCanceled = new ListCanceled();
$oListCanceled->create($data);
/*----------------------------------********---------------------------------*/
}
/*

View File

@@ -1,5 +1,6 @@
<?php
/**
* class.configuration.php
*
@@ -373,10 +374,15 @@ class Configurations // extends Configuration
*/
public function getFormats()
{
$this->UserConfig = array();
if (!isset($this->UserConfig)) {
$this->UserConfig = array();
}
if (empty($this->UserConfig)) {
$this->UserConfig = $this->getConfiguration("ENVIRONMENT_SETTINGS", "");
}
if (is_numeric($this->UserConfig)) {
$this->UserConfig = array();
}
//Setting defaults
if (!isset($this->UserConfig["format"])) {
@@ -649,7 +655,7 @@ class Configurations // extends Configuration
* @param string $translation Translation
* @return array Return the fields and configuration
*
*/
*/
public function casesListDefaultFieldsAndConfig($action, $translation = 1)
{
$caseColumns = array();
@@ -772,7 +778,7 @@ class Configurations // extends Configuration
$caseColumns[] = array("header" => ($translation == 1) ? G::LoadTranslation("ID_TASK") : "ID_TASK", "dataIndex" => "APP_TAS_TITLE", "width" => 120);
$caseColumns[] = array("header" => ($translation == 1) ? G::LoadTranslation("ID_CURRENT_USER") : "ID_CURRENT_USER", "dataIndex" => "APP_CURRENT_USER", "width" => 120, "sortable" => true);
$caseColumns[] = array("header" => ($translation == 1) ? G::LoadTranslation("ID_LAST_MODIFY") : "ID_LAST_MODIFY", "dataIndex" => "APP_UPDATE_DATE", "width" => 80);
$caseColumns[] = array("header" => ($translation == 1) ? G::LoadTranslation("ID_STATUS") : "ID_STATUS", "dataIndex" => "APP_STATUS_LABEL", "width" => 50);
$caseColumns[] = array("header" => ($translation == 1) ? G::LoadTranslation("ID_DEL_THREAD_STATUS") : "ID_DEL_THREAD_STATUS", "dataIndex" => "DEL_THREAD_STATUS", "width" => 50);
$caseReaderFields[] = array("name" => "APP_UID");
$caseReaderFields[] = array("name" => "USR_UID");
@@ -791,7 +797,7 @@ class Configurations // extends Configuration
$caseReaderFields[] = array("name" => "DEL_TASK_DUE_DATE");
$caseReaderFields[] = array("name" => "APP_UPDATE_DATE");
$caseReaderFields[] = array("name" => "DEL_PRIORITY");
$caseReaderFields[] = array("name" => "APP_STATUS_LABEL");
$caseReaderFields[] = array("name" => "DEL_THREAD_STATUS");
$caseReaderFields[] = array("name" => "APP_FINISH_DATE");
$caseReaderFields[] = array("name" => "CASE_SUMMARY");
$caseReaderFields[] = array("name" => "CASE_NOTES_COUNT");

View File

@@ -112,7 +112,7 @@ class Derivation
$arrayTaskData["NEXT_TASK"]["TAS_PARENT"] = "";
}
$arrayTaskData["NEXT_TASK"]["USER_ASSIGNED"] = ($arrayTaskData["NEXT_TASK"]["TAS_TYPE"] != "GATEWAYTOGATEWAY")? $this->getNextAssignedUser($arrayTaskData) : array("USR_UID" => "");
$arrayTaskData["NEXT_TASK"]["USER_ASSIGNED"] = (!in_array($arrayTaskData["NEXT_TASK"]["TAS_TYPE"], array("GATEWAYTOGATEWAY", "END-MESSAGE-EVENT")))? $this->getNextAssignedUser($arrayTaskData) : array("USR_UID" => "");
}
//Return
@@ -176,12 +176,14 @@ class Derivation
}
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$flagDefault = false;
while ($rsCriteria->next()) {
$arrayRouteData = G::array_merges($rsCriteria->getRow(), $arrayData);
if ((int)($arrayRouteData["ROU_DEFAULT"]) == 1) {
$arrayNextTaskDefault = $arrayRouteData;
$flagDefault = true;
continue;
}
$flagContinue = true;
@@ -205,7 +207,6 @@ class Derivation
$flagContinue = false;
}
}
if ($arrayRouteData["ROU_TYPE"] == "EVALUATE" && count($arrayNextTask) > 0) {
$flagContinue = false;
}
@@ -214,33 +215,46 @@ class Derivation
$arrayNextTask[++$i] = $this->prepareInformationTask($arrayRouteData);
}
}
if (count($arrayNextTask) == 0 && count($arrayNextTaskDefault) > 0) {
$arrayNextTask[++$i] = $this->prepareInformationTask($arrayNextTaskDefault);
}
//Check Task GATEWAYTOGATEWAY
$arrayNextTaskBk = $arrayNextTask;
//Check Task GATEWAYTOGATEWAY or END-MESSAGE-EVENT
$arrayNextTaskBackup = $arrayNextTask;
$arrayNextTask = array();
$i = 0;
foreach ($arrayNextTaskBk as $value) {
foreach ($arrayNextTaskBackup as $value) {
$arrayNextTaskData = $value;
if ($arrayNextTaskData["NEXT_TASK"]["TAS_UID"] != "-1" && $arrayNextTaskData["NEXT_TASK"]["TAS_TYPE"] == "GATEWAYTOGATEWAY") {
if ($arrayNextTaskData["NEXT_TASK"]["TAS_UID"] != "-1" &&
in_array($arrayNextTaskData["NEXT_TASK"]["TAS_TYPE"], array("GATEWAYTOGATEWAY", "END-MESSAGE-EVENT"))
) {
$arrayAux = $this->prepareInformation($arrayData, $arrayNextTaskData["NEXT_TASK"]["TAS_UID"]);
foreach ($arrayAux as $value2) {
$arrayNextTask[++$i] = $value2;
}
} else {
if ($arrayNextTaskData["TAS_TYPE"] == "END-MESSAGE-EVENT" &&
$arrayNextTaskData["NEXT_TASK"]["TAS_UID"] == "-1"
) {
$arrayNextTaskData["NEXT_TASK"]["TAS_UID"] = $arrayNextTaskData["TAS_UID"] . "/" . $arrayNextTaskData["NEXT_TASK"]["TAS_UID"];
}
$arrayNextTask[++$i] = $arrayNextTaskData;
}
}
//1. There is no rule
if (count($arrayNextTask) == 0) {
$oProcess = new Process();
$oProcessFieds = $oProcess->Load( $_SESSION['PROCESS'] );
if(isset($oProcessFieds['PRO_BPMN']) && $oProcessFieds['PRO_BPMN'] == 1){
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_BPMN_RULE"));
}else{
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_RULE"));
}
}
//Return
@@ -580,6 +594,12 @@ class Derivation
//Count how many tasks should be derivated.
//$countNextTask = count($nextDelegations);
foreach ($nextDelegations as $nextDel) {
//BpmnEvent - END-MESSAGE-EVENT - Check and get unique id
if (preg_match("/^(.{32})\/(\-1)$/", $nextDel["TAS_UID"], $arrayMatch)) {
$nextDel["TAS_UID"] = $arrayMatch[2];
$nextDel["TAS_UID_DUMMY"] = $arrayMatch[1];
}
//subprocesses??
if ($nextDel['TAS_PARENT'] != '') {
$oCriteria = new Criteria( 'workflow' );
@@ -618,6 +638,17 @@ class Derivation
$this->case->closeAllDelegations( $currentDelegation['APP_UID'] );
$this->case->closeAllThreads( $currentDelegation['APP_UID'] );
//I think we need to change the APP_STATUS to completed,
//Throw Message-Events - BpmnEvent - END-MESSAGE-EVENT
if (isset($nextDel["TAS_UID_DUMMY"])) {
$case = new \ProcessMaker\BusinessModel\Cases();
$case->throwMessageEventBetweenElementOriginAndElementDest(
$currentDelegation["TAS_UID"],
$nextDel["TAS_UID_DUMMY"],
$appFields
);
}
break;
case TASK_FINISH_TASK:
$iAppThreadIndex = $appFields['DEL_THREAD'];
@@ -673,11 +704,19 @@ class Derivation
}
} //end switch
if ($canDerivate) {
$aSP = isset( $aSP ) ? $aSP : null;
$iNewDelIndex = $this->doDerivation( $currentDelegation, $nextDel, $appFields, $aSP );
//Throw Message-Events
$case = new \ProcessMaker\BusinessModel\Cases();
$case->throwMessageEventBetweenElementOriginAndElementDest(
$currentDelegation["TAS_UID"],
$nextDel["TAS_UID"],
$appFields
);
//Create record in table APP_ASSIGN_SELF_SERVICE_VALUE
$task = new Task();
$arrayNextTaskData = $task->load($nextDel["TAS_UID"]);
@@ -824,8 +863,16 @@ class Derivation
foreach ($aFields as $sOriginField => $sTargetField) {
$sOriginField = str_replace( '@', '', $sOriginField );
$sOriginField = str_replace( '#', '', $sOriginField );
$sOriginField = str_replace( '%', '', $sOriginField );
$sOriginField = str_replace( '?', '', $sOriginField );
$sOriginField = str_replace( '$', '', $sOriginField );
$sOriginField = str_replace( '=', '', $sOriginField );
$sTargetField = str_replace( '@', '', $sTargetField );
$sTargetField = str_replace( '#', '', $sTargetField );
$sTargetField = str_replace( '%', '', $sTargetField );
$sTargetField = str_replace( '?', '', $sTargetField );
$sTargetField = str_replace( '$', '', $sTargetField );
$sTargetField = str_replace( '=', '', $sTargetField );
$aNewFields[$sTargetField] = isset( $appFields['APP_DATA'][$sOriginField] ) ? $appFields['APP_DATA'][$sOriginField] : '';
}
@@ -911,16 +958,30 @@ class Derivation
foreach ($aFields as $sOriginField => $sTargetField) {
$sOriginField = str_replace( '@', '', $sOriginField );
$sOriginField = str_replace( '#', '', $sOriginField );
$sOriginField = str_replace( '%', '', $sOriginField );
$sOriginField = str_replace( '?', '', $sOriginField );
$sOriginField = str_replace( '$', '', $sOriginField );
$sOriginField = str_replace( '=', '', $sOriginField );
$sTargetField = str_replace( '@', '', $sTargetField );
$sTargetField = str_replace( '#', '', $sTargetField );
$sTargetField = str_replace( '%', '', $sTargetField );
$sTargetField = str_replace( '?', '', $sTargetField );
$sTargetField = str_replace( '$', '', $sTargetField );
$sTargetField = str_replace( '=', '', $sTargetField );
$aNewFields[$sTargetField] = isset( $appFields['APP_DATA'][$sOriginField] ) ? $appFields['APP_DATA'][$sOriginField] : '';
}
$aParentCase['APP_DATA'] = array_merge( $aParentCase['APP_DATA'], $aNewFields );
$oCase->updateCase( $aSA['APP_PARENT'], $aParentCase );
/*----------------------------------********---------------------------------*/
$inbox = new ListInbox();
$inbox->update($aParentCase);
/*----------------------------------********---------------------------------*/
//Update table SUB_APPLICATION
$oSubApplication = new SubApplication();
$oSubApplication->update( array ('APP_UID' => $sApplicationUID,'APP_PARENT' => $aSA['APP_PARENT'],'DEL_INDEX_PARENT' => $aSA['DEL_INDEX_PARENT'],'DEL_THREAD_PARENT' => $aSA['DEL_THREAD_PARENT'],'SA_STATUS' => 'FINISHED','SA_VALUES_IN' => serialize( $aNewFields ),'SA_FINISH_DATE' => date( 'Y-m-d H:i:s' )
) );
//Derive the parent case
$aDeriveTasks = $this->prepareInformation( array ('USER_UID' => - 1,'APP_UID' => $aSA['APP_PARENT'],'DEL_INDEX' => $aSA['DEL_INDEX_PARENT']
) );

File diff suppressed because it is too large Load Diff

View File

@@ -213,7 +213,15 @@ class NET
}
$stat = new Stat();
$flagTns = (isset($arrayServerData["connectionType"]) && $arrayServerData["connectionType"] == "TNS")? 1 : 0;
if (array_key_exists("connectionType", $arrayServerData) || array_key_exists("DBS_TYPEORACLE", $arrayServerData)) {
if ($arrayServerData["connectionType"] == "TNS" || $arrayServerData["DBS_TYPEORACLE"] == "TNS") {
$flagTns=1;
}else{
$flagTns=0;
}
}else{
$flagTns=0;
}
if (isset($this->db_user) && (isset($this->db_passwd) || $this->db_passwd == "") && (isset($this->db_sourcename) || $flagTns == 1)) {
switch ($pDbDriver) {
@@ -323,7 +331,15 @@ class NET
set_time_limit( 0 );
$stat = new Stat();
$flagTns = (isset($arrayServerData["connectionType"]) && $arrayServerData["connectionType"] == "TNS")? 1 : 0;
if (array_key_exists("connectionType", $arrayServerData) || array_key_exists("DBS_TYPEORACLE", $arrayServerData)) {
if ($arrayServerData["connectionType"] == "TNS" || $arrayServerData["DBS_TYPEORACLE"] == "TNS") {
$flagTns=1;
}else{
$flagTns=0;
}
}else{
$flagTns=0;
}
if (isset($this->db_user) && (isset($this->db_passwd) || $this->db_passwd == "") && (isset($this->db_sourcename) || $flagTns == 1)) {
switch ($pDbDriver) {

View File

@@ -11,72 +11,25 @@ class pmDynaform
{
public static $instance = null;
private $debugMode = false;
public $dyn_uid = null;
public $record = null;
public $app_data = null;
public $credentials = null;
public $items = array();
public $data = array();
public $variables = array();
public $arrayFieldRequired = array();
public function __construct($dyn_uid, $app_data)
public function __construct($dyn_uid, $app_data = array())
{
$this->dyn_uid = $dyn_uid;
$this->app_data = $app_data;
$this->getDynaform();
//items
$dynContent = G::json_decode($this->record["DYN_CONTENT"]);
if (isset($dynContent->items)) {
$this->items = $dynContent->items[0]->items;
}
//data
$cases = new \ProcessMaker\BusinessModel\Cases();
$this->data = $cases->getCaseVariables($app_data["APPLICATION"]);
//variables
$this->variables = array();
$a = new Criteria("workflow");
$a->addSelectColumn(ProcessVariablesPeer::VAR_NAME);
$a->addSelectColumn(ProcessVariablesPeer::VAR_SQL);
$a->addSelectColumn(ProcessVariablesPeer::VAR_ACCEPTED_VALUES);
$a->addSelectColumn(ProcessVariablesPeer::VAR_DBCONNECTION);
$c3 = $a->getNewCriterion(ProcessVariablesPeer::VAR_ACCEPTED_VALUES, "", Criteria::ALT_NOT_EQUAL);
$c2 = $a->getNewCriterion(ProcessVariablesPeer::VAR_ACCEPTED_VALUES, "[]", Criteria::ALT_NOT_EQUAL);
$c2->addAnd($c3);
$c4 = $a->getNewCriterion(ProcessVariablesPeer::PRJ_UID, $this->app_data["PROCESS"], Criteria::EQUAL);
$c1 = $a->getNewCriterion(ProcessVariablesPeer::VAR_SQL, "", Criteria::ALT_NOT_EQUAL);
$c1->addOr($c2);
$c1->addAnd($c4);
$a->add($c1);
$ds = ProcessPeer::doSelectRS($a);
$ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($ds->next()) {
$row = $ds->getRow();
//options
$rows2 = json_decode($row["VAR_ACCEPTED_VALUES"]);
$n = count($rows2);
for ($i = 0; $i < $n; $i++) {
$rows2[$i] = array($rows2[$i]->keyValue, $rows2[$i]->value);
}
//query
$arrayVariable = array();
if ($row["VAR_DBCONNECTION"] !== "none") {
$cnn = Propel::getConnection($row["VAR_DBCONNECTION"]);
$stmt = $cnn->createStatement();
$rs = $stmt->executeQuery(\G::replaceDataField($row["VAR_SQL"], $arrayVariable), \ResultSet::FETCHMODE_NUM);
while ($rs->next()) {
array_push($rows2, $rs->getRow());
}
}
$this->variables[$row["VAR_NAME"]] = $rows2;
$this->getCredentials();
if (isset($app_data["APPLICATION"])) {
$cases = new \ProcessMaker\BusinessModel\Cases();
$this->data = $cases->getCaseVariables($app_data["APPLICATION"]);
}
}
@@ -96,84 +49,114 @@ class pmDynaform
$ds->next();
$row = $ds->getRow();
$this->record = isset($row) ? $row : null;
return $this->record;
}
private function searchValues($varName, $value)
public function getCredentials()
{
if (!$varName || !isset($this->variables[$varName])) {
return "";
}
$options = $this->variables[$varName];
foreach ($options as $valueOptions) {
if ($valueOptions[0] === $value) {
return $valueOptions[1];
}
if ($this->credentials != null) {
return $this->credentials;
}
$a = $this->clientToken();
$this->credentials = array(
"accessToken" => $a["access_token"],
"expiresIn" => $a["expires_in"],
"tokenType" => $a["token_type"],
"scope" => $a["scope"],
"refreshToken" => $a["refresh_token"],
"clientId" => $a["client_id"],
"clientSecret" => $a["client_secret"]
);
return $this->credentials;
}
private function mergeAppData($app_uid, &$items)
public function jsonr(&$json)
{
foreach ($items as $key => $value) {
if (is_array($items[$key])) {
$this->mergeAppData($app_uid, $items[$key]);
} else {
if (isset($items[$key]->name) && isset($this->data[$items[$key]->name])) {
if ($items[$key]->type === "grid") {
$rows = $this->data[$items[$key]->name];
foreach ($rows as $keyRow => $row) {
$newRow = array();
foreach ($row as $keyCelda => $celda) {
array_push($newRow, array(
"value" => $celda,
"label" => $this->searchValues($keyCelda, $celda)
));
}
$rows[$keyRow] = $newRow;
foreach ($json as $key => $value) {
$sw1 = is_array($value);
$sw2 = is_object($value);
if ($sw1 || $sw2) {
$this->jsonr($value);
}
if (!$sw1 && !$sw2) {
//property
$prefixs = array("@@", "@#", "@%", "@?", "@$", "@=");
if (is_string($value) && in_array(substr($value, 0, 2), $prefixs)) {
$triggerValue = substr($value, 2);
if (isset($this->app_data[$triggerValue])) {
$json->$key = $this->app_data[$triggerValue];
}
}
//query & options
if ($key === "type" && ($value === "text" || $value === "textarea" || $value === "dropdown" || $value === "suggest" || $value === "checkbox" || $value === "radio")) {
if (!isset($json->dbConnection))
$json->dbConnection = "none";
if (!isset($json->sql))
$json->sql = "";
if (!isset($json->options))
$json->options = array();
if ($json->dbConnection !== "none" && $json->sql !== "") {
$cnn = Propel::getConnection($json->dbConnection);
$stmt = $cnn->createStatement();
$rs = $stmt->executeQuery(\G::replaceDataField($json->sql, array()), \ResultSet::FETCHMODE_NUM);
while ($rs->next()) {
$row = $rs->getRow();
$option = array(
"label" => $row[1],
"value" => $row[0]
);
array_push($json->options, $option);
}
if (isset($json->options[0])) {
$json->data = $json->options[0];
}
$items[$key]->rows = count($rows);
$items[$key]->data = $rows;
}
if ($items[$key]->type !== "grid") {
$items[$key]->data = array(
"value" => $this->data[$items[$key]->name],
"label" => $this->searchValues($items[$key]->name, $this->data[$items[$key]->name])
);
}
}
if (isset($items[$key]->options) && isset($this->variables[$items[$key]->name])) {
$options = $this->variables[$items[$key]->name];
$n = count($options);
for ($i = 0; $i < $n; $i++) {
$options[$i] = array(
"value" => $options[$i][0],
"label" => $options[$i][1]
);
}
$items[$key]->options = $options;
//data
if ($key === "type" && ($value === "text" || $value === "textarea" || $value === "dropdown" || $value === "checkbox" || $value === "radio")) {
$json->data = array(
"value" => isset($this->data[$json->name]) ? $this->data[$json->name] : "",
"label" => isset($this->data[$json->name . "_label"]) ? $this->data[$json->name . "_label"] : ""
);
}
if (isset($items[$key]->columns)) {
$this->mergeAppData($app_uid, $items[$key]->columns);
if ($key === "type" && ($value === "suggest")) {
$json->data = array(
"value" => isset($this->data[$json->name . "_label"]) ? $this->data[$json->name . "_label"] : "",
"label" => isset($this->data[$json->name]) ? $this->data[$json->name] : ""
);
}
//grid
if ($key === "type" && ($value === "grid")) {
if (isset($this->data[$json->name])) {
//rows
$rows = $this->data[$json->name];
foreach ($rows as $keyRow => $row) {
//cells
$cells = array();
foreach ($json->columns as $column) {
//data
if ($column->type === "text" || $column->type === "textarea" || $column->type === "dropdown") {
array_push($cells, array(
"value" => isset($row[$column->name]) ? $row[$column->name] : "",
"label" => isset($row[$column->name . "_label"]) ? $row[$column->name . "_label"] : ""
));
}
if ($column->type === "suggest") {
array_push($cells, array(
"value" => isset($row[$column->name . "_label"]) ? $row[$column->name . "_label"] : "",
"label" => isset($row[$column->name]) ? $row[$column->name] : ""
));
}
}
$rows[$keyRow] = $cells;
}
$json->rows = count($rows);
$json->data = $rows;
}
}
}
}
}
public function mergeDynContentAppData($app_uid, &$items)
{
$dynContent = G::json_decode($this->record["DYN_CONTENT"]);
if (isset($dynContent->items)) {
$this->items = $dynContent->items[0]->items;
}
$this->mergeAppData($app_uid, $items);
$dynContent->items[0]->items = $this->items;
$a = G::json_encode($dynContent);
$a = str_replace("\/", "/", $a);
$this->record["DYN_CONTENT"] = $a;
}
public function isResponsive()
{
@@ -183,8 +166,9 @@ class pmDynaform
public function printView($pm_run_outside_main_app, $application)
{
ob_clean();
$this->mergeDynContentAppData($application, $this->items);
$json = G::json_decode($this->record["DYN_CONTENT"]);
$this->jsonr($json);
$a = $this->clientToken();
$clientToken = array(
"accessToken" => $a["access_token"],
@@ -195,50 +179,145 @@ class pmDynaform
"clientId" => $a["client_id"],
"clientSecret" => $a["client_secret"]
);
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/cases_Step_Pmdynaform_View.html');
$file = str_replace("{JSON_DATA}", $this->record["DYN_CONTENT"], $file);
$file = str_replace("{PM_RUN_OUTSIDE_MAIN_APP}", $pm_run_outside_main_app, $file);
$file = str_replace("{DYN_UID}", $this->dyn_uid, $file);
$file = str_replace("{DYNAFORMNAME}", $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"], $file);
$file = str_replace("{APP_UID}", $application, $file);
$file = str_replace("{PRJ_UID}", $this->app_data["PROCESS"], $file);
$file = str_replace("{WORKSPACE}", $this->app_data["SYS_SYS"], $file);
$file = str_replace("{credentials}", json_encode($clientToken), $file);
$javascrip = "" .
"<script type='text/javascript'>\n" .
"var jsondata = " . G::json_encode($json) . ";\n" .
"var pm_run_outside_main_app = '" . $pm_run_outside_main_app . "';\n" .
"var dyn_uid = '" . $this->dyn_uid . "';\n" .
"var __DynaformName__ = '" . $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"] . "';\n" .
"var app_uid = '" . $application . "';\n" .
"var prj_uid = '" . $this->app_data["PROCESS"] . "';\n" .
"var step_mode = null;\n" .
"var workspace = '" . $this->app_data["SYS_SYS"] . "';\n" .
"var credentials = " . G::json_encode($clientToken) . ";\n" .
"var filePost = null;\n" .
"var fieldsRequired = null;\n" .
"var triggerDebug = null;\n" .
"$(window).load(function () {\n" .
" var data = jsondata;\n" .
" data.items[0].mode = 'view';\n" .
" window.project = new PMDynaform.core.Project({\n" .
" data: data,\n" .
" keys: {\n" .
" server: location.host,\n" .
" projectId: prj_uid,\n" .
" workspace: workspace\n" .
" },\n" .
" token: credentials,\n" .
" submitRest: false\n" .
" });\n" .
" $(document).find('form').submit(function (e) {\n" .
" e.preventDefault();\n" .
" return false;\n" .
" });\n" .
"});\n" .
"</script>\n";
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
$file = str_replace("{javascript}", $javascrip, $file);
$this->debug();
echo $file;
exit();
}
public function printEdit($pm_run_outside_main_app, $application, $headData, $step_mode = 'EDIT')
{
error_log(print_r($this->app_data, true));
ob_clean();
$this->mergeDynContentAppData($application, $this->items);
$a = $this->clientToken();
$clientToken = array(
"accessToken" => $a["access_token"],
"expiresIn" => $a["expires_in"],
"tokenType" => $a["token_type"],
"scope" => $a["scope"],
"refreshToken" => $a["refresh_token"],
"clientId" => $a["client_id"],
"clientSecret" => $a["client_secret"]
);
$json = G::json_decode($this->record["DYN_CONTENT"]);
$this->jsonr($json);
$title = "<table width='100%' align='center'>\n" .
" <tr class='userGroupTitle'>\n" .
" <td width='100%' align='center'>" . $headData["CASE"] . " #: " . $headData["APP_NUMBER"] . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . $headData["TITLE"] . ": " . $headData["APP_TITLE"] . "</td>\n" .
" </tr>\n" .
"</table>\n";
$javascrip = "" .
"<script type='text/javascript'>\n" .
"var jsondata = " . G::json_encode($json) . ";\n" .
"var pm_run_outside_main_app = '" . $pm_run_outside_main_app . "';\n" .
"var dyn_uid = '" . $this->dyn_uid . "';\n" .
"var __DynaformName__ = '" . $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"] . "';\n" .
"var app_uid = '" . $application . "';\n" .
"var prj_uid = '" . $this->app_data["PROCESS"] . "';\n" .
"var step_mode = '" . $step_mode . "';\n" .
"var workspace = '" . $this->app_data["SYS_SYS"] . "';\n" .
"var credentials = " . G::json_encode($this->credentials) . ";\n" .
"var filePost = null;\n" .
"var fieldsRequired = null;\n" .
"var triggerDebug = " . ($this->app_data["TRIGGER_DEBUG"] === 1 ? "true" : "false") . ";\n" .
"</script>\n" .
"<script type='text/javascript' src='/jscore/cases/core/cases_Step.js'></script>\n" .
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></script>\n" .
($this->app_data["PRO_SHOW_MESSAGE"] === 1 ? '' : $title ) .
"<div style='width:100%;padding:0px 10px 0px 10px;margin:15px 0px 0px 0px;'>\n" .
" <img src='/images/bulletButtonLeft.gif' style='float:left;'>&nbsp;\n" .
" <a id='dyn_backward' href='' style='float:left;'>\n" .
" </a>\n" .
" <img src='/images/bulletButton.gif' style='float:right;'>&nbsp;\n" .
" <a id='dyn_forward' href='' style='float:right;font-size:12px;line-height:1;margin:0px 5px 1px 0px;'>\n" .
" Next Step\n" .
" </a>\n" .
"</div>";
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/cases_Step_Pmdynaform.html');
$file = str_replace("{JSON_DATA}", $this->record["DYN_CONTENT"], $file);
$file = str_replace("{CASE}", $headData["CASE"], $file);
$file = str_replace("{APP_NUMBER}", $headData["APP_NUMBER"], $file);
$file = str_replace("{TITLE}", $headData["TITLE"], $file);
$file = str_replace("{APP_TITLE}", $headData["APP_TITLE"], $file);
$file = str_replace("{PM_RUN_OUTSIDE_MAIN_APP}", $pm_run_outside_main_app, $file);
$file = str_replace("{DYN_UID}", $this->dyn_uid, $file);
$file = str_replace("{DYNAFORMNAME}", $this->record["PRO_UID"] . "_" . $this->record["DYN_UID"], $file);
$file = str_replace("{APP_UID}", $application, $file);
$file = str_replace("{PRJ_UID}", $this->app_data["PROCESS"], $file);
$file = str_replace("{STEP_MODE}", $step_mode, $file);
$file = str_replace("{WORKSPACE}", $this->app_data["SYS_SYS"], $file);
$file = str_replace("{credentials}", json_encode($clientToken), $file);
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
$file = str_replace("{javascript}", $javascrip, $file);
$this->debug();
echo $file;
exit();
}
public function printWebEntry($filename)
{
ob_clean();
$json = G::json_decode($this->record["DYN_CONTENT"]);
$this->jsonr($json);
$javascrip = "" .
"<script type='text/javascript'>\n" .
"var jsondata = " . G::json_encode($json) . ";\n" .
"var pm_run_outside_main_app = null;\n" .
"var dyn_uid = '" . $this->dyn_uid . "';\n" .
"var __DynaformName__ = null;\n" .
"var app_uid = null;\n" .
"var prj_uid = '" . $this->record["PRO_UID"] . "';\n" .
"var step_mode = null;\n" .
"var workspace = '" . SYS_SYS . "';\n" .
"var credentials = " . G::json_encode($this->credentials) . ";\n" .
"var filePost = '" . $filename . "';\n" .
"var fieldsRequired = " . G::json_encode($this->arrayFieldRequired) . ";\n" .
"var triggerDebug = null;\n" .
"</script>\n" .
"<script type='text/javascript' src='/jscore/cases/core/pmDynaform.js'></script>\n" .
"<div style='width:100%;padding: 0px 10px 0px 10px;margin:15px 0px 0px 0px;'>\n" .
" <img src='/images/bulletButton.gif' style='float:right;'>&nbsp;\n" .
" <a id='dyn_forward' href='' style='float:right;font-size:12px;line-height:1;margin:0px 5px 1px 0px;'>\n" .
" Next Step\n" .
" </a>\n" .
"</div>";
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
$file = str_replace("{javascript}", $javascrip, $file);
$this->debug();
echo $file;
exit();
}
public function printPmDynaform()
{
$json = G::json_decode($this->record["DYN_CONTENT"]);
$this->jsonr($json);
$javascrip = "" .
"<script type='text/javascript'>" .
"var jsonData = " . G::json_encode($json) . ";" .
"</script>";
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');
$file = str_replace("{javascript}", $javascrip, $file);
$this->debug();
echo $file;
exit();
}
@@ -310,4 +389,13 @@ class pmDynaform
return array('dsn' => $dsn, 'username' => DB_USER, 'password' => DB_PASS);
}
private function debug()
{
if ($this->debugMode) {
echo "<pre>";
echo G::json_encode(array($this->app_data, $this->data));
echo "</pre>";
}
}
}

View File

@@ -885,7 +885,7 @@ function PMFSendMessage(
if ($result->status_code == 0) {
return 1;
} else {
error_log($result->message);
error_log($result->message);
return 0;
}
}
@@ -1235,7 +1235,7 @@ function WSInformationUser($userUid)
*
* @method
*
* Returns the unique ID for the current active session.
* Returns the unique ID for the current login session.
*
* @name WSGetSession
* @label WS Get Session
@@ -1400,10 +1400,10 @@ function WSUnpauseCase ($caseUid, $delIndex, $userUid)
*
* @method
*
* Add case note.
* Add a case note.
*
* @name WSAddCaseNote
* @label WS Add case note
* @name WSAddACaseNote
* @label WS Add a case note
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#WSAddCaseNote.28.29
*
* @param string(32) | $caseUid | ID of the case | The unique ID of the case.
@@ -1537,10 +1537,10 @@ function PMFUserList () //its test was successfull
/**
* @method
*
* Add a input document.
* Add an Input Document.
*
* @name PMFAddInputDocument
* @label PMF Add a input document
* @name PMFAddAnInputDocument
* @label PMF Add an input document
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFAddInputDocument.28.29
*
* @param string(32) | $inputDocumentUid | ID of the input document | The unique ID of the input document.
@@ -1552,7 +1552,7 @@ function PMFUserList () //its test was successfull
* @param string(32) | $caseUid | ID of the case | The unique ID of the case.
* @param int | $delIndex | Delegation index of the case | The delegation index of the current task in the case.
* @param string(32) | $taskUid | ID of the task | The unique ID of the task.
* @param string(32) | $userUid | ID user | The unique ID of the user who will add a input document.
* @param string(32) | $userUid | ID user | The unique ID of the user who will add an input document.
* @param string | $option = "file" | Option | Option, value: "file".
* @param string | $file = "path_to_file/myfile.txt" | File, path to file | File, path to file.
* @return string | $appDocUid | ID of the application document | Returns ID if it has added the input document successfully; otherwise, returns null or empty if an error occurred.
@@ -2061,7 +2061,7 @@ function PMFNewCase ($processId, $userId, $taskId, $variables)
*
* @method
*
* Assigns a user to a group.
*
*
* Assigns a user to a group. Note that the logged-in user must have the PM_USERS permission in his/her role to be able to assign a user to a group.
*
@@ -2466,7 +2466,7 @@ function PMFGetNextAssignedUser ($application, $task, $delIndex = null, $userUid
/**
* @method
*
* Returns a list or user.
* Returns the email address of the specified user.
*
* @name PMFGetUserEmailAddress
* @label PMF Get User Email Address
@@ -2773,8 +2773,8 @@ function PMFUnpauseCase ($caseUid, $delIndex, $userUid)
*
* Add case note.
*
* @name PMFAddCaseNote
* @label PMF Add case note
* @name PMFAddACaseNote
* @label PMF Add a case note
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFAddCaseNote.28.29
*
* @param string(32) | $caseUid | ID of the case | The unique ID of the case.
@@ -2845,7 +2845,7 @@ function PMFAddAttachmentToArray($arrayData, $index, $value, $suffix = " Copy({i
/**
*@method
*
* It delete the mask a field.
* Removes the currency symbol and thousands separator inserted by a currency mask.
*
* @name PMFRemoveMask
* @label PMF Remove Mask

View File

@@ -491,6 +491,9 @@ class PMScript
}
}
$sScript .= substr( $this->sScript, $iAux );
if(preg_match('/\b(or|and|xor)\b/i' , $sScript)) {
$sScript = "( ".$sScript." )";
}
$sScript = '$bResult = ' . $sScript . ';';
// checks if the syntax is valid or if the variables in that condition has been previously defined
if ($this->validSyntax( $sScript ) && $variableIsDefined) {

View File

@@ -888,12 +888,18 @@ class Processes
$oData->uid["TASK"] = $map;
if (isset( $oData->routes ) && is_array( $oData->routes )) {
foreach ($oData->routes as $key => $val) {
$newGuid = $map[$val['TAS_UID']];
$oData->routes[$key]['TAS_UID'] = $newGuid;
if (strlen( $val['ROU_NEXT_TASK'] ) > 0 && $val['ROU_NEXT_TASK'] > 0) {
$newGuid = $map[$val['ROU_NEXT_TASK']];
$oData->routes[$key]['ROU_NEXT_TASK'] = $newGuid;
foreach ($oData->routes as $key => $value) {
$record = $value;
if (isset($map[$record["TAS_UID"]])) {
$newUid = $map[$record["TAS_UID"]];
$oData->routes[$key]["TAS_UID"] = $newUid;
if (strlen($record["ROU_NEXT_TASK"]) > 0 && $record["ROU_NEXT_TASK"] > 0) {
$newUid = $map[$record["ROU_NEXT_TASK"]];
$oData->routes[$key]["ROU_NEXT_TASK"] = $newUid;
}
}
}
}
@@ -1510,9 +1516,20 @@ class Processes
{
foreach ($SubProcess as $key => $row) {
$oSubProcess = new SubProcess();
if ($oSubProcess->subProcessExists( $row['SP_UID'] )) {
$oSubProcess->remove( $row['SP_UID'] );
}
//if ($oSubProcess->subProcessExists( $row['SP_UID'] )) {
// $oSubProcess->remove( $row['SP_UID'] );
//}
//Delete
$criteria = new Criteria("workflow");
$criteria->add(SubProcessPeer::PRO_PARENT, $row["PRO_PARENT"], Criteria::EQUAL);
$criteria->add(SubProcessPeer::TAS_PARENT, $row["TAS_PARENT"], Criteria::EQUAL);
$result = SubProcessPeer::doDelete($criteria);
//Create
$res = $oSubProcess->create( $row );
}
return;
@@ -2273,14 +2290,16 @@ class Processes
try {
$map = array();
foreach ($data->messageType as $key => $value) {
$record = $value;
if (isset($data->messageType)) {
foreach ($data->messageType as $key => $value) {
$record = $value;
if (isset($record["MSGT_UID"])) {
$newUid = $this->getUnusedMessageTypeUid();
if (isset($record["MSGT_UID"])) {
$newUid = $this->getUnusedMessageTypeUid();
$map[$record["MSGT_UID"]] = $newUid;
$data->messageType[$key]["MSGT_UID"] = $newUid;
$map[$record["MSGT_UID"]] = $newUid;
$data->messageType[$key]["MSGT_UID"] = $newUid;
}
}
}
@@ -2297,6 +2316,19 @@ class Processes
}
}
}
//Message-Envent-Definition
if (isset($data->messageEventDefinition)) {
foreach ($data->messageEventDefinition as $key => $value) {
$record = $value;
if (isset($map[$record["MSGT_UID"]])) {
$newUid = $map[$record["MSGT_UID"]];
$data->messageEventDefinition[$key]["MSGT_UID"] = $newUid;
}
}
}
} catch (Exception $e) {
throw $e;
}
@@ -2314,14 +2346,16 @@ class Processes
try {
$map = array();
foreach ($data->messageTypeVariable as $key => $value) {
$record = $value;
if (isset($data->messageTypeVariable)) {
foreach ($data->messageTypeVariable as $key => $value) {
$record = $value;
if (isset($record["MSGTV_UID"])) {
$newUid = $this->getUnusedMessageTypeVariableUid();
if (isset($record["MSGTV_UID"])) {
$newUid = $this->getUnusedMessageTypeVariableUid();
$map[$record["MSGTV_UID"]] = $newUid;
$data->messageTypeVariable[$key]["MSGTV_UID"] = $newUid;
$map[$record["MSGTV_UID"]] = $newUid;
$data->messageTypeVariable[$key]["MSGTV_UID"] = $newUid;
}
}
}
@@ -3077,6 +3111,39 @@ class Processes
}
}
public function getMessageEventDefinitions($processUid)
{
try {
$arrayMessageEventDefinition = array();
$messageEventDefinition = new \ProcessMaker\BusinessModel\MessageEventDefinition();
//Get data
$criteria = new Criteria("workflow");
$criteria->addSelectColumn(MessageEventDefinitionPeer::MSGED_UID);
$criteria->add(MessageEventDefinitionPeer::PRJ_UID, $processUid, Criteria::EQUAL);
$rsCriteria = MessageEventDefinitionPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$arrayData = $messageEventDefinition->getMessageEventDefinition($row["MSGED_UID"], true);
$arrayData["MSGED_VARIABLES"] = serialize($arrayData["MSGED_VARIABLES"]);
$arrayMessageEventDefinition[] = $arrayData;
}
//Return
return $arrayMessageEventDefinition;
} catch (Exception $e) {
throw $e;
}
}
/**
* Get Task User Rows from an array of data
*
@@ -3318,6 +3385,31 @@ class Processes
}
}
/**
* Create Message-Event-Definition records
*
* @param string $processUid Unique id of Process
* @param array $arrayData Data
*
* return void
*/
public function createMessageEventDefinition($processUid, array $arrayData)
{
try {
$messageEventDefinition = new \ProcessMaker\BusinessModel\MessageEventDefinition();
foreach ($arrayData as $value) {
$record = $value;
$record["MSGED_VARIABLES"] = unserialize($record["MSGED_VARIABLES"]);
$arrayMessageEventDefinitionData = $messageEventDefinition->create($processUid, $record, false);
}
} catch (Exception $e) {
throw $e;
}
}
/**
* Cleanup Report Tables References from an array of data
*
@@ -3506,6 +3598,7 @@ class Processes
$oData->webEntryEvent = $this->getWebEntryEvents($sProUid);
$oData->messageType = $this->getMessageTypes($sProUid);
$oData->messageTypeVariable = $this->getMessageTypeVariables($sProUid);
$oData->messageEventDefinition = $this->getMessageEventDefinitions($sProUid);
$oData->groupwfs = $this->groupwfsMerge($oData->groupwfs, $oData->processUser, "USR_UID");
$oData->process["PRO_TYPE_PROCESS"] = "PUBLIC";
@@ -4552,6 +4645,7 @@ class Processes
$this->createWebEntryEvent($arrayProcessData["PRO_UID"], $arrayProcessData["PRO_CREATE_USER"], (isset($oData->webEntryEvent))? $oData->webEntryEvent : array());
$this->createMessageType((isset($oData->messageType))? $oData->messageType : array());
$this->createMessageTypeVariable((isset($oData->messageTypeVariable))? $oData->messageTypeVariable : array());
$this->createMessageEventDefinition($arrayProcessData["PRO_UID"], (isset($oData->messageEventDefinition))? $oData->messageEventDefinition : array());
}

View File

@@ -86,8 +86,8 @@ class spoolRun
$this->ExceptionCode['WARNING'] = 2;
$this->ExceptionCode['NOTICE'] = 3;
$this->longMailEreg = '/(.*)(<([\w\-\.]+@[\w\-_\.]+\.\w{2,5})+>)/';
$this->mailEreg = '/^([\w\-_\.]+@[\w\-_\.]+\.\w{2,5}+)$/';
$this->longMailEreg = "/(.*)(<([\w\-\.']+@[\w\-_\.]+\.\w{2,5})+>)/";
$this->mailEreg = "/^([\w\-_\.']+@[\w\-_\.]+\.\w{2,5}+)$/";
}
/**
@@ -289,7 +289,7 @@ class spoolRun
*/
private function handleFrom ()
{
$eregA = "/^.*@.*$/";
$eregA = "/^'.*@.*$/";
if (strpos( $this->fileData['from'], '<' ) !== false) {
//to validate complex email address i.e. Erik A. O <erik@colosa.com>

View File

@@ -151,8 +151,16 @@ class AppDelegation extends BaseAppDelegation
if ($this->validate()) {
try {
$res = $this->save();
$inbox = new ListInbox();
$inbox->newRow($this->toArray(BasePeer::TYPE_FIELDNAME), $delPreviusUsrUid);
/*----------------------------------********---------------------------------*/
$task = TaskPeer::retrieveByPK( $this->getTasUid() );
$taskType = $task->getTasType();
if($taskType == 'NORMAL'){
$inbox = new ListInbox();
$res = $this->toArray(BasePeer::TYPE_FIELDNAME);
$inbox->newRow($this->toArray(BasePeer::TYPE_FIELDNAME), $delPreviusUsrUid);
}
/*----------------------------------********---------------------------------*/
} catch (PropelException $e) {
throw ($e);
}
@@ -224,6 +232,10 @@ class AppDelegation extends BaseAppDelegation
$c->addSelectColumn( AppDelegationPeer::PRO_UID );
$c->addSelectColumn( AppDelegationPeer::TAS_UID );
$c->addSelectColumn( AppDelegationPeer::USR_UID );
$c->addSelectColumn( AppDelegationPeer::DEL_DELEGATE_DATE );
$c->addSelectColumn( AppDelegationPeer::DEL_INIT_DATE );
$c->addSelectColumn( AppDelegationPeer::DEL_TASK_DUE_DATE );
$c->addSelectColumn( AppDelegationPeer::DEL_FINISH_DATE );
$c->add( AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN' );
$c->add( AppDelegationPeer::APP_UID, $AppUid );
@@ -236,8 +248,14 @@ class AppDelegation extends BaseAppDelegation
while (is_array($row)) {
$case = array();
$case['TAS_UID'] = $row['TAS_UID'];
$case['USR_UID'] = $row['USR_UID'];
$case['TAS_UID'] = $row['TAS_UID'];
$case['USR_UID'] = $row['USR_UID'];
$case['DEL_INDEX'] = $row['DEL_INDEX'];
$case['TAS_UID'] = $row['TAS_UID'];
$case['DEL_DELEGATE_DATE'] = $row['DEL_DELEGATE_DATE'];
$case['DEL_INIT_DATE'] = $row['DEL_INIT_DATE'];
$case['DEL_TASK_DUE_DATE'] = $row['DEL_TASK_DUE_DATE'];
$case['DEL_FINISH_DATE'] = $row['DEL_FINISH_DATE'];
$aCases[] = $case;
$rs->next();
$row = $rs->getRow();

View File

@@ -6,7 +6,7 @@ require_once 'classes/model/om/BaseBpmnFlow.php';
/**
* Skeleton subclass for representing a row from the 'BPMN_FLOW' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -58,7 +58,11 @@ class BpmnFlow extends BaseBpmnFlow
$c = new Criteria('workflow');
foreach ($field as $key => $value) {
$c->add($key, $value, Criteria::EQUAL);
if (is_array($value)) {
$c->add($key, $value[0], $value[1]);
} else {
$c->add($key, $value, Criteria::EQUAL);
}
}
return BpmnFlowPeer::doSelect($c);
@@ -145,3 +149,4 @@ class BpmnFlow extends BaseBpmnFlow
}*/
} // BpmnFlow

2
workflow/engine/classes/model/BpmnLane.php Normal file → Executable file
View File

@@ -78,7 +78,7 @@ class BpmnLane extends BaseBpmnLane {
if (! is_null($prjUid)) {
$c->add(BpmnLanePeer::PRJ_UID, $prjUid, Criteria::EQUAL);
}
$c->addAscendingOrderByColumn(BpmnBoundPeer::BOU_REL_POSITION);
$rs = BpmnLanePeer::doSelectRS($c);
$rs->setFetchmode(\ResultSet::FETCHMODE_ASSOC);

View File

@@ -53,6 +53,30 @@ class CaseScheduler extends BaseCaseScheduler
throw ($e);
}
$con->commit();
//Add Audit Log
$perform = $aData["SCH_OPTION"];
switch ($aData['SCH_OPTION']) {
case '1':
$perform = 'Daily';
break;
case '2':
$perform = 'Weekly';
break;
case '3':
$perform = 'Monthly';
break;
case '4':
$perform = 'One time only';
break;
case '5':
$perform = 'Every';
break;
}
G::auditLog("CreateCaseScheduler", "Scheduler Name: ".$aData['SCH_NAME'].", Task: ".$aData['TAS_UID'].", Perform this task: ".$perform.", Start Date: ".$aData['SCH_START_DATE'].", End Date: ".$aData['SCH_END_DATE'].", Execution time : ".$aData['SCH_START_TIME']);
return $result;
} catch (Exception $e) {
$con->rollback();
@@ -70,6 +94,27 @@ class CaseScheduler extends BaseCaseScheduler
if ($this->validate()) {
$result = $this->save();
$con->commit();
//Add Audit Log
switch ($fields['SCH_OPTION']){
case '1':
$perform = 'Daily';
break;
case '2':
$perform = 'Weekly';
break;
case '3':
$perform = 'Monthly';
break;
case '4':
$perform = 'One time only';
break;
case '5':
$perform = 'Every';
break;
}
G::auditLog("UpdateCaseScheduler", "Scheduler Name: ".$fields['SCH_NAME'].", Task: ".$fields['TAS_UID'].", Perform this task: ".$perform.", Start Date: ".$fields['SCH_START_DATE'].", End Date: ".$fields['SCH_END_DATE'].", Execution time : ".$fields['SCH_START_TIME']);
return $result;
} else {
$con->rollback();
@@ -87,8 +132,12 @@ class CaseScheduler extends BaseCaseScheduler
try {
$oCaseScheduler = CaseSchedulerPeer::retrieveByPK( $SchUid );
if (! is_null( $oCaseScheduler )) {
$fields = $this->Load( $SchUid );
$iResult = $oCaseScheduler->delete();
$con->commit();
//Add Audit Log
G::auditLog("DeleteCaseScheduler", "Scheduler Name: ".$fields['SCH_NAME'].", Task: ".$fields['TAS_UID']);
return $iResult;
} else {
throw (new Exception( 'This row doesn\'t exist!' ));

View File

@@ -141,6 +141,9 @@ class DbSource extends BaseDbSource
if ($this->validate()) {
$result = $this->save();
$con->commit();
//Add Audit Log
G::auditLog("UpdateDatabaseConnection", "Connection Uid: ".$fields['DBS_UID'].", Connection Engine: ".$fields['DBS_TYPE'].", Connection Encode: ".$fields['DBS_ENCODE'].", Connection Server: ".$fields['DBS_SERVER'].", Connection Database: ".$fields['DBS_DATABASE_NAME'].", Connection Port: ".$fields['DBS_PORT']);
return $result;
} else {
$con->rollback();
@@ -156,6 +159,7 @@ class DbSource extends BaseDbSource
{
$con = Propel::getConnection(DbSourcePeer::DATABASE_NAME);
try {
$fields = $this->load($DbsUid, $ProUID);
$con->begin();
$this->setDbsUid($DbsUid);
$this->setProUid($ProUID);
@@ -167,6 +171,9 @@ class DbSource extends BaseDbSource
}
$result = $this->delete();
$con->commit();
//Add Audit Log
G::auditLog("DeleteDatabaseConnection", "Connection Uid: ".$DbsUid.", Connection Engine: ".$fields['DBS_TYPE'].", Connection Database: ".$fields['DBS_DATABASE_NAME']);
return $result;
} catch (exception $e) {
$con->rollback();
@@ -196,6 +203,9 @@ class DbSource extends BaseDbSource
throw ($e);
}
$con->commit();
//Add Audit Log
G::auditLog("CreateDatabaseConnection", "Connection Uid: ".$aData['DBS_UID'].", Connection Engine: ".$aData['DBS_TYPE'].", Connection Encode: ".$aData['DBS_ENCODE'].", Connection Server: ".$aData['DBS_SERVER'].", Connection Database: ".$aData['DBS_DATABASE_NAME'].", Connection Port: ".$aData['DBS_PORT']);
return $this->getDbsUid();
} catch (exception $e) {
$con->rollback();

View File

@@ -150,7 +150,7 @@ class Dynaform extends BaseDynaform
* @return void
*/
public function create ($aData)
public function create ($aData, $pmTableUid='')
{
if (! isset( $aData['PRO_UID'] )) {
throw (new PropelException( 'The dynaform cannot be created. The PRO_UID is empty.' ));
@@ -194,6 +194,17 @@ class Dynaform extends BaseDynaform
}
$con->commit();
//Add Audit Log
$mode = isset($aData['MODE'])? $aData['MODE'] : 'Determined by Fields';
$description = "";
if($pmTableUid!=''){
$pmTable = AdditionalTablesPeer::retrieveByPK( $pmTableUid );
$addTabName = $pmTable->getAddTabName();
$description = "Create from a PM Table: ".$addTabName.", ";
}
G::auditLog("CreateDynaform", $description."Dynaform Title: ".$aData['DYN_TITLE'].", Type: ".$aData['DYN_TYPE'].", Description: ".$aData['DYN_DESCRIPTION'].", Mode: ".$mode);
$sXml = '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
$sXml .= '<dynaForm type="' . $this->getDynType() . '" name="' . $this->getProUid() . '/' . $this->getDynUid() . '" width="500" enabletemplate="0" mode="" nextstepsave="prompt">' . "\n";
$sXml .= '</dynaForm>';
@@ -232,7 +243,7 @@ class Dynaform extends BaseDynaform
public function createFromPMTable ($aData, $pmTableUid)
{
$this->create( $aData );
$this->create( $aData , $pmTableUid);
$aData['DYN_UID'] = $this->getDynUid();
//krumo(BasePeer::getFieldnames('Content'));
$fields = array ();
@@ -591,9 +602,17 @@ class Dynaform extends BaseDynaform
try {
$oPro = DynaformPeer::retrieveByPK( $ProUid );
if (! is_null( $oPro )) {
$title = $oPro->getDynTitle();
$type = $oPro->getDynType();
$description = $oPro->getDynDescription();
Content::removeContent( 'DYN_TITLE', '', $oPro->getDynUid() );
Content::removeContent( 'DYN_DESCRIPTION', '', $oPro->getDynUid() );
$iResult = $oPro->delete();
//Add Audit Log
G::auditLog("DeleteDynaform", "Dynaform Title: ".$title.", Type: ".$type.", Description: ".$description);
if (file_exists( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.xml' )) {
unlink( PATH_DYNAFORM . $oPro->getProUid() . PATH_SEP . $oPro->getDynUid() . '.xml' );
}

View File

@@ -126,6 +126,34 @@ class InputDocument extends BaseInputDocument
}
$iResult = $oInputDocument->save();
$oConnection->commit();
//Add Audit Log
switch ($aData['INP_DOC_FORM_NEEDED']){
case 'VIRTUAL':
$docType = 'Digital';
break;
case 'REAL':
$docType = 'Printed';
break;
case 'VREAL':
$docType = 'Digital/Printed';
break;
}
if(isset($aData['INP_DOC_VERSIONING']) && $aData['INP_DOC_VERSIONING'] == 1){
$enableVersion = 'Yes';
}else{
$enableVersion = 'No';
}
$description = "Input Document Title: ".$aData['INP_DOC_TITLE'].", Input Document Uid: ".$aData['INP_DOC_UID'].", Document Type: ".$docType;
if(!empty($aData['INP_DOC_DESCRIPTION'])){
$description .= ", Description: ".$aData['INP_DOC_DESCRIPTION'];
}
if(!empty($aData['INP_DOC_DESTINATION_PATH'])){
$description .= ", Destination Path: ".$aData['INP_DOC_DESTINATION_PATH'];
}
$inputDocMaxFileSize = $aData['INP_DOC_MAX_FILESIZE']? $aData['INP_DOC_MAX_FILESIZE'].' '.$aData['INP_DOC_MAX_FILESIZE_UNIT'] : "256 MB";
$description .= ", Extensions: ".$aData['INP_DOC_TYPE_FILE'].", Maximum Input Document file size: ".$inputDocMaxFileSize;
G::auditLog("CreateInputDocument", $description);
return $aData['INP_DOC_UID'];
} else {
$sMessage = '';
@@ -165,6 +193,34 @@ class InputDocument extends BaseInputDocument
}
$iResult = $oInputDocument->save();
$oConnection->commit();
//Add Audit Log
switch ($aData['INP_DOC_FORM_NEEDED']){
case 'VIRTUAL':
$docType = 'Digital';
break;
case 'REAL':
$docType = 'Printed';
break;
case 'VREAL':
$docType = 'Digital/Printed';
break;
}
if(isset($aData['INP_DOC_VERSIONING']) && $aData['INP_DOC_VERSIONING'] == 1){
$enableVersion = 'Yes';
}else{
$enableVersion = 'No';
}
$description = "Input Document Title: ".$aData['INP_DOC_TITLE'].", Input Document Uid: ".$aData['INP_DOC_UID'].", Document Type: ".$docType;
if(!empty($aData['INP_DOC_DESCRIPTION'])){
$description .= ", Description: ".$aData['INP_DOC_DESCRIPTION'];
}
if(!empty($aData['INP_DOC_DESTINATION_PATH'])){
$description .= ", Destination Path: ".$aData['INP_DOC_DESTINATION_PATH'];
}
$inputDocMaxFileSize = $aData['INP_DOC_MAX_FILESIZE']? $aData['INP_DOC_MAX_FILESIZE'].' '.$aData['INP_DOC_MAX_FILESIZE_UNIT'] : "256 MB";
$description .= ", Extensions: ".$aData['INP_DOC_TYPE_FILE'].", Maximum Input Document file size: ".$inputDocMaxFileSize;
G::auditLog("UpdateInputDocument", $description);
return $iResult;
} else {
$sMessage = '';
@@ -196,11 +252,18 @@ class InputDocument extends BaseInputDocument
try {
$oInputDocument = InputDocumentPeer::retrieveByPK( $sInpDocUid );
if (! is_null( $oInputDocument )) {
$nameInput = $this->getInpDocTitle();
$descInput = $this->getInpDocDescription();
$oConnection->begin();
Content::removeContent( 'INP_DOC_TITLE', '', $oInputDocument->getInpDocUid() );
Content::removeContent( 'INP_DOC_DESCRIPTION', '', $oInputDocument->getInpDocUid() );
$iResult = $oInputDocument->delete();
$oConnection->commit();
//Add Audit Log
$nameInput = $this->getInpDocTitle();
$descInput = $this->getInpDocDescription();
G::auditLog("DeleteInputDocument", "Input Document Name: ".$nameInput.", Input Document Uid: ".$sInpDocUid.", Description: ".$descInput);
return $iResult;
} else {
throw (new Exception( 'This row doesn\'t exist!' ));

View File

@@ -0,0 +1,308 @@
<?php
require_once 'classes/model/om/BaseListCanceled.php';
/**
* Skeleton subclass for representing a row from the 'LIST_CANCELED' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package classes.model
*/
class ListCanceled extends BaseListCanceled {
/**
* Create List Canceled Table
*
* @param type $data
* @return type
*
*/
public function create($data)
{
$criteria = new Criteria();
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
$criteria->add( ContentPeer::CON_ID, $data['APP_UID'], Criteria::EQUAL );
$criteria->add( ContentPeer::CON_CATEGORY, 'APP_TITLE', Criteria::EQUAL );
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
$dataset = ContentPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['APP_TITLE'] = $aRow['CON_VALUE'];
$criteria = new Criteria();
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
$criteria->add( ContentPeer::CON_ID, $data['PRO_UID'], Criteria::EQUAL );
$criteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
$dataset = ContentPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['APP_PRO_TITLE'] = $aRow['CON_VALUE'];
$criteria = new Criteria();
$criteria->addSelectColumn(AppDelegationPeer::TAS_UID);
$criteria->addSelectColumn(AppDelegationPeer::DEL_INIT_DATE);
$criteria->addSelectColumn(AppDelegationPeer::DEL_DELEGATE_DATE);
$criteria->addSelectColumn(AppDelegationPeer::DEL_TASK_DUE_DATE);
$criteria->addSelectColumn(AppDelegationPeer::DEL_PREVIOUS);
$criteria->add( AppDelegationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
$criteria->add( AppDelegationPeer::DEL_INDEX, $data['DEL_INDEX'], Criteria::EQUAL );
$dataset = ContentPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['TAS_UID'] = $aRow['TAS_UID'];
$data['DEL_INIT_DATE'] = $aRow['DEL_INIT_DATE'];
$data['DEL_DUE_DATE'] = $aRow['DEL_TASK_DUE_DATE'];
$data['DEL_DELEGATE_DATE'] = $aRow['DEL_DELEGATE_DATE'];
$delPrevious = $aRow['DEL_PREVIOUS'];
$criteria = new Criteria();
$criteria->addSelectColumn(AppDelegationPeer::USR_UID);
$criteria->add( AppDelegationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
$criteria->add( AppDelegationPeer::DEL_INDEX, $delPrevious, Criteria::EQUAL );
$dataset = ContentPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['DEL_PREVIOUS_USR_UID'] = $aRow['USR_UID'];
$criteria = new Criteria();
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
$criteria->add( ContentPeer::CON_ID, $data['TAS_UID'], Criteria::EQUAL );
$criteria->add( ContentPeer::CON_CATEGORY, 'TAS_TITLE', Criteria::EQUAL );
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
$dataset = ContentPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['APP_TAS_TITLE'] = $aRow['CON_VALUE'];
$criteria = new Criteria();
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$criteria->add( UsersPeer::USR_UID, $data['USR_UID'], Criteria::EQUAL );
$dataset = UsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['DEL_CURRENT_USR_USERNAME'] = $aRow['USR_USERNAME'];
$data['DEL_CURRENT_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
$data['DEL_CURRENT_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
$data['APP_CANCELED_DATE'] = Date("Y-m-d H:i:s");
$oListInbox = new ListInbox();
$oListInbox->removeAll($data['APP_UID']);
$con = Propel::getConnection( ListCanceledPeer::DATABASE_NAME );
try {
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
if ($this->validate()) {
$result = $this->save();
} else {
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
$e->aValidationFailures = $this->getValidationFailures();
throw ($e);
}
$con->commit();
return $result;
} catch(Exception $e) {
$con->rollback();
throw ($e);
}
}
/**
* Update List Canceled Table
*
* @param type $data
* @return type
* @throws type
*/
public function update($data)
{
$con = Propel::getConnection( ListCanceledPeer::DATABASE_NAME );
try {
$con->begin();
$this->setNew( false );
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
if ($this->validate()) {
$result = $this->save();
$con->commit();
return $result;
} else {
$con->rollback();
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
}
} catch (Exception $e) {
$con->rollback();
throw ($e);
}
}
/**
* Remove List Canceled
*
* @param type $seqName
* @return type
* @throws type
*
*/
public function remove ($app_uid)
{
$con = Propel::getConnection( ListCanceledPeer::DATABASE_NAME );
try {
$this->setAppUid($app_uid);
$con->begin();
$this->delete();
$con->commit();
} catch (Exception $e) {
$con->rollback();
throw ($e);
}
}
public function loadFilters (&$criteria, $filters)
{
$filter = isset($filters['filter']) ? $filters['filter'] : "";
$search = isset($filters['search']) ? $filters['search'] : "";
$process = isset($filters['process']) ? $filters['process'] : "";
$category = isset($filters['category']) ? $filters['category'] : "";
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
if ($filter != '') {
switch ($filter) {
case 'read':
$criteria->add( ListCanceledPeer::DEL_INIT_DATE, null, Criteria::ISNOTNULL );
break;
case 'unread':
$criteria->add( ListCanceledPeer::DEL_INIT_DATE, null, Criteria::ISNULL );
break;
}
}
if ($search != '') {
$criteria->add(
$criteria->getNewCriterion( 'CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
addOr( $criteria->getNewCriterion( 'CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
addOr( $criteria->getNewCriterion( ListCanceledPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
}
if ($process != '') {
$criteria->add( ListCanceledPeer::PRO_UID, $process, Criteria::EQUAL);
}
if ($category != '') {
// INNER JOIN FOR TAS_TITLE
$criteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
$aConditions = array();
$aConditions[] = array(ListCanceledPeer::PRO_UID, ProcessPeer::PRO_UID);
$aConditions[] = array(ProcessPeer::PRO_CATEGORY, "'" . $category . "'");
$criteria->addJoinMC($aConditions, Criteria::INNER_JOIN);
}
if ($dateFrom != "") {
if ($dateTo != "") {
if ($dateFrom == $dateTo) {
$dateSame = $dateFrom;
$dateFrom = $dateSame . " 00:00:00";
$dateTo = $dateSame . " 23:59:59";
} else {
$dateFrom = $dateFrom . " 00:00:00";
$dateTo = $dateTo . " 23:59:59";
}
$criteria->add( $criteria->getNewCriterion( ListCanceledPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
addAnd( $criteria->getNewCriterion( ListCanceledPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
} else {
$dateFrom = $dateFrom . " 00:00:00";
$criteria->add( ListCanceledPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL );
}
} elseif ($dateTo != "") {
$dateTo = $dateTo . " 23:59:59";
$criteria->add( ListCanceledPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
}
}
public function countTotal ($usr_uid, $filters = array())
{
$criteria = new Criteria();
$criteria->add( ListCanceledPeer::USR_UID, $usr_uid, Criteria::EQUAL );
self::loadFilters($criteria, $filters);
$total = ListCanceledPeer::doCount( $criteria );
return (int)$total;
}
public function loadList ($usr_uid, $filters = array())
{
$resp = array();
$criteria = new Criteria();
$criteria->addSelectColumn(ListCanceledPeer::APP_UID);
$criteria->addSelectColumn(ListCanceledPeer::USR_UID);
$criteria->addSelectColumn(ListCanceledPeer::TAS_UID);
$criteria->addSelectColumn(ListCanceledPeer::PRO_UID);
$criteria->addSelectColumn(ListCanceledPeer::APP_NUMBER);
$criteria->addSelectColumn(ListCanceledPeer::APP_TITLE);
$criteria->addSelectColumn(ListCanceledPeer::APP_PRO_TITLE);
$criteria->addSelectColumn(ListCanceledPeer::APP_TAS_TITLE);
$criteria->addSelectColumn(ListCanceledPeer::APP_CANCELED_DATE);
$criteria->addSelectColumn(ListCanceledPeer::DEL_INDEX);
$criteria->addSelectColumn(ListCanceledPeer::DEL_PREVIOUS_USR_UID);
$criteria->addSelectColumn(ListCanceledPeer::DEL_CURRENT_USR_FIRSTNAME);
$criteria->addSelectColumn(ListCanceledPeer::DEL_CURRENT_USR_LASTNAME);
$criteria->addSelectColumn(ListCanceledPeer::DEL_CURRENT_USR_USERNAME);
$criteria->addSelectColumn(ListCanceledPeer::DEL_DELEGATE_DATE);
$criteria->addSelectColumn(ListCanceledPeer::DEL_INIT_DATE);
$criteria->addSelectColumn(ListCanceledPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListCanceledPeer::DEL_PRIORITY);
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
$criteria->addJoin(ListCanceledPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$criteria->add( ListCanceledPeer::USR_UID, $usr_uid, Criteria::EQUAL );
self::loadFilters($criteria, $filters);
$sort = (!empty($filters['sort'])) ? $filters['sort'] : "APP_FINISH_DATE";
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
$start = isset($filters['start']) ? $filters['start'] : "0";
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
if ($dir == "DESC") {
$criteria->addDescendingOrderByColumn($sort);
} else {
$criteria->addAscendingOrderByColumn($sort);
}
if ($paged == 1) {
$criteria->setLimit( $limit );
$criteria->setOffset( $start );
}
$dataset = ListCanceledPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$data = array();
while ($dataset->next()) {
$aRow = $dataset->getRow();
$data[] = $aRow;
}
return $data;
}
} // ListCanceled

View File

@@ -0,0 +1,23 @@
<?php
// include base peer class
require_once 'classes/model/om/BaseListCanceledPeer.php';
// include object class
include_once 'classes/model/ListCanceled.php';
/**
* Skeleton subclass for performing query and update operations on the 'LIST_CANCELED' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package classes.model
*/
class ListCanceledPeer extends BaseListCanceledPeer {
} // ListCanceledPeer

View File

@@ -6,7 +6,7 @@ require_once 'classes/model/om/BaseListCompleted.php';
/**
* Skeleton subclass for representing a row from the 'LIST_COMPLETED' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -248,6 +248,11 @@ class ListCompleted extends BaseListCompleted
$criteria->addSelectColumn(ListCompletedPeer::DEL_CURRENT_USR_LASTNAME);
$criteria->addSelectColumn(ListCompletedPeer::DEL_CURRENT_USR_USERNAME);
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
$criteria->addJoin(ListCompletedPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$criteria->add( ListCompletedPeer::USR_UID, $usr_uid, Criteria::EQUAL );
self::loadFilters($criteria, $filters);
@@ -279,3 +284,4 @@ class ListCompleted extends BaseListCompleted
return $data;
}
} // ListCompleted

View File

@@ -2,11 +2,10 @@
require_once 'classes/model/om/BaseListInbox.php';
/**
* Skeleton subclass for representing a row from the 'LIST_INBOX' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -14,6 +13,7 @@ require_once 'classes/model/om/BaseListInbox.php';
*
* @package classes.model
*/
class ListInbox extends BaseListInbox
{
/**
@@ -47,9 +47,11 @@ class ListInbox extends BaseListInbox
// remove and create participated last
$listParticipatedLast = new ListParticipatedLast();
$listParticipatedLast->remove($data['APP_UID'], $data['USR_UID']);
$listParticipatedLast->remove($data['APP_UID'], $data['USR_UID'],$data['DEL_INDEX']);
$listParticipatedLast = new ListParticipatedLast();
$listParticipatedLast->create($data);
$listParticipatedLast->create($data);
$listParticipatedLast = new ListParticipatedLast();
$listParticipatedLast->refresh($data);
return $result;
} catch(Exception $e) {
@@ -78,14 +80,7 @@ class ListInbox extends BaseListInbox
// update participated history
$listParticipatedHistory = new ListParticipatedHistory();
$listParticipatedHistory->update($data);
$oRow = ListInboxPeer::retrieveByPK( $data['APP_UID'], $data['DEL_INDEX'] );
$newData = $oRow->toArray( BasePeer::TYPE_FIELDNAME );
// update participated last
$listParticipatedLast = new ListParticipatedLast();
$listParticipatedLast->update($newData);
$listParticipatedHistory->update($data);
return $result;
} else {
$con->rollback();
@@ -121,9 +116,35 @@ class ListInbox extends BaseListInbox
}
}
/**
* Remove All List Inbox
*
* @param type $seqName
* @return type
* @throws type
*
*/
public function removeAll ($app_uid)
{
$con = Propel::getConnection( ListInboxPeer::DATABASE_NAME );
try {
$this->setAppUid($app_uid);
$con->begin();
$this->delete();
$con->commit();
} catch (Exception $e) {
$con->rollback();
throw ($e);
}
}
public function newRow ($data, $delPreviusUsrUid) {
$data['DEL_PREVIOUS_USR_UID'] = $delPreviusUsrUid;
$data['DEL_DUE_DATE'] = $data['DEL_TASK_DUE_DATE'];
if (isset($data['DEL_TASK_DUE_DATE'])) {
$data['DEL_DUE_DATE'] = $data['DEL_TASK_DUE_DATE'];
}
$criteria = new Criteria();
$criteria->addSelectColumn( ApplicationPeer::APP_NUMBER );
@@ -187,6 +208,10 @@ class ListInbox extends BaseListInbox
$data['DEL_PREVIOUS_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
$data['DEL_PREVIOUS_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
}
if(!isset($data['APP_STATUS']) && $data['DEL_INDEX']>1){
$data['APP_STATUS'] = 'TO_DO';
}
self::create($data);
}
@@ -275,6 +300,7 @@ class ListInbox extends BaseListInbox
$criteria->addSelectColumn(ListInboxPeer::TAS_UID);
$criteria->addSelectColumn(ListInboxPeer::PRO_UID);
$criteria->addSelectColumn(ListInboxPeer::APP_NUMBER);
$criteria->addSelectColumn(ListInboxPeer::APP_STATUS);
$criteria->addSelectColumn(ListInboxPeer::APP_TITLE);
$criteria->addSelectColumn(ListInboxPeer::APP_PRO_TITLE);
$criteria->addSelectColumn(ListInboxPeer::APP_TAS_TITLE);
@@ -288,6 +314,11 @@ class ListInbox extends BaseListInbox
$criteria->addSelectColumn(ListInboxPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListInboxPeer::DEL_PRIORITY);
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
$criteria->addJoin(ListInboxPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$criteria->add( ListInboxPeer::USR_UID, $usr_uid, Criteria::EQUAL );
self::loadFilters($criteria, $filters);
@@ -297,6 +328,12 @@ class ListInbox extends BaseListInbox
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
if ($filters['action'] == 'draft') {
$criteria->add( ListInboxPeer::APP_STATUS, 'DRAFT', Criteria::EQUAL );
} else {
$criteria->add( ListInboxPeer::APP_STATUS, 'TO_DO', Criteria::EQUAL );
}
if ($dir == "DESC") {
$criteria->addDescendingOrderByColumn($sort);
} else {
@@ -317,7 +354,7 @@ class ListInbox extends BaseListInbox
$aRow['DEL_PRIORITY'] = G::LoadTranslation( "ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}" );
$data[] = $aRow;
}
return $data;
}
}

View File

@@ -6,7 +6,7 @@ require_once 'classes/model/om/BaseListMyInbox.php';
/**
* Skeleton subclass for representing a row from the 'LIST_MY_INBOX' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -236,6 +236,11 @@ class ListMyInbox extends BaseListMyInbox
$criteria->addSelectColumn(ListMyInboxPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListMyInboxPeer::DEL_PRIORITY);
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
$criteria->addJoin(ListMyInboxPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$criteria->add( ListMyInboxPeer::USR_UID, $usr_uid, Criteria::EQUAL );
self::loadFilters($criteria, $filters);
@@ -269,3 +274,4 @@ class ListMyInbox extends BaseListMyInbox
return $data;
}
} // ListMyInbox

View File

@@ -6,7 +6,7 @@ require_once 'classes/model/om/BaseListParticipatedHistory.php';
/**
* Skeleton subclass for representing a row from the 'LIST_PARTICIPATED_HISTORY' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -195,6 +195,11 @@ class ListParticipatedHistory extends BaseListParticipatedHistory
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListParticipatedHistoryPeer::DEL_PRIORITY);
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
$criteria->addJoin(ListParticipatedHistoryPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$criteria->add( ListParticipatedHistoryPeer::USR_UID, $usr_uid, Criteria::EQUAL );
self::loadFilters($criteria, $filters);
@@ -228,3 +233,4 @@ class ListParticipatedHistory extends BaseListParticipatedHistory
return $data;
}
}

View File

@@ -6,14 +6,15 @@ require_once 'classes/model/om/BaseListParticipatedLast.php';
/**
* Skeleton subclass for representing a row from the 'LIST_PARTICIPATED_LAST' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package classes.model
*/
*/
class ListParticipatedLast extends BaseListParticipatedLast
{
/**
@@ -24,7 +25,29 @@ class ListParticipatedLast extends BaseListParticipatedLast
*
*/
public function create($data)
{
{
$criteria = new Criteria();
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$criteria->add( UsersPeer::USR_UID, $data['USR_UID'], Criteria::EQUAL );
$dataset = UsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['DEL_CURRENT_USR_USERNAME'] = $aRow['USR_USERNAME'];
$data['DEL_CURRENT_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
$data['DEL_CURRENT_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
$criteria = new Criteria();
$criteria->addSelectColumn(ApplicationPeer::APP_STATUS);
$criteria->add( ApplicationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
$dataset = UsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['APP_STATUS'] = $aRow['APP_STATUS'];
$con = Propel::getConnection( ListParticipatedLastPeer::DATABASE_NAME );
try {
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
@@ -51,7 +74,8 @@ class ListParticipatedLast extends BaseListParticipatedLast
* @throws type
*/
public function update($data)
{
{
$data['DEL_THREAD_STATUS'] = (isset($data['DEL_THREAD_STATUS'])) ? $data['DEL_THREAD_STATUS'] : 'OPEN';
$con = Propel::getConnection( ListParticipatedLastPeer::DATABASE_NAME );
try {
$con->begin();
@@ -70,7 +94,34 @@ class ListParticipatedLast extends BaseListParticipatedLast
throw ($e);
}
}
/**
* Refresh List Participated Last
*
* @param type $seqName
* @return type
* @throws type
*
*/
public function refresh ($data)
{
$data['APP_STATUS'] = (empty($data['APP_STATUS'])) ? 'TO_DO' : $data['APP_STATUS'];
$criteria = new Criteria();
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$criteria->add( UsersPeer::USR_UID, $data['USR_UID'], Criteria::EQUAL );
$dataset = UsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['DEL_CURRENT_USR_UID'] = $data['USR_UID'];
$data['DEL_CURRENT_USR_USERNAME'] = $aRow['USR_USERNAME'];
$data['DEL_CURRENT_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
$data['DEL_CURRENT_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
$this->update($data);
}
/**
* Remove List Participated History
*
@@ -79,11 +130,12 @@ class ListParticipatedLast extends BaseListParticipatedLast
* @throws type
*
*/
public function remove ($app_uid, $usr_uid)
public function remove ($app_uid, $usr_uid, $del_index)
{
$con = Propel::getConnection( ListParticipatedLastPeer::DATABASE_NAME );
try {
$this->setAppUid($app_uid);
$this->setDelIndex($del_index);
$this->setUsrUid($usr_uid);
$con->begin();
@@ -118,8 +170,8 @@ class ListParticipatedLast extends BaseListParticipatedLast
if ($search != '') {
$criteria->add(
$criteria->getNewCriterion( 'CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
addOr( $criteria->getNewCriterion( 'CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
$criteria->getNewCriterion( ListParticipatedLastPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE )->
addOr( $criteria->getNewCriterion( ListParticipatedLastPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE )->
addOr( $criteria->getNewCriterion( ListParticipatedLastPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
}
@@ -175,6 +227,7 @@ class ListParticipatedLast extends BaseListParticipatedLast
$criteria = new Criteria();
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_UID);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INDEX);
$criteria->addSelectColumn(ListParticipatedLastPeer::USR_UID);
$criteria->addSelectColumn(ListParticipatedLastPeer::TAS_UID);
$criteria->addSelectColumn(ListParticipatedLastPeer::PRO_UID);
@@ -182,15 +235,24 @@ class ListParticipatedLast extends BaseListParticipatedLast
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_TITLE);
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_PRO_TITLE);
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_TAS_TITLE);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INDEX);
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_STATUS);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_CURRENT_USR_USERNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_CURRENT_USR_FIRSTNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_CURRENT_USR_LASTNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_DELEGATE_DATE);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INIT_DATE);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PRIORITY);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_THREAD_STATUS);
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
$criteria->addJoin(ListParticipatedLastPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$criteria->add( ListParticipatedLastPeer::USR_UID, $usr_uid, Criteria::EQUAL );
self::loadFilters($criteria, $filters);
@@ -225,3 +287,4 @@ class ListParticipatedLast extends BaseListParticipatedLast
return $data;
}
}

View File

@@ -0,0 +1,326 @@
<?php
require_once 'classes/model/om/BaseListPaused.php';
/**
* Skeleton subclass for representing a row from the 'LIST_PAUSED' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package classes.model
*/
class ListPaused extends BaseListPaused {
/**
* Create List Paused Table
*
* @param type $data
* @return type
*
*/
public function create($data)
{
$criteria = new Criteria();
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
$criteria->add( ContentPeer::CON_ID, $data['APP_UID'], Criteria::EQUAL );
$criteria->add( ContentPeer::CON_CATEGORY, 'APP_TITLE', Criteria::EQUAL );
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
$dataset = ContentPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['APP_TITLE'] = $aRow['CON_VALUE'];
$criteria = new Criteria();
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
$criteria->add( ContentPeer::CON_ID, $data['PRO_UID'], Criteria::EQUAL );
$criteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
$dataset = ContentPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['APP_PRO_TITLE'] = $aRow['CON_VALUE'];
$criteria = new Criteria();
$criteria->addSelectColumn(AppDelegationPeer::TAS_UID);
$criteria->addSelectColumn(AppDelegationPeer::DEL_INIT_DATE);
$criteria->addSelectColumn(AppDelegationPeer::DEL_DELEGATE_DATE);
$criteria->addSelectColumn(AppDelegationPeer::DEL_TASK_DUE_DATE);
$criteria->addSelectColumn(AppDelegationPeer::DEL_PREVIOUS);
$criteria->add( AppDelegationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
$criteria->add( AppDelegationPeer::DEL_INDEX, $data['DEL_INDEX'], Criteria::EQUAL );
$dataset = ContentPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['TAS_UID'] = $aRow['TAS_UID'];
$data['DEL_INIT_DATE'] = $aRow['DEL_INIT_DATE'];
$data['DEL_DUE_DATE'] = $aRow['DEL_TASK_DUE_DATE'];
$data['DEL_DELEGATE_DATE'] = $aRow['DEL_DELEGATE_DATE'];
$delPrevious = $aRow['DEL_PREVIOUS'];
$criteria = new Criteria();
$criteria->addSelectColumn(AppDelegationPeer::USR_UID);
$criteria->add( AppDelegationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
$criteria->add( AppDelegationPeer::DEL_INDEX, $delPrevious, Criteria::EQUAL );
$dataset = ContentPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['DEL_PREVIOUS_USR_UID'] = $aRow['USR_UID'];
$criteria = new Criteria();
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$criteria->add( UsersPeer::USR_UID, $data['DEL_PREVIOUS_USR_UID'], Criteria::EQUAL );
$dataset = UsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['DEL_PREVIOUS_USR_USERNAME'] = $aRow['USR_USERNAME'];
$data['DEL_PREVIOUS_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
$data['DEL_PREVIOUS_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
$criteria = new Criteria();
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
$criteria->add( ContentPeer::CON_ID, $data['TAS_UID'], Criteria::EQUAL );
$criteria->add( ContentPeer::CON_CATEGORY, 'TAS_TITLE', Criteria::EQUAL );
$criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
$dataset = ContentPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['APP_TAS_TITLE'] = $aRow['CON_VALUE'];
$criteria = new Criteria();
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
$criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$criteria->add( UsersPeer::USR_UID, $data['USR_UID'], Criteria::EQUAL );
$dataset = UsersPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
$data['DEL_CURRENT_USR_USERNAME'] = $aRow['USR_USERNAME'];
$data['DEL_CURRENT_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
$data['DEL_CURRENT_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
$data['APP_PAUSED_DATE'] = Date("Y-m-d H:i:s");
$oListInbox = new ListInbox();
$oListInbox->remove($data['APP_UID'], $data['DEL_INDEX']);
$con = Propel::getConnection( ListPausedPeer::DATABASE_NAME );
try {
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
if ($this->validate()) {
$result = $this->save();
} else {
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
$e->aValidationFailures = $this->getValidationFailures();
throw ($e);
}
$con->commit();
return $result;
} catch(Exception $e) {
$con->rollback();
throw ($e);
}
}
/**
* Update List Paused Table
*
* @param type $data
* @return type
* @throws type
*/
public function update($data)
{
$con = Propel::getConnection( ListPausedPeer::DATABASE_NAME );
try {
$con->begin();
$this->setNew( false );
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
if ($this->validate()) {
$result = $this->save();
$con->commit();
return $result;
} else {
$con->rollback();
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
}
} catch (Exception $e) {
$con->rollback();
throw ($e);
}
}
/**
* Remove List Paused
*
* @param type $seqName
* @return type
* @throws type
*
*/
public function remove ($app_uid, $del_index)
{
$con = Propel::getConnection( ListPausedPeer::DATABASE_NAME );
try {
$this->setAppUid($app_uid);
$this->setDelIndex($del_index);
$con->begin();
$this->delete();
$con->commit();
} catch (Exception $e) {
$con->rollback();
throw ($e);
}
}
public function loadFilters (&$criteria, $filters)
{
$filter = isset($filters['filter']) ? $filters['filter'] : "";
$search = isset($filters['search']) ? $filters['search'] : "";
$process = isset($filters['process']) ? $filters['process'] : "";
$category = isset($filters['category']) ? $filters['category'] : "";
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
if ($filter != '') {
switch ($filter) {
case 'read':
$criteria->add( ListPausedPeer::DEL_INIT_DATE, null, Criteria::ISNOTNULL );
break;
case 'unread':
$criteria->add( ListPausedPeer::DEL_INIT_DATE, null, Criteria::ISNULL );
break;
}
}
if ($search != '') {
$criteria->add(
$criteria->getNewCriterion( 'CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
addOr( $criteria->getNewCriterion( 'CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE )->
addOr( $criteria->getNewCriterion( ListPausedPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
}
if ($process != '') {
$criteria->add( ListPausedPeer::PRO_UID, $process, Criteria::EQUAL);
}
if ($category != '') {
// INNER JOIN FOR TAS_TITLE
$criteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
$aConditions = array();
$aConditions[] = array(ListPausedPeer::PRO_UID, ProcessPeer::PRO_UID);
$aConditions[] = array(ProcessPeer::PRO_CATEGORY, "'" . $category . "'");
$criteria->addJoinMC($aConditions, Criteria::INNER_JOIN);
}
if ($dateFrom != "") {
if ($dateTo != "") {
if ($dateFrom == $dateTo) {
$dateSame = $dateFrom;
$dateFrom = $dateSame . " 00:00:00";
$dateTo = $dateSame . " 23:59:59";
} else {
$dateFrom = $dateFrom . " 00:00:00";
$dateTo = $dateTo . " 23:59:59";
}
$criteria->add( $criteria->getNewCriterion( ListPausedPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
addAnd( $criteria->getNewCriterion( ListPausedPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
} else {
$dateFrom = $dateFrom . " 00:00:00";
$criteria->add( ListPausedPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL );
}
} elseif ($dateTo != "") {
$dateTo = $dateTo . " 23:59:59";
$criteria->add( ListPausedPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
}
}
public function countTotal ($usr_uid, $filters = array())
{
$criteria = new Criteria();
$criteria->add( ListPausedPeer::USR_UID, $usr_uid, Criteria::EQUAL );
self::loadFilters($criteria, $filters);
$total = ListPausedPeer::doCount( $criteria );
return (int)$total;
}
public function loadList ($usr_uid, $filters = array())
{
$resp = array();
$criteria = new Criteria();
$criteria->addSelectColumn(ListPausedPeer::APP_UID);
$criteria->addSelectColumn(ListPausedPeer::USR_UID);
$criteria->addSelectColumn(ListPausedPeer::TAS_UID);
$criteria->addSelectColumn(ListPausedPeer::PRO_UID);
$criteria->addSelectColumn(ListPausedPeer::APP_NUMBER);
$criteria->addSelectColumn(ListPausedPeer::APP_TITLE);
$criteria->addSelectColumn(ListPausedPeer::APP_PRO_TITLE);
$criteria->addSelectColumn(ListPausedPeer::APP_TAS_TITLE);
$criteria->addSelectColumn(ListPausedPeer::APP_PAUSED_DATE);
$criteria->addSelectColumn(ListPausedPeer::APP_RESTART_DATE);
$criteria->addSelectColumn(ListPausedPeer::DEL_INDEX);
$criteria->addSelectColumn(ListPausedPeer::DEL_PREVIOUS_USR_UID);
$criteria->addSelectColumn(ListPausedPeer::DEL_PREVIOUS_USR_USERNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_PREVIOUS_USR_FIRSTNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_PREVIOUS_USR_LASTNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_CURRENT_USR_FIRSTNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_CURRENT_USR_LASTNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_CURRENT_USR_USERNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_DELEGATE_DATE);
$criteria->addSelectColumn(ListPausedPeer::DEL_INIT_DATE);
$criteria->addSelectColumn(ListPausedPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListPausedPeer::DEL_PRIORITY);
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
$criteria->addJoin(ListPausedPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$criteria->add( ListPausedPeer::USR_UID, $usr_uid, Criteria::EQUAL );
self::loadFilters($criteria, $filters);
$sort = (!empty($filters['sort'])) ? $filters['sort'] : "APP_PAUSED_DATE";
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
$start = isset($filters['start']) ? $filters['start'] : "0";
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
if ($dir == "DESC") {
$criteria->addDescendingOrderByColumn($sort);
} else {
$criteria->addAscendingOrderByColumn($sort);
}
if ($paged == 1) {
$criteria->setLimit( $limit );
$criteria->setOffset( $start );
}
$dataset = ListPausedPeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$data = array();
while ($dataset->next()) {
$aRow = $dataset->getRow();
$data[] = $aRow;
}
return $data;
}
} // ListPaused

View File

@@ -0,0 +1,23 @@
<?php
// include base peer class
require_once 'classes/model/om/BaseListPausedPeer.php';
// include object class
include_once 'classes/model/ListPaused.php';
/**
* Skeleton subclass for performing query and update operations on the 'LIST_PAUSED' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package classes.model
*/
class ListPausedPeer extends BaseListPausedPeer {
} // ListPausedPeer

View File

@@ -6,7 +6,7 @@ require_once 'classes/model/om/BaseListUnassigned.php';
/**
* Skeleton subclass for representing a row from the 'LIST_UNASSIGNED' table.
*
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
@@ -263,6 +263,11 @@ class ListUnassigned extends BaseListUnassigned
$criteria->addSelectColumn(ListUnassignedPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListUnassignedPeer::DEL_PRIORITY);
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT");
$criteria->addJoin(ListUnassignedPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(TaskPeer::TAS_TYPE, $arrayTaskTypeToExclude, Criteria::NOT_IN);
$aConditions = array();
$aConditions[] = array(ListUnassignedPeer::UNA_UID, ListUnassignedGroupPeer::UNA_UID);
$aConditions[] = array(ListUnassignedGroupPeer::USR_UID, "'" . $usr_uid . "'");
@@ -312,4 +317,3 @@ class ListUnassigned extends BaseListUnassigned
}
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageApplication extends BaseMessageApplication
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageApplicationPeer extends BaseMessageApplicationPeer
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventDefinition extends BaseMessageEventDefinition
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventDefinitionPeer extends BaseMessageEventDefinitionPeer
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventRelation extends BaseMessageEventRelation
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventRelationPeer extends BaseMessageEventRelationPeer
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventTaskRelation extends BaseMessageEventTaskRelation
{
}

View File

@@ -0,0 +1,5 @@
<?php
class MessageEventTaskRelationPeer extends BaseMessageEventTaskRelationPeer
{
}

File diff suppressed because it is too large Load Diff

View File

@@ -182,7 +182,7 @@ class Process extends BaseProcess
$this->setProCategory( $aData['PRO_CATEGORY'] );
$this->setProSubCategory( '' );
$this->setProIndustry( '' );
$this->setProCreateDate( 'now' );
$this->setProCreateDate( date("Y-m-d H:i:s") );
$this->setProCreateUser( $aData['USR_UID'] );
$this->setProHeight( 5000 );
$this->setProWidth( 10000 );
@@ -326,6 +326,8 @@ class Process extends BaseProcess
}
$aFields['PRO_DYNAFORMS'] = @unserialize( $aFields['PRO_DYNAFORMS'] );
//Check if is BPMN process
$aFields['PRO_BPMN'] = $this->isBpmnProcess($ProUid);
return $aFields;
} else {
@@ -1009,5 +1011,21 @@ class Process extends BaseProcess
return 0;
}
}
/**
* Check is the Process is BPMN.
*
* @param string $ProUid the uid of the Prolication
* @return int 1 if is BPMN process or 0 if a Normal process
*/
public function isBpmnProcess($proUid){
$c = new Criteria("workflow");
$c->add(BpmnProcessPeer::PRJ_UID, $proUid);
$res = BpmnProcessPeer::doSelect($c);
if( sizeof($res) == 0 ){
return 0;
}else{
return 1;
}
}
}

View File

@@ -155,7 +155,7 @@ class Triggers extends BaseTriggers
} else {
$this->setTriUid($aData['TRI_UID'] );
}
$triggerUid = $this->getTriUid();
$this->setProUid($aData['PRO_UID']);
$this->setTriType("SCRIPT");
@@ -183,6 +183,13 @@ class Triggers extends BaseTriggers
}
$result=$this->save();
$con->commit();
//Add Audit Log
$description = "Trigger Name: ".$aData['TRI_TITLE'].", Trigger Uid: ".$triggerUid;
if (isset ( $aData['TRI_DESCRIPTION'] )) {
$description .= ", Description: ".$aData['TRI_DESCRIPTION'];
}
G::auditLog("CreateTrigger", $description);
return $result;
} else {
$con->rollback();
@@ -233,10 +240,14 @@ class Triggers extends BaseTriggers
$con->begin();
$oTri = TriggersPeer::retrieveByPK( $TriUid );
if (!is_null($oTri)) {
Content::removeContent( 'TRI_TITLE', '', $this->getTriUid());
Content::removeContent( 'TRI_DESCRIPTION', '', $this->getTriUid());
Content::removeContent("TRI_TITLE", "", $TriUid);
Content::removeContent("TRI_DESCRIPTION", "", $TriUid);
$result = $oTri->delete();
$con->commit();
//Add Audit Log
G::auditLog("DeleteTrigger", "Trigger Name: " . $oTri->getTriTitle() . ", Trigger Uid: " . $TriUid . ", Description: " . $oTri->getTriDescription());
}
return $result;
} catch (Exception $e) {

View File

@@ -3,6 +3,7 @@
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'ADDONS_STORE' table to 'workflow' DatabaseMap object.
*
@@ -17,9 +18,10 @@ include_once 'creole/CreoleTypes.php';
*/
class AddonsStoreMapBuilder
{
/**
* The (dot-path) name of this class
*/
*/
const CLASS_NAME = 'classes.model.map.AddonsStoreMapBuilder';
/**
@@ -43,7 +45,6 @@ class AddonsStoreMapBuilder
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
@@ -55,13 +56,11 @@ class AddonsStoreMapBuilder
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('ADDONS_STORE');
$tMap->setPhpName('AddonsStore');
$tMap->setUseIdGenerator(false);
@@ -75,6 +74,7 @@ class AddonsStoreMapBuilder
$tMap->addColumn('STORE_TYPE', 'StoreType', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('STORE_LAST_UPDATED', 'StoreLastUpdated', 'int', CreoleTypes::TIMESTAMP, false, null);
}
}
} // doBuild()
} // AddonsStoreMapBuilder

View File

@@ -79,9 +79,9 @@ class EmailServerMapBuilder
$tMap->addColumn('MESS_PASSWORD', 'MessPassword', 'string', CreoleTypes::VARCHAR, true, 256);
$tMap->addColumn('MESS_FROM_MAIL', 'MessFromMail', 'string', CreoleTypes::VARCHAR, true, 256);
$tMap->addColumn('MESS_FROM_MAIL', 'MessFromMail', 'string', CreoleTypes::VARCHAR, false, 256);
$tMap->addColumn('MESS_FROM_NAME', 'MessFromName', 'string', CreoleTypes::VARCHAR, true, 256);
$tMap->addColumn('MESS_FROM_NAME', 'MessFromName', 'string', CreoleTypes::VARCHAR, false, 256);
$tMap->addColumn('SMTPSECURE', 'Smtpsecure', 'string', CreoleTypes::VARCHAR, true, 3);

View File

@@ -0,0 +1,106 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'LIST_CANCELED' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class ListCanceledMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.ListCanceledMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('LIST_CANCELED');
$tMap->setPhpName('ListCanceled');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('APP_TITLE', 'AppTitle', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('APP_PRO_TITLE', 'AppProTitle', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('APP_CANCELED_DATE', 'AppCanceledDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('DEL_PREVIOUS_USR_UID', 'DelPreviousUsrUid', 'string', CreoleTypes::VARCHAR, false, 32);
$tMap->addColumn('DEL_CURRENT_USR_USERNAME', 'DelCurrentUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
$tMap->addColumn('DEL_CURRENT_USR_FIRSTNAME', 'DelCurrentUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
$tMap->addColumn('DEL_CURRENT_USR_LASTNAME', 'DelCurrentUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
$tMap->addColumn('DEL_DELEGATE_DATE', 'DelDelegateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('DEL_INIT_DATE', 'DelInitDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('DEL_DUE_DATE', 'DelDueDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('DEL_PRIORITY', 'DelPriority', 'string', CreoleTypes::VARCHAR, true, 32);
} // doBuild()
} // ListCanceledMapBuilder

View File

@@ -3,7 +3,6 @@
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'LIST_INBOX' table to 'workflow' DatabaseMap object.
*
@@ -16,6 +15,7 @@ include_once 'creole/CreoleTypes.php';
*
* @package workflow.classes.model.map
*/
class ListInboxMapBuilder
{
@@ -76,6 +76,8 @@ class ListInboxMapBuilder
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('APP_STATUS', 'AppStatus', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('APP_TITLE', 'AppTitle', 'string', CreoleTypes::VARCHAR, true, 255);

View File

@@ -81,11 +81,11 @@ class ListMyInboxMapBuilder
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('APP_CREATE_DATE', 'AppCreateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('APP_CREATE_DATE', 'AppCreateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('APP_UPDATE_DATE', 'AppUpdateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('APP_UPDATE_DATE', 'AppUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('APP_FINISH_DATE', 'AppFinishDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('APP_FINISH_DATE', 'AppFinishDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('APP_STATUS', 'AppStatus', 'string', CreoleTypes::VARCHAR, true, 100);

View File

@@ -3,7 +3,6 @@
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'LIST_PARTICIPATED_LAST' table to 'workflow' DatabaseMap object.
*
@@ -16,6 +15,7 @@ include_once 'creole/CreoleTypes.php';
*
* @package workflow.classes.model.map
*/
class ListParticipatedLastMapBuilder
{
@@ -66,7 +66,9 @@ class ListParticipatedLastMapBuilder
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addPrimaryKey('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addPrimaryKey('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
@@ -81,7 +83,7 @@ class ListParticipatedLastMapBuilder
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('APP_STATUS', 'AppStatus', 'string', CreoleTypes::VARCHAR, false, 20);
$tMap->addColumn('DEL_PREVIOUS_USR_UID', 'DelPreviousUsrUid', 'string', CreoleTypes::VARCHAR, false, 32);
@@ -91,6 +93,12 @@ class ListParticipatedLastMapBuilder
$tMap->addColumn('DEL_PREVIOUS_USR_LASTNAME', 'DelPreviousUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
$tMap->addColumn('DEL_CURRENT_USR_USERNAME', 'DelCurrentUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
$tMap->addColumn('DEL_CURRENT_USR_FIRSTNAME', 'DelCurrentUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
$tMap->addColumn('DEL_CURRENT_USR_LASTNAME', 'DelCurrentUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
$tMap->addColumn('DEL_DELEGATE_DATE', 'DelDelegateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('DEL_INIT_DATE', 'DelInitDate', 'int', CreoleTypes::TIMESTAMP, false, null);
@@ -98,6 +106,8 @@ class ListParticipatedLastMapBuilder
$tMap->addColumn('DEL_DUE_DATE', 'DelDueDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('DEL_PRIORITY', 'DelPriority', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('DEL_THREAD_STATUS', 'DelThreadStatus', 'string', CreoleTypes::VARCHAR, false, 32);
} // doBuild()

View File

@@ -0,0 +1,114 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'LIST_PAUSED' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class ListPausedMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.ListPausedMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('LIST_PAUSED');
$tMap->setPhpName('ListPaused');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addPrimaryKey('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('APP_TITLE', 'AppTitle', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('APP_PRO_TITLE', 'AppProTitle', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('APP_PAUSED_DATE', 'AppPausedDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('APP_RESTART_DATE', 'AppRestartDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('DEL_PREVIOUS_USR_UID', 'DelPreviousUsrUid', 'string', CreoleTypes::VARCHAR, false, 32);
$tMap->addColumn('DEL_PREVIOUS_USR_USERNAME', 'DelPreviousUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
$tMap->addColumn('DEL_PREVIOUS_USR_FIRSTNAME', 'DelPreviousUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
$tMap->addColumn('DEL_PREVIOUS_USR_LASTNAME', 'DelPreviousUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
$tMap->addColumn('DEL_CURRENT_USR_USERNAME', 'DelCurrentUsrUsername', 'string', CreoleTypes::VARCHAR, false, 100);
$tMap->addColumn('DEL_CURRENT_USR_FIRSTNAME', 'DelCurrentUsrFirstname', 'string', CreoleTypes::VARCHAR, false, 50);
$tMap->addColumn('DEL_CURRENT_USR_LASTNAME', 'DelCurrentUsrLastname', 'string', CreoleTypes::VARCHAR, false, 50);
$tMap->addColumn('DEL_DELEGATE_DATE', 'DelDelegateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('DEL_INIT_DATE', 'DelInitDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('DEL_DUE_DATE', 'DelDueDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('DEL_PRIORITY', 'DelPriority', 'string', CreoleTypes::VARCHAR, true, 32);
} // doBuild()
} // ListPausedMapBuilder

View File

@@ -0,0 +1,92 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'MESSAGE_APPLICATION' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class MessageApplicationMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.MessageApplicationMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('MESSAGE_APPLICATION');
$tMap->setPhpName('MessageApplication');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('MSGAPP_UID', 'MsgappUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID_THROW', 'EvnUidThrow', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID_CATCH', 'EvnUidCatch', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MSGAPP_VARIABLES', 'MsgappVariables', 'string', CreoleTypes::LONGVARCHAR, true, null);
$tMap->addColumn('MSGAPP_CORRELATION', 'MsgappCorrelation', 'string', CreoleTypes::VARCHAR, true, 512);
$tMap->addColumn('MSGAPP_THROW_DATE', 'MsgappThrowDate', 'int', CreoleTypes::TIMESTAMP, true, null);
$tMap->addColumn('MSGAPP_CATCH_DATE', 'MsgappCatchDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('MSGAPP_STATUS', 'MsgappStatus', 'string', CreoleTypes::VARCHAR, true, 25);
$tMap->addValidator('MSGAPP_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'READ|UNREAD', 'Please enter a valid value for MSGAPP_STATUS');
} // doBuild()
} // MessageApplicationMapBuilder

View File

@@ -0,0 +1,84 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'MESSAGE_EVENT_DEFINITION' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class MessageEventDefinitionMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.MessageEventDefinitionMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('MESSAGE_EVENT_DEFINITION');
$tMap->setPhpName('MessageEventDefinition');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('MSGED_UID', 'MsgedUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID', 'EvnUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MSGT_UID', 'MsgtUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MSGED_USR_UID', 'MsgedUsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('MSGED_VARIABLES', 'MsgedVariables', 'string', CreoleTypes::LONGVARCHAR, true, null);
$tMap->addColumn('MSGED_CORRELATION', 'MsgedCorrelation', 'string', CreoleTypes::VARCHAR, true, 512);
} // doBuild()
} // MessageEventDefinitionMapBuilder

View File

@@ -0,0 +1,78 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'MESSAGE_EVENT_RELATION' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class MessageEventRelationMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.MessageEventRelationMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('MESSAGE_EVENT_RELATION');
$tMap->setPhpName('MessageEventRelation');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('MSGER_UID', 'MsgerUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID_THROW', 'EvnUidThrow', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID_CATCH', 'EvnUidCatch', 'string', CreoleTypes::VARCHAR, true, 32);
} // doBuild()
} // MessageEventRelationMapBuilder

View File

@@ -0,0 +1,78 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'MESSAGE_EVENT_TASK_RELATION' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class MessageEventTaskRelationMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.MessageEventTaskRelationMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('MESSAGE_EVENT_TASK_RELATION');
$tMap->setPhpName('MessageEventTaskRelation');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('MSGETR_UID', 'MsgetrUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID', 'EvnUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
} // doBuild()
} // MessageEventTaskRelationMapBuilder

View File

@@ -69,7 +69,7 @@ class TaskMapBuilder
$tMap->addPrimaryKey('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('TAS_TYPE', 'TasType', 'string', CreoleTypes::VARCHAR, true, 20);
$tMap->addColumn('TAS_TYPE', 'TasType', 'string', CreoleTypes::VARCHAR, true, 50);
$tMap->addColumn('TAS_DURATION', 'TasDuration', 'double', CreoleTypes::DOUBLE, true, null);
@@ -159,7 +159,7 @@ class TaskMapBuilder
$tMap->addColumn('TAS_SELFSERVICE_EXECUTION', 'TasSelfserviceExecution', 'string', CreoleTypes::VARCHAR, false, 15);
$tMap->addValidator('TAS_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'NORMAL|ADHOC|SUBPROCESS|HIDDEN|GATEWAYTOGATEWAY|WEBENTRYEVENT', 'Please enter a valid value for TAS_TYPE');
$tMap->addValidator('TAS_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'NORMAL|ADHOC|SUBPROCESS|HIDDEN|GATEWAYTOGATEWAY|WEBENTRYEVENT|END-MESSAGE-EVENT|START-MESSAGE-EVENT|INTERMEDIATE-THROW-MESSAGE-EVENT|INTERMEDIATE-CATCH-MESSAGE-EVENT', 'Please enter a valid value for TAS_TYPE');
$tMap->addValidator('TAS_TIMEUNIT', 'validValues', 'propel.validator.ValidValuesValidator', 'MINUTES|HOURS|DAYS|WEEKS|MONTHS', 'Please select a valid value for TAS_TIMEUNIT.');

View File

@@ -141,7 +141,7 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
*/
protected $flo_position = 0;
/**
/**
* @var BpmnProject
*/
protected $aBpmnProject;
@@ -365,7 +365,7 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
/**
* Get the [flo_position] column value.
*
*
* @return int
*/
public function getFloPosition()
@@ -374,7 +374,7 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
return $this->flo_position;
}
/*
/**
* Set the value of [flo_uid] column.
*
* @param string $v new value
@@ -780,7 +780,7 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
/**
* Set the value of [flo_position] column.
*
*
* @param int $v new value
* @return void
*/
@@ -794,9 +794,9 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
}
if ($this->flo_position !== $v || $v === 0) {
$this->flo_position = $v;
$this->modifiedColumns[] = BpmnFlowPeer::FLO_POSITION;
}
$this->flo_position = $v;
$this->modifiedColumns[] = BpmnFlowPeer::FLO_POSITION;
}
} // setFloPosition()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,652 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by ListCanceledPeer::getOMClass()
include_once 'classes/model/ListCanceled.php';
/**
* Base static class for performing query and update operations on the 'LIST_CANCELED' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseListCanceledPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'LIST_CANCELED';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.ListCanceled';
/** The total number of columns. */
const NUM_COLUMNS = 18;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the APP_UID field */
const APP_UID = 'LIST_CANCELED.APP_UID';
/** the column name for the USR_UID field */
const USR_UID = 'LIST_CANCELED.USR_UID';
/** the column name for the TAS_UID field */
const TAS_UID = 'LIST_CANCELED.TAS_UID';
/** the column name for the PRO_UID field */
const PRO_UID = 'LIST_CANCELED.PRO_UID';
/** the column name for the APP_NUMBER field */
const APP_NUMBER = 'LIST_CANCELED.APP_NUMBER';
/** the column name for the APP_TITLE field */
const APP_TITLE = 'LIST_CANCELED.APP_TITLE';
/** the column name for the APP_PRO_TITLE field */
const APP_PRO_TITLE = 'LIST_CANCELED.APP_PRO_TITLE';
/** the column name for the APP_TAS_TITLE field */
const APP_TAS_TITLE = 'LIST_CANCELED.APP_TAS_TITLE';
/** the column name for the APP_CANCELED_DATE field */
const APP_CANCELED_DATE = 'LIST_CANCELED.APP_CANCELED_DATE';
/** the column name for the DEL_INDEX field */
const DEL_INDEX = 'LIST_CANCELED.DEL_INDEX';
/** the column name for the DEL_PREVIOUS_USR_UID field */
const DEL_PREVIOUS_USR_UID = 'LIST_CANCELED.DEL_PREVIOUS_USR_UID';
/** the column name for the DEL_CURRENT_USR_USERNAME field */
const DEL_CURRENT_USR_USERNAME = 'LIST_CANCELED.DEL_CURRENT_USR_USERNAME';
/** the column name for the DEL_CURRENT_USR_FIRSTNAME field */
const DEL_CURRENT_USR_FIRSTNAME = 'LIST_CANCELED.DEL_CURRENT_USR_FIRSTNAME';
/** the column name for the DEL_CURRENT_USR_LASTNAME field */
const DEL_CURRENT_USR_LASTNAME = 'LIST_CANCELED.DEL_CURRENT_USR_LASTNAME';
/** the column name for the DEL_DELEGATE_DATE field */
const DEL_DELEGATE_DATE = 'LIST_CANCELED.DEL_DELEGATE_DATE';
/** the column name for the DEL_INIT_DATE field */
const DEL_INIT_DATE = 'LIST_CANCELED.DEL_INIT_DATE';
/** the column name for the DEL_DUE_DATE field */
const DEL_DUE_DATE = 'LIST_CANCELED.DEL_DUE_DATE';
/** the column name for the DEL_PRIORITY field */
const DEL_PRIORITY = 'LIST_CANCELED.DEL_PRIORITY';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AppUid', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'AppCanceledDate', 'DelIndex', 'DelPreviousUsrUid', 'DelCurrentUsrUsername', 'DelCurrentUsrFirstname', 'DelCurrentUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', ),
BasePeer::TYPE_COLNAME => array (ListCanceledPeer::APP_UID, ListCanceledPeer::USR_UID, ListCanceledPeer::TAS_UID, ListCanceledPeer::PRO_UID, ListCanceledPeer::APP_NUMBER, ListCanceledPeer::APP_TITLE, ListCanceledPeer::APP_PRO_TITLE, ListCanceledPeer::APP_TAS_TITLE, ListCanceledPeer::APP_CANCELED_DATE, ListCanceledPeer::DEL_INDEX, ListCanceledPeer::DEL_PREVIOUS_USR_UID, ListCanceledPeer::DEL_CURRENT_USR_USERNAME, ListCanceledPeer::DEL_CURRENT_USR_FIRSTNAME, ListCanceledPeer::DEL_CURRENT_USR_LASTNAME, ListCanceledPeer::DEL_DELEGATE_DATE, ListCanceledPeer::DEL_INIT_DATE, ListCanceledPeer::DEL_DUE_DATE, ListCanceledPeer::DEL_PRIORITY, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'APP_CANCELED_DATE', 'DEL_INDEX', 'DEL_PREVIOUS_USR_UID', 'DEL_CURRENT_USR_USERNAME', 'DEL_CURRENT_USR_FIRSTNAME', 'DEL_CURRENT_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
);
/**
* holds an array of keys for quick access to the fieldnames array
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'UsrUid' => 1, 'TasUid' => 2, 'ProUid' => 3, 'AppNumber' => 4, 'AppTitle' => 5, 'AppProTitle' => 6, 'AppTasTitle' => 7, 'AppCanceledDate' => 8, 'DelIndex' => 9, 'DelPreviousUsrUid' => 10, 'DelCurrentUsrUsername' => 11, 'DelCurrentUsrFirstname' => 12, 'DelCurrentUsrLastname' => 13, 'DelDelegateDate' => 14, 'DelInitDate' => 15, 'DelDueDate' => 16, 'DelPriority' => 17, ),
BasePeer::TYPE_COLNAME => array (ListCanceledPeer::APP_UID => 0, ListCanceledPeer::USR_UID => 1, ListCanceledPeer::TAS_UID => 2, ListCanceledPeer::PRO_UID => 3, ListCanceledPeer::APP_NUMBER => 4, ListCanceledPeer::APP_TITLE => 5, ListCanceledPeer::APP_PRO_TITLE => 6, ListCanceledPeer::APP_TAS_TITLE => 7, ListCanceledPeer::APP_CANCELED_DATE => 8, ListCanceledPeer::DEL_INDEX => 9, ListCanceledPeer::DEL_PREVIOUS_USR_UID => 10, ListCanceledPeer::DEL_CURRENT_USR_USERNAME => 11, ListCanceledPeer::DEL_CURRENT_USR_FIRSTNAME => 12, ListCanceledPeer::DEL_CURRENT_USR_LASTNAME => 13, ListCanceledPeer::DEL_DELEGATE_DATE => 14, ListCanceledPeer::DEL_INIT_DATE => 15, ListCanceledPeer::DEL_DUE_DATE => 16, ListCanceledPeer::DEL_PRIORITY => 17, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'USR_UID' => 1, 'TAS_UID' => 2, 'PRO_UID' => 3, 'APP_NUMBER' => 4, 'APP_TITLE' => 5, 'APP_PRO_TITLE' => 6, 'APP_TAS_TITLE' => 7, 'APP_CANCELED_DATE' => 8, 'DEL_INDEX' => 9, 'DEL_PREVIOUS_USR_UID' => 10, 'DEL_CURRENT_USR_USERNAME' => 11, 'DEL_CURRENT_USR_FIRSTNAME' => 12, 'DEL_CURRENT_USR_LASTNAME' => 13, 'DEL_DELEGATE_DATE' => 14, 'DEL_INIT_DATE' => 15, 'DEL_DUE_DATE' => 16, 'DEL_PRIORITY' => 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
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getMapBuilder()
{
include_once 'classes/model/map/ListCanceledMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.ListCanceledMapBuilder');
}
/**
* Gets a map (hash) of PHP names to DB column names.
*
* @return array The PHP to DB name map for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
$map = ListCanceledPeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName();
}
self::$phpNameMap = $nameMap;
}
return self::$phpNameMap;
}
/**
* Translates a fieldname to another type
*
* @param string $name field name
* @param string $fromType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @param string $toType One of the class type constants
* @return string translated name of the field.
*/
static public function translateFieldName($name, $fromType, $toType)
{
$toNames = self::getFieldNames($toType);
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : 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));
}
return $toNames[$key];
}
/**
* Returns an array of of field names.
*
* @param string $type The type of fieldnames to return:
* One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return array A list of field names
*/
static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{
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.');
}
return self::$fieldNames[$type];
}
/**
* Convenience method which changes table.column to alias.column.
*
* Using this method you can maintain SQL abstraction while using column aliases.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. ListCanceledPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(ListCanceledPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
* Add all the columns needed to create a new object.
*
* Note: any columns that were marked with lazyLoad="true" in the
* XML schema will not be added to the select list and only loaded
* on demand.
*
* @param criteria object containing the columns to add.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria)
{
$criteria->addSelectColumn(ListCanceledPeer::APP_UID);
$criteria->addSelectColumn(ListCanceledPeer::USR_UID);
$criteria->addSelectColumn(ListCanceledPeer::TAS_UID);
$criteria->addSelectColumn(ListCanceledPeer::PRO_UID);
$criteria->addSelectColumn(ListCanceledPeer::APP_NUMBER);
$criteria->addSelectColumn(ListCanceledPeer::APP_TITLE);
$criteria->addSelectColumn(ListCanceledPeer::APP_PRO_TITLE);
$criteria->addSelectColumn(ListCanceledPeer::APP_TAS_TITLE);
$criteria->addSelectColumn(ListCanceledPeer::APP_CANCELED_DATE);
$criteria->addSelectColumn(ListCanceledPeer::DEL_INDEX);
$criteria->addSelectColumn(ListCanceledPeer::DEL_PREVIOUS_USR_UID);
$criteria->addSelectColumn(ListCanceledPeer::DEL_CURRENT_USR_USERNAME);
$criteria->addSelectColumn(ListCanceledPeer::DEL_CURRENT_USR_FIRSTNAME);
$criteria->addSelectColumn(ListCanceledPeer::DEL_CURRENT_USR_LASTNAME);
$criteria->addSelectColumn(ListCanceledPeer::DEL_DELEGATE_DATE);
$criteria->addSelectColumn(ListCanceledPeer::DEL_INIT_DATE);
$criteria->addSelectColumn(ListCanceledPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListCanceledPeer::DEL_PRIORITY);
}
const COUNT = 'COUNT(LIST_CANCELED.APP_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT LIST_CANCELED.APP_UID)';
/**
* Returns the number of rows matching criteria.
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
* @param Connection $con
* @return int Number of matching rows.
*/
public static function doCount(Criteria $criteria, $distinct = false, $con = null)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn(ListCanceledPeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(ListCanceledPeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn($column);
}
$rs = ListCanceledPeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
} else {
// no rows returned; we infer that means 0 matches.
return 0;
}
}
/**
* Method to select one object from the DB.
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con
* @return ListCanceled
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectOne(Criteria $criteria, $con = null)
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = ListCanceledPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
return null;
}
/**
* Method to do selects.
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con
* @return array Array of selected Objects
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelect(Criteria $criteria, $con = null)
{
return ListCanceledPeer::populateObjects(ListCanceledPeer::doSelectRS($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect()
* method to get a ResultSet.
*
* Use this method directly if you want to just get the resultset
* (instead of an array of objects).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect()
*/
public static function doSelectRS(Criteria $criteria, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria;
ListCanceledPeer::addSelectColumns($criteria);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
// BasePeer returns a Creole ResultSet, set to return
// rows indexed numerically.
return BasePeer::doSelect($criteria, $con);
}
/**
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function populateObjects(ResultSet $rs)
{
$results = array();
// set the class once to avoid overhead in the loop
$cls = ListCanceledPeer::getOMClass();
$cls = Propel::import($cls);
// populate the object(s)
while ($rs->next()) {
$obj = new $cls();
$obj->hydrate($rs);
$results[] = $obj;
}
return $results;
}
/**
* Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need.
* @return TableMap
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
}
/**
* The class that the Peer will make instances of.
*
* This uses a dot-path notation which is tranalted into a path
* relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
*
* @return string path.to.ClassName
*/
public static function getOMClass()
{
return ListCanceledPeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a ListCanceled or Criteria object.
*
* @param mixed $values Criteria or ListCanceled object containing data that is used to create the INSERT statement.
* @param Connection $con the connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doInsert($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
$criteria = $values->buildCriteria(); // build Criteria from ListCanceled object
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
try {
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
$con->begin();
$pk = BasePeer::doInsert($criteria, $con);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
return $pk;
}
/**
* Method perform an UPDATE on the database, given a ListCanceled or Criteria object.
*
* @param mixed $values Criteria or ListCanceled object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doUpdate($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison(ListCanceledPeer::APP_UID);
$selectCriteria->add(ListCanceledPeer::APP_UID, $criteria->remove(ListCanceledPeer::APP_UID), $comparison);
} else {
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
// set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
return BasePeer::doUpdate($selectCriteria, $criteria, $con);
}
/**
* Method to DELETE all rows from the LIST_CANCELED table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDeleteAll(ListCanceledPeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Method perform a DELETE on the database, given a ListCanceled or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or ListCanceled object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
* This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(ListCanceledPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof ListCanceled) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(ListCanceledPeer::APP_UID, (array) $values, Criteria::IN);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Validates all modified columns of given ListCanceled object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
* @param ListCanceled $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
public static function doValidate(ListCanceled $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(ListCanceledPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(ListCanceledPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
}
foreach ($cols as $colName) {
if ($tableMap->containsColumn($colName)) {
$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
$columns[$colName] = $obj->$get();
}
}
} else {
}
return BasePeer::doValidate(ListCanceledPeer::DATABASE_NAME, ListCanceledPeer::TABLE_NAME, $columns);
}
/**
* Retrieve a single object by pkey.
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return ListCanceled
*/
public static function retrieveByPK($pk, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(ListCanceledPeer::DATABASE_NAME);
$criteria->add(ListCanceledPeer::APP_UID, $pk);
$v = ListCanceledPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
/**
* Retrieve multiple objects by pkey.
*
* @param array $pks List of primary keys
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function retrieveByPKs($pks, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
$criteria = new Criteria();
$criteria->add(ListCanceledPeer::APP_UID, $pks, Criteria::IN);
$objs = ListCanceledPeer::doSelect($criteria, $con);
}
return $objs;
}
}
// static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization
// so we need to load them here.
try {
BaseListCanceledPeer::getMapBuilder();
} catch (Exception $e) {
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
}
} else {
// even if Propel is not yet initialized, the map builder class can be registered
// now and then it will be loaded when Propel initializes.
require_once 'classes/model/map/ListCanceledMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.ListCanceledMapBuilder');
}

View File

@@ -9,13 +9,15 @@ include_once 'propel/util/Criteria.php';
include_once 'classes/model/ListInboxPeer.php';
/**
* Base class that represents a row from the 'LIST_INBOX' table.
*
*
*
* @package workflow.classes.model.om
*/
*/
abstract class BaseListInbox extends BaseObject implements Persistent
{
@@ -62,6 +64,12 @@ abstract class BaseListInbox extends BaseObject implements Persistent
* @var int
*/
protected $app_number = 0;
/**
* The value for the app_status field.
* @var string
*/
protected $app_status = '';
/**
* The value for the app_title field.
@@ -214,6 +222,17 @@ abstract class BaseListInbox extends BaseObject implements Persistent
return $this->app_number;
}
/**
* Get the [app_status] column value.
*
* @return string
*/
public function getAppStatus()
{
return $this->app_status;
}
/**
* Get the [app_title] column value.
@@ -562,7 +581,28 @@ abstract class BaseListInbox extends BaseObject implements Persistent
}
} // setAppNumber()
/**
* Set the value of [app_status] column.
*
* @param string $v new value
* @return void
*/
public function setAppStatus($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_status !== $v || $v === '') {
$this->app_status = $v;
$this->modifiedColumns[] = ListInboxPeer::APP_STATUS;
}
} // setAppStatus()
/**
* Set the value of [app_title] column.
*
@@ -883,37 +923,39 @@ abstract class BaseListInbox extends BaseObject implements Persistent
$this->pro_uid = $rs->getString($startcol + 4);
$this->app_number = $rs->getInt($startcol + 5);
$this->app_status = $rs->getString($startcol + 6);
$this->app_title = $rs->getString($startcol + 6);
$this->app_title = $rs->getString($startcol + 7);
$this->app_pro_title = $rs->getString($startcol + 7);
$this->app_pro_title = $rs->getString($startcol + 8);
$this->app_tas_title = $rs->getString($startcol + 8);
$this->app_tas_title = $rs->getString($startcol + 9);
$this->app_update_date = $rs->getTimestamp($startcol + 9, null);
$this->app_update_date = $rs->getTimestamp($startcol + 10, null);
$this->del_previous_usr_uid = $rs->getString($startcol + 10);
$this->del_previous_usr_uid = $rs->getString($startcol + 11);
$this->del_previous_usr_username = $rs->getString($startcol + 11);
$this->del_previous_usr_username = $rs->getString($startcol + 12);
$this->del_previous_usr_firstname = $rs->getString($startcol + 12);
$this->del_previous_usr_firstname = $rs->getString($startcol + 13);
$this->del_previous_usr_lastname = $rs->getString($startcol + 13);
$this->del_previous_usr_lastname = $rs->getString($startcol + 14);
$this->del_delegate_date = $rs->getTimestamp($startcol + 14, null);
$this->del_delegate_date = $rs->getTimestamp($startcol + 15, null);
$this->del_init_date = $rs->getTimestamp($startcol + 15, null);
$this->del_init_date = $rs->getTimestamp($startcol + 16, null);
$this->del_due_date = $rs->getTimestamp($startcol + 16, null);
$this->del_due_date = $rs->getTimestamp($startcol + 17, null);
$this->del_priority = $rs->getString($startcol + 17);
$this->del_priority = $rs->getString($startcol + 18);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 18; // 18 = ListInboxPeer::NUM_COLUMNS - ListInboxPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 19; // 18 = ListInboxPeer::NUM_COLUMNS - ListInboxPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating ListInbox object", $e);
@@ -1136,41 +1178,45 @@ abstract class BaseListInbox extends BaseObject implements Persistent
return $this->getAppNumber();
break;
case 6:
return $this->getAppTitle();
return $this->getAppStatus();
break;
case 7:
return $this->getAppProTitle();
return $this->getAppTitle();
break;
case 8:
return $this->getAppTasTitle();
return $this->getAppProTitle();
break;
case 9:
return $this->getAppUpdateDate();
return $this->getAppTasTitle();
break;
case 10:
return $this->getDelPreviousUsrUid();
return $this->getAppUpdateDate();
break;
case 11:
return $this->getDelPreviousUsrUsername();
return $this->getDelPreviousUsrUid();
break;
case 12:
return $this->getDelPreviousUsrFirstname();
return $this->getDelPreviousUsrUsername();
break;
case 13:
return $this->getDelPreviousUsrLastname();
return $this->getDelPreviousUsrFirstname();
break;
case 14:
return $this->getDelDelegateDate();
return $this->getDelPreviousUsrLastname();
break;
case 15:
return $this->getDelInitDate();
return $this->getDelDelegateDate();
break;
case 16:
return $this->getDelDueDate();
return $this->getDelInitDate();
break;
case 17:
return $this->getDelDueDate();
break;
case 18:
return $this->getDelPriority();
break;
default:
return null;
break;
@@ -1197,18 +1243,19 @@ abstract class BaseListInbox extends BaseObject implements Persistent
$keys[3] => $this->getTasUid(),
$keys[4] => $this->getProUid(),
$keys[5] => $this->getAppNumber(),
$keys[6] => $this->getAppTitle(),
$keys[7] => $this->getAppProTitle(),
$keys[8] => $this->getAppTasTitle(),
$keys[9] => $this->getAppUpdateDate(),
$keys[10] => $this->getDelPreviousUsrUid(),
$keys[11] => $this->getDelPreviousUsrUsername(),
$keys[12] => $this->getDelPreviousUsrFirstname(),
$keys[13] => $this->getDelPreviousUsrLastname(),
$keys[14] => $this->getDelDelegateDate(),
$keys[15] => $this->getDelInitDate(),
$keys[16] => $this->getDelDueDate(),
$keys[17] => $this->getDelPriority(),
$keys[6] => $this->getAppStatus(),
$keys[7] => $this->getAppTitle(),
$keys[8] => $this->getAppProTitle(),
$keys[9] => $this->getAppTasTitle(),
$keys[10] => $this->getAppUpdateDate(),
$keys[11] => $this->getDelPreviousUsrUid(),
$keys[12] => $this->getDelPreviousUsrUsername(),
$keys[13] => $this->getDelPreviousUsrFirstname(),
$keys[14] => $this->getDelPreviousUsrLastname(),
$keys[15] => $this->getDelDelegateDate(),
$keys[16] => $this->getDelInitDate(),
$keys[17] => $this->getDelDueDate(),
$keys[18] => $this->getDelPriority(),
);
return $result;
}
@@ -1259,39 +1306,42 @@ abstract class BaseListInbox extends BaseObject implements Persistent
$this->setAppNumber($value);
break;
case 6:
$this->setAppTitle($value);
$this->setAppStatus($value);
break;
case 7:
$this->setAppProTitle($value);
$this->setAppTitle($value);
break;
case 8:
$this->setAppTasTitle($value);
$this->setAppProTitle($value);
break;
case 9:
$this->setAppUpdateDate($value);
$this->setAppTasTitle($value);
break;
case 10:
$this->setDelPreviousUsrUid($value);
$this->setAppUpdateDate($value);
break;
case 11:
$this->setDelPreviousUsrUsername($value);
$this->setDelPreviousUsrUid($value);
break;
case 12:
$this->setDelPreviousUsrFirstname($value);
$this->setDelPreviousUsrUsername($value);
break;
case 13:
$this->setDelPreviousUsrLastname($value);
$this->setDelPreviousUsrFirstname($value);
break;
case 14:
$this->setDelDelegateDate($value);
$this->setDelPreviousUsrLastname($value);
break;
case 15:
$this->setDelInitDate($value);
$this->setDelDelegateDate($value);
break;
case 16:
$this->setDelDueDate($value);
$this->setDelInitDate($value);
break;
case 17:
$this->setDelDueDate($value);
break;
case 18:
$this->setDelPriority($value);
break;
} // switch()
@@ -1340,53 +1390,57 @@ abstract class BaseListInbox extends BaseObject implements Persistent
if (array_key_exists($keys[5], $arr)) {
$this->setAppNumber($arr[$keys[5]]);
}
if (array_key_exists($keys[6], $arr)) {
$this->setAppTitle($arr[$keys[6]]);
$this->setAppStatus($arr[$keys[6]]);
}
if (array_key_exists($keys[7], $arr)) {
$this->setAppProTitle($arr[$keys[7]]);
$this->setAppTitle($arr[$keys[7]]);
}
if (array_key_exists($keys[8], $arr)) {
$this->setAppTasTitle($arr[$keys[8]]);
$this->setAppProTitle($arr[$keys[8]]);
}
if (array_key_exists($keys[9], $arr)) {
$this->setAppUpdateDate($arr[$keys[9]]);
$this->setAppTasTitle($arr[$keys[9]]);
}
if (array_key_exists($keys[10], $arr)) {
$this->setDelPreviousUsrUid($arr[$keys[10]]);
$this->setAppUpdateDate($arr[$keys[10]]);
}
if (array_key_exists($keys[11], $arr)) {
$this->setDelPreviousUsrUsername($arr[$keys[11]]);
$this->setDelPreviousUsrUid($arr[$keys[11]]);
}
if (array_key_exists($keys[12], $arr)) {
$this->setDelPreviousUsrFirstname($arr[$keys[12]]);
$this->setDelPreviousUsrUsername($arr[$keys[12]]);
}
if (array_key_exists($keys[13], $arr)) {
$this->setDelPreviousUsrLastname($arr[$keys[13]]);
$this->setDelPreviousUsrFirstname($arr[$keys[13]]);
}
if (array_key_exists($keys[14], $arr)) {
$this->setDelDelegateDate($arr[$keys[14]]);
$this->setDelPreviousUsrLastname($arr[$keys[14]]);
}
if (array_key_exists($keys[15], $arr)) {
$this->setDelInitDate($arr[$keys[15]]);
$this->setDelDelegateDate($arr[$keys[15]]);
}
if (array_key_exists($keys[16], $arr)) {
$this->setDelDueDate($arr[$keys[16]]);
$this->setDelInitDate($arr[$keys[16]]);
}
if (array_key_exists($keys[17], $arr)) {
$this->setDelPriority($arr[$keys[17]]);
$this->setDelDueDate($arr[$keys[17]]);
}
if (array_key_exists($keys[18], $arr)) {
$this->setDelPriority($arr[$keys[18]]);
}
}
@@ -1423,6 +1477,10 @@ abstract class BaseListInbox extends BaseObject implements Persistent
if ($this->isColumnModified(ListInboxPeer::APP_NUMBER)) {
$criteria->add(ListInboxPeer::APP_NUMBER, $this->app_number);
}
if ($this->isColumnModified(ListInboxPeer::APP_STATUS)) {
$criteria->add(ListInboxPeer::APP_STATUS, $this->app_status);
}
if ($this->isColumnModified(ListInboxPeer::APP_TITLE)) {
$criteria->add(ListInboxPeer::APP_TITLE, $this->app_title);
@@ -1545,6 +1603,8 @@ abstract class BaseListInbox extends BaseObject implements Persistent
$copyObj->setProUid($this->pro_uid);
$copyObj->setAppNumber($this->app_number);
$copyObj->setAppStatus($this->app_status);
$copyObj->setAppTitle($this->app_title);

View File

@@ -1,17 +1,20 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by ListInboxPeer::getOMClass()
include_once 'classes/model/ListInbox.php';
/**
* Base static class for performing query and update operations on the 'LIST_INBOX' table.
*
*
*
* @package workflow.classes.model.om
*/
*/
abstract class BaseListInboxPeer
{
@@ -48,6 +51,9 @@ abstract class BaseListInboxPeer
/** the column name for the APP_NUMBER field */
const APP_NUMBER = 'LIST_INBOX.APP_NUMBER';
/** the column name for the APP_STATUS field */
const APP_STATUS = 'LIST_INBOX.APP_STATUS';
/** the column name for the APP_TITLE field */
const APP_TITLE = 'LIST_INBOX.APP_TITLE';
@@ -96,10 +102,10 @@ abstract class BaseListInboxPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AppUid', 'DelIndex', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'AppUpdateDate', 'DelPreviousUsrUid', 'DelPreviousUsrUsername', 'DelPreviousUsrFirstname', 'DelPreviousUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', ),
BasePeer::TYPE_COLNAME => array (ListInboxPeer::APP_UID, ListInboxPeer::DEL_INDEX, ListInboxPeer::USR_UID, ListInboxPeer::TAS_UID, ListInboxPeer::PRO_UID, ListInboxPeer::APP_NUMBER, ListInboxPeer::APP_TITLE, ListInboxPeer::APP_PRO_TITLE, ListInboxPeer::APP_TAS_TITLE, ListInboxPeer::APP_UPDATE_DATE, ListInboxPeer::DEL_PREVIOUS_USR_UID, ListInboxPeer::DEL_PREVIOUS_USR_USERNAME, ListInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME, ListInboxPeer::DEL_PREVIOUS_USR_LASTNAME, ListInboxPeer::DEL_DELEGATE_DATE, ListInboxPeer::DEL_INIT_DATE, ListInboxPeer::DEL_DUE_DATE, ListInboxPeer::DEL_PRIORITY, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'DEL_INDEX', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'APP_UPDATE_DATE', 'DEL_PREVIOUS_USR_UID', 'DEL_PREVIOUS_USR_USERNAME', 'DEL_PREVIOUS_USR_FIRSTNAME', 'DEL_PREVIOUS_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
BasePeer::TYPE_PHPNAME => array ('AppUid', 'DelIndex', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppStatus','AppTitle', 'AppProTitle', 'AppTasTitle', 'AppUpdateDate', 'DelPreviousUsrUid', 'DelPreviousUsrUsername', 'DelPreviousUsrFirstname', 'DelPreviousUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', ),
BasePeer::TYPE_COLNAME => array (ListInboxPeer::APP_UID, ListInboxPeer::DEL_INDEX, ListInboxPeer::USR_UID, ListInboxPeer::TAS_UID, ListInboxPeer::PRO_UID, ListInboxPeer::APP_NUMBER, ListInboxPeer::APP_STATUS, ListInboxPeer::APP_TITLE, ListInboxPeer::APP_PRO_TITLE, ListInboxPeer::APP_TAS_TITLE, ListInboxPeer::APP_UPDATE_DATE, ListInboxPeer::DEL_PREVIOUS_USR_UID, ListInboxPeer::DEL_PREVIOUS_USR_USERNAME, ListInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME, ListInboxPeer::DEL_PREVIOUS_USR_LASTNAME, ListInboxPeer::DEL_DELEGATE_DATE, ListInboxPeer::DEL_INIT_DATE, ListInboxPeer::DEL_DUE_DATE, ListInboxPeer::DEL_PRIORITY, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'DEL_INDEX', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_STATUS', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'APP_UPDATE_DATE', 'DEL_PREVIOUS_USR_UID', 'DEL_PREVIOUS_USR_USERNAME', 'DEL_PREVIOUS_USR_FIRSTNAME', 'DEL_PREVIOUS_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
);
/**
@@ -110,9 +116,9 @@ abstract class BaseListInboxPeer
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'DelIndex' => 1, 'UsrUid' => 2, 'TasUid' => 3, 'ProUid' => 4, 'AppNumber' => 5, 'AppTitle' => 6, 'AppProTitle' => 7, 'AppTasTitle' => 8, 'AppUpdateDate' => 9, 'DelPreviousUsrUid' => 10, 'DelPreviousUsrUsername' => 11, 'DelPreviousUsrFirstname' => 12, 'DelPreviousUsrLastname' => 13, 'DelDelegateDate' => 14, 'DelInitDate' => 15, 'DelDueDate' => 16, 'DelPriority' => 17, ),
BasePeer::TYPE_COLNAME => array (ListInboxPeer::APP_UID => 0, ListInboxPeer::DEL_INDEX => 1, ListInboxPeer::USR_UID => 2, ListInboxPeer::TAS_UID => 3, ListInboxPeer::PRO_UID => 4, ListInboxPeer::APP_NUMBER => 5, ListInboxPeer::APP_TITLE => 6, ListInboxPeer::APP_PRO_TITLE => 7, ListInboxPeer::APP_TAS_TITLE => 8, ListInboxPeer::APP_UPDATE_DATE => 9, ListInboxPeer::DEL_PREVIOUS_USR_UID => 10, ListInboxPeer::DEL_PREVIOUS_USR_USERNAME => 11, ListInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME => 12, ListInboxPeer::DEL_PREVIOUS_USR_LASTNAME => 13, ListInboxPeer::DEL_DELEGATE_DATE => 14, ListInboxPeer::DEL_INIT_DATE => 15, ListInboxPeer::DEL_DUE_DATE => 16, ListInboxPeer::DEL_PRIORITY => 17, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'DEL_INDEX' => 1, 'USR_UID' => 2, 'TAS_UID' => 3, 'PRO_UID' => 4, 'APP_NUMBER' => 5, 'APP_TITLE' => 6, 'APP_PRO_TITLE' => 7, 'APP_TAS_TITLE' => 8, 'APP_UPDATE_DATE' => 9, 'DEL_PREVIOUS_USR_UID' => 10, 'DEL_PREVIOUS_USR_USERNAME' => 11, 'DEL_PREVIOUS_USR_FIRSTNAME' => 12, 'DEL_PREVIOUS_USR_LASTNAME' => 13, 'DEL_DELEGATE_DATE' => 14, 'DEL_INIT_DATE' => 15, 'DEL_DUE_DATE' => 16, 'DEL_PRIORITY' => 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_COLNAME => array (ListInboxPeer::APP_UID => 0, ListInboxPeer::DEL_INDEX => 1, ListInboxPeer::USR_UID => 2, ListInboxPeer::TAS_UID => 3, ListInboxPeer::PRO_UID => 4, ListInboxPeer::APP_NUMBER => 5, ListInboxPeer::APP_STATUS => 6, ListInboxPeer::APP_TITLE => 7, ListInboxPeer::APP_PRO_TITLE => 8, ListInboxPeer::APP_TAS_TITLE => 9, ListInboxPeer::APP_UPDATE_DATE => 10, ListInboxPeer::DEL_PREVIOUS_USR_UID => 11, ListInboxPeer::DEL_PREVIOUS_USR_USERNAME => 12, ListInboxPeer::DEL_PREVIOUS_USR_FIRSTNAME => 13, ListInboxPeer::DEL_PREVIOUS_USR_LASTNAME => 14, ListInboxPeer::DEL_DELEGATE_DATE => 15, ListInboxPeer::DEL_INIT_DATE => 16, ListInboxPeer::DEL_DUE_DATE => 17, ListInboxPeer::DEL_PRIORITY => 18, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'DEL_INDEX' => 1, 'USR_UID' => 2, 'TAS_UID' => 3, 'PRO_UID' => 4, 'APP_NUMBER' => 5, 'APP_STATUS' => 6, 'APP_TITLE' => 7, 'APP_PRO_TITLE' => 8, 'APP_TAS_TITLE' => 9, 'APP_UPDATE_DATE' => 10, 'DEL_PREVIOUS_USR_UID' => 11, 'DEL_PREVIOUS_USR_USERNAME' => 12, 'DEL_PREVIOUS_USR_FIRSTNAME' => 13, 'DEL_PREVIOUS_USR_LASTNAME' => 14, 'DEL_DELEGATE_DATE' => 15, 'DEL_INIT_DATE' => 16, 'DEL_DUE_DATE' => 17, 'DEL_PRIORITY' => 18, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 )
);
/**
@@ -224,6 +230,8 @@ abstract class BaseListInboxPeer
$criteria->addSelectColumn(ListInboxPeer::PRO_UID);
$criteria->addSelectColumn(ListInboxPeer::APP_NUMBER);
$criteria->addSelectColumn(ListInboxPeer::APP_STATUS);
$criteria->addSelectColumn(ListInboxPeer::APP_TITLE);

View File

@@ -9,13 +9,15 @@ include_once 'propel/util/Criteria.php';
include_once 'classes/model/ListParticipatedLastPeer.php';
/**
* Base class that represents a row from the 'LIST_PARTICIPATED_LAST' table.
*
*
*
* @package workflow.classes.model.om
*/
*/
abstract class BaseListParticipatedLast extends BaseObject implements Persistent
{
@@ -33,6 +35,12 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
*/
protected $app_uid = '';
/**
* The value for the del_index field.
* @var int
*/
protected $del_index = 0;
/**
* The value for the usr_uid field.
* @var string
@@ -76,10 +84,10 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
protected $app_tas_title = '';
/**
* The value for the del_index field.
* @var int
* The value for the app_status field.
* @var string
*/
protected $del_index = 0;
protected $app_status = '0';
/**
* The value for the del_previous_usr_uid field.
@@ -105,6 +113,24 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
*/
protected $del_previous_usr_lastname = '';
/**
* The value for the del_current_usr_username field.
* @var string
*/
protected $del_current_usr_username = '';
/**
* The value for the del_current_usr_firstname field.
* @var string
*/
protected $del_current_usr_firstname = '';
/**
* The value for the del_current_usr_lastname field.
* @var string
*/
protected $del_current_usr_lastname = '';
/**
* The value for the del_delegate_date field.
* @var int
@@ -128,6 +154,12 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
* @var string
*/
protected $del_priority = '3';
/**
* The value for the del_thread_status field.
* @var string
*/
protected $del_thread_status = '';
/**
* Flag to prevent endless save loop, if this object is referenced
@@ -153,7 +185,18 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
return $this->app_uid;
}
/**
* Get the [del_index] column value.
*
* @return int
*/
public function getDelIndex()
{
return $this->del_index;
}
/**
* Get the [usr_uid] column value.
*
@@ -232,16 +275,16 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
}
/**
* Get the [del_index] column value.
* Get the [app_status] column value.
*
* @return int
* @return string
*/
public function getDelIndex()
public function getAppStatus()
{
return $this->del_index;
return $this->app_status;
}
/**
* Get the [del_previous_usr_uid] column value.
*
@@ -286,6 +329,39 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
return $this->del_previous_usr_lastname;
}
/**
* Get the [del_current_usr_username] column value.
*
* @return string
*/
public function getDelCurrentUsrUsername()
{
return $this->del_current_usr_username;
}
/**
* Get the [del_current_usr_firstname] column value.
*
* @return string
*/
public function getDelCurrentUsrFirstname()
{
return $this->del_current_usr_firstname;
}
/**
* Get the [del_current_usr_lastname] column value.
*
* @return string
*/
public function getDelCurrentUsrLastname()
{
return $this->del_current_usr_lastname;
}
/**
* Get the [optionally formatted] [del_delegate_date] column value.
*
@@ -392,6 +468,17 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
return $this->del_priority;
}
/**
* Get the [del_thread_status] column value.
*
* @return string
*/
public function getDelThreadStatus()
{
return $this->del_thread_status;
}
/**
* Set the value of [app_uid] column.
@@ -414,6 +501,28 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
}
} // setAppUid()
/**
* Set the value of [del_index] column.
*
* @param int $v new value
* @return void
*/
public function setDelIndex($v)
{
// Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not).
if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $v;
}
if ($this->del_index !== $v || $v === 0) {
$this->del_index = $v;
$this->modifiedColumns[] = ListParticipatedLastPeer::DEL_INDEX;
}
} // setDelIndex()
/**
* Set the value of [usr_uid] column.
@@ -570,26 +679,26 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
} // setAppTasTitle()
/**
* Set the value of [del_index] column.
* Set the value of [app_status] column.
*
* @param int $v new value
* @param string $v new value
* @return void
*/
public function setDelIndex($v)
public function setAppStatus($v)
{
// Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not).
if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $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->del_index !== $v || $v === 0) {
$this->del_index = $v;
$this->modifiedColumns[] = ListParticipatedLastPeer::DEL_INDEX;
if ($this->app_status !== $v || $v === '0') {
$this->app_status = $v;
$this->modifiedColumns[] = ListParticipatedLastPeer::APP_STATUS;
}
} // setDelIndex()
} // setAppStatus()
/**
* Set the value of [del_previous_usr_uid] column.
@@ -679,6 +788,72 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
} // setDelPreviousUsrLastname()
/**
* Set the value of [del_current_usr_username] column.
*
* @param string $v new value
* @return void
*/
public function setDelCurrentUsrUsername($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->del_current_usr_username !== $v || $v === '') {
$this->del_current_usr_username = $v;
$this->modifiedColumns[] = ListParticipatedLastPeer::DEL_CURRENT_USR_USERNAME;
}
} // setDelCurrentUsrUsername()
/**
* Set the value of [del_current_usr_firstname] column.
*
* @param string $v new value
* @return void
*/
public function setDelCurrentUsrFirstname($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->del_current_usr_firstname !== $v || $v === '') {
$this->del_current_usr_firstname = $v;
$this->modifiedColumns[] = ListParticipatedLastPeer::DEL_CURRENT_USR_FIRSTNAME;
}
} // setDelCurrentUsrFirstname()
/**
* Set the value of [del_current_usr_lastname] column.
*
* @param string $v new value
* @return void
*/
public function setDelCurrentUsrLastname($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->del_current_usr_lastname !== $v || $v === '') {
$this->del_current_usr_lastname = $v;
$this->modifiedColumns[] = ListParticipatedLastPeer::DEL_CURRENT_USR_LASTNAME;
}
} // setDelCurrentUsrLastname()
/**
* Set the value of [del_delegate_date] column.
*
@@ -787,6 +962,28 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
}
} // setDelPriority()
/**
* Set the value of [del_thread_status] column.
*
* @param string $v new value
* @return void
*/
public function setDelThreadStatus($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->del_thread_status !== $v || $v === 'OPEN') {
$this->del_thread_status = $v;
$this->modifiedColumns[] = ListParticipatedLastPeer::DEL_THREAD_STATUS;
}
} // setDelThreadStatus()
/**
* Hydrates (populates) the object variables with values from the database resultset.
@@ -806,45 +1003,55 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
try {
$this->app_uid = $rs->getString($startcol + 0);
$this->del_index = $rs->getInt($startcol + 1);
$this->usr_uid = $rs->getString($startcol + 1);
$this->usr_uid = $rs->getString($startcol + 2);
$this->tas_uid = $rs->getString($startcol + 2);
$this->tas_uid = $rs->getString($startcol + 3);
$this->pro_uid = $rs->getString($startcol + 3);
$this->pro_uid = $rs->getString($startcol + 4);
$this->app_number = $rs->getInt($startcol + 4);
$this->app_number = $rs->getInt($startcol + 5);
$this->app_title = $rs->getString($startcol + 5);
$this->app_title = $rs->getString($startcol + 6);
$this->app_pro_title = $rs->getString($startcol + 6);
$this->app_pro_title = $rs->getString($startcol + 7);
$this->app_tas_title = $rs->getString($startcol + 7);
$this->app_tas_title = $rs->getString($startcol + 8);
$this->del_index = $rs->getInt($startcol + 8);
$this->app_status = $rs->getString($startcol + 9);
$this->del_previous_usr_uid = $rs->getString($startcol + 9);
$this->del_previous_usr_uid = $rs->getString($startcol + 10);
$this->del_previous_usr_username = $rs->getString($startcol + 10);
$this->del_previous_usr_username = $rs->getString($startcol + 11);
$this->del_previous_usr_firstname = $rs->getString($startcol + 11);
$this->del_previous_usr_firstname = $rs->getString($startcol + 12);
$this->del_previous_usr_lastname = $rs->getString($startcol + 12);
$this->del_previous_usr_lastname = $rs->getString($startcol + 13);
$this->del_delegate_date = $rs->getTimestamp($startcol + 13, null);
$this->del_current_usr_username = $rs->getString($startcol + 14);
$this->del_init_date = $rs->getTimestamp($startcol + 14, null);
$this->del_current_usr_firstname = $rs->getString($startcol + 15);
$this->del_due_date = $rs->getTimestamp($startcol + 15, null);
$this->del_current_usr_lastname = $rs->getString($startcol + 16);
$this->del_priority = $rs->getString($startcol + 16);
$this->del_delegate_date = $rs->getTimestamp($startcol + 17, null);
$this->del_init_date = $rs->getTimestamp($startcol + 18, null);
$this->del_due_date = $rs->getTimestamp($startcol + 19, null);
$this->del_priority = $rs->getString($startcol + 20);
$this->del_thread_status = $rs->getString($startcol + 21);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 17; // 17 = ListParticipatedLastPeer::NUM_COLUMNS - ListParticipatedLastPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 22; // 22 = ListParticipatedLastPeer::NUM_COLUMNS - ListParticipatedLastPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating ListParticipatedLast object", $e);
@@ -1052,53 +1259,68 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
return $this->getAppUid();
break;
case 1:
return $this->getUsrUid();
break;
case 2:
return $this->getTasUid();
break;
case 3:
return $this->getProUid();
break;
case 4:
return $this->getAppNumber();
break;
case 5:
return $this->getAppTitle();
break;
case 6:
return $this->getAppProTitle();
break;
case 7:
return $this->getAppTasTitle();
break;
case 8:
return $this->getDelIndex();
break;
case 2:
return $this->getUsrUid();
break;
case 3:
return $this->getTasUid();
break;
case 4:
return $this->getProUid();
break;
case 5:
return $this->getAppNumber();
break;
case 6:
return $this->getAppTitle();
break;
case 7:
return $this->getAppProTitle();
break;
case 8:
return $this->getAppTasTitle();
break;
case 9:
return $this->getAppStatus();
break;
case 10:
return $this->getDelPreviousUsrUid();
break;
case 10:
case 11:
return $this->getDelPreviousUsrUsername();
break;
case 11:
case 12:
return $this->getDelPreviousUsrFirstname();
break;
case 12:
case 13:
return $this->getDelPreviousUsrLastname();
break;
case 13:
return $this->getDelDelegateDate();
break;
case 14:
return $this->getDelInitDate();
return $this->getDelCurrentUsrUsername();
break;
case 15:
return $this->getDelDueDate();
return $this->getDelCurrentUsrFirstname();
break;
case 16:
return $this->getDelCurrentUsrLastname();
break;
case 17:
return $this->getDelDelegateDate();
break;
case 18:
return $this->getDelInitDate();
break;
case 19:
return $this->getDelDueDate();
break;
case 20:
return $this->getDelPriority();
break;
case 21:
return $this->getDelThreadStatus();
break;
default:
return null;
break;
@@ -1120,22 +1342,27 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
$keys = ListParticipatedLastPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getAppUid(),
$keys[1] => $this->getUsrUid(),
$keys[2] => $this->getTasUid(),
$keys[3] => $this->getProUid(),
$keys[4] => $this->getAppNumber(),
$keys[5] => $this->getAppTitle(),
$keys[6] => $this->getAppProTitle(),
$keys[7] => $this->getAppTasTitle(),
$keys[8] => $this->getDelIndex(),
$keys[9] => $this->getDelPreviousUsrUid(),
$keys[10] => $this->getDelPreviousUsrUsername(),
$keys[11] => $this->getDelPreviousUsrFirstname(),
$keys[12] => $this->getDelPreviousUsrLastname(),
$keys[13] => $this->getDelDelegateDate(),
$keys[14] => $this->getDelInitDate(),
$keys[15] => $this->getDelDueDate(),
$keys[16] => $this->getDelPriority(),
$keys[1] => $this->getDelIndex(),
$keys[2] => $this->getUsrUid(),
$keys[3] => $this->getTasUid(),
$keys[4] => $this->getProUid(),
$keys[5] => $this->getAppNumber(),
$keys[6] => $this->getAppTitle(),
$keys[7] => $this->getAppProTitle(),
$keys[8] => $this->getAppTasTitle(),
$keys[9] => $this->getAppStatus(),
$keys[10] => $this->getDelPreviousUsrUid(),
$keys[11] => $this->getDelPreviousUsrUsername(),
$keys[12] => $this->getDelPreviousUsrFirstname(),
$keys[13] => $this->getDelPreviousUsrLastname(),
$keys[14] => $this->getDelCurrentUsrUsername(),
$keys[15] => $this->getDelCurrentUsrFirstname(),
$keys[16] => $this->getDelCurrentUsrLastname(),
$keys[17] => $this->getDelDelegateDate(),
$keys[18] => $this->getDelInitDate(),
$keys[19] => $this->getDelDueDate(),
$keys[20] => $this->getDelPriority(),
$keys[21] => $this->getDelThreadStatus(),
);
return $result;
}
@@ -1171,53 +1398,68 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
$this->setAppUid($value);
break;
case 1:
$this->setDelIndex($value);
break;
case 2:
$this->setUsrUid($value);
break;
case 2:
case 3:
$this->setTasUid($value);
break;
case 3:
case 4:
$this->setProUid($value);
break;
case 4:
case 5:
$this->setAppNumber($value);
break;
case 5:
case 6:
$this->setAppTitle($value);
break;
case 6:
case 7:
$this->setAppProTitle($value);
break;
case 7:
case 8:
$this->setAppTasTitle($value);
break;
case 8:
$this->setDelIndex($value);
break;
case 9:
$this->setAppStatus($value);
break;
case 10:
$this->setDelPreviousUsrUid($value);
break;
case 10:
case 11:
$this->setDelPreviousUsrUsername($value);
break;
case 11:
case 12:
$this->setDelPreviousUsrFirstname($value);
break;
case 12:
case 13:
$this->setDelPreviousUsrLastname($value);
break;
case 13:
$this->setDelDelegateDate($value);
break;
case 14:
$this->setDelInitDate($value);
$this->setDelCurrentUsrUsername($value);
break;
case 15:
$this->setDelDueDate($value);
$this->setDelCurrentUsrFirstname($value);
break;
case 16:
$this->setDelCurrentUsrLastname($value);
break;
case 17:
$this->setDelDelegateDate($value);
break;
case 18:
$this->setDelInitDate($value);
break;
case 19:
$this->setDelDueDate($value);
break;
case 20:
$this->setDelPriority($value);
break;
case 21:
$this->setDelThreadStatus($value);
break;
} // switch()
}
@@ -1244,69 +1486,89 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
if (array_key_exists($keys[0], $arr)) {
$this->setAppUid($arr[$keys[0]]);
}
if (array_key_exists($keys[1], $arr)) {
$this->setUsrUid($arr[$keys[1]]);
$this->setDelIndex($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setTasUid($arr[$keys[2]]);
$this->setUsrUid($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setProUid($arr[$keys[3]]);
$this->setTasUid($arr[$keys[3]]);
}
if (array_key_exists($keys[4], $arr)) {
$this->setAppNumber($arr[$keys[4]]);
$this->setProUid($arr[$keys[4]]);
}
if (array_key_exists($keys[5], $arr)) {
$this->setAppTitle($arr[$keys[5]]);
$this->setAppNumber($arr[$keys[5]]);
}
if (array_key_exists($keys[6], $arr)) {
$this->setAppProTitle($arr[$keys[6]]);
$this->setAppTitle($arr[$keys[6]]);
}
if (array_key_exists($keys[7], $arr)) {
$this->setAppTasTitle($arr[$keys[7]]);
$this->setAppProTitle($arr[$keys[7]]);
}
if (array_key_exists($keys[8], $arr)) {
$this->setDelIndex($arr[$keys[8]]);
$this->setAppTasTitle($arr[$keys[8]]);
}
if (array_key_exists($keys[9], $arr)) {
$this->setDelPreviousUsrUid($arr[$keys[9]]);
}
$this->setAppStatus($arr[$keys[9]]);
}
if (array_key_exists($keys[10], $arr)) {
$this->setDelPreviousUsrUsername($arr[$keys[10]]);
$this->setDelPreviousUsrUid($arr[$keys[10]]);
}
if (array_key_exists($keys[11], $arr)) {
$this->setDelPreviousUsrFirstname($arr[$keys[11]]);
$this->setDelPreviousUsrUsername($arr[$keys[11]]);
}
if (array_key_exists($keys[12], $arr)) {
$this->setDelPreviousUsrLastname($arr[$keys[12]]);
$this->setDelPreviousUsrFirstname($arr[$keys[12]]);
}
if (array_key_exists($keys[13], $arr)) {
$this->setDelDelegateDate($arr[$keys[13]]);
$this->setDelPreviousUsrLastname($arr[$keys[13]]);
}
if (array_key_exists($keys[14], $arr)) {
$this->setDelInitDate($arr[$keys[14]]);
$this->setDelCurrentUsrUsername($arr[$keys[14]]);
}
if (array_key_exists($keys[15], $arr)) {
$this->setDelDueDate($arr[$keys[15]]);
$this->setDelCurrentUsrFirstname($arr[$keys[15]]);
}
if (array_key_exists($keys[16], $arr)) {
$this->setDelPriority($arr[$keys[16]]);
$this->setDelCurrentUsrLastname($arr[$keys[16]]);
}
if (array_key_exists($keys[17], $arr)) {
$this->setDelDelegateDate($arr[$keys[17]]);
}
if (array_key_exists($keys[18], $arr)) {
$this->setDelInitDate($arr[$keys[18]]);
}
if (array_key_exists($keys[19], $arr)) {
$this->setDelDueDate($arr[$keys[19]]);
}
if (array_key_exists($keys[20], $arr)) {
$this->setDelPriority($arr[$keys[20]]);
}
if (array_key_exists($keys[21], $arr)) {
$this->setDelThreadStatus($arr[$keys[21]]);
}
}
@@ -1323,6 +1585,10 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
if ($this->isColumnModified(ListParticipatedLastPeer::APP_UID)) {
$criteria->add(ListParticipatedLastPeer::APP_UID, $this->app_uid);
}
if ($this->isColumnModified(ListParticipatedLastPeer::DEL_INDEX)) {
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, $this->del_index);
}
if ($this->isColumnModified(ListParticipatedLastPeer::USR_UID)) {
$criteria->add(ListParticipatedLastPeer::USR_UID, $this->usr_uid);
@@ -1352,9 +1618,9 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
$criteria->add(ListParticipatedLastPeer::APP_TAS_TITLE, $this->app_tas_title);
}
if ($this->isColumnModified(ListParticipatedLastPeer::DEL_INDEX)) {
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, $this->del_index);
}
if ($this->isColumnModified(ListParticipatedLastPeer::APP_STATUS)) {
$criteria->add(ListParticipatedLastPeer::APP_STATUS, $this->app_status);
}
if ($this->isColumnModified(ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID)) {
$criteria->add(ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID, $this->del_previous_usr_uid);
@@ -1372,6 +1638,18 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
$criteria->add(ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME, $this->del_previous_usr_lastname);
}
if ($this->isColumnModified(ListParticipatedLastPeer::DEL_CURRENT_USR_USERNAME)) {
$criteria->add(ListParticipatedLastPeer::DEL_CURRENT_USR_USERNAME, $this->del_current_usr_username);
}
if ($this->isColumnModified(ListParticipatedLastPeer::DEL_CURRENT_USR_FIRSTNAME)) {
$criteria->add(ListParticipatedLastPeer::DEL_CURRENT_USR_FIRSTNAME, $this->del_current_usr_firstname);
}
if ($this->isColumnModified(ListParticipatedLastPeer::DEL_CURRENT_USR_LASTNAME)) {
$criteria->add(ListParticipatedLastPeer::DEL_CURRENT_USR_LASTNAME, $this->del_current_usr_lastname);
}
if ($this->isColumnModified(ListParticipatedLastPeer::DEL_DELEGATE_DATE)) {
$criteria->add(ListParticipatedLastPeer::DEL_DELEGATE_DATE, $this->del_delegate_date);
}
@@ -1387,6 +1665,10 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
if ($this->isColumnModified(ListParticipatedLastPeer::DEL_PRIORITY)) {
$criteria->add(ListParticipatedLastPeer::DEL_PRIORITY, $this->del_priority);
}
if ($this->isColumnModified(ListParticipatedLastPeer::DEL_THREAD_STATUS)) {
$criteria->add(ListParticipatedLastPeer::DEL_THREAD_STATUS, $this->del_thread_status);
}
return $criteria;
@@ -1405,6 +1687,7 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
$criteria = new Criteria(ListParticipatedLastPeer::DATABASE_NAME);
$criteria->add(ListParticipatedLastPeer::APP_UID, $this->app_uid);
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, $this->del_index);
$criteria->add(ListParticipatedLastPeer::USR_UID, $this->usr_uid);
return $criteria;
@@ -1420,8 +1703,10 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
$pks = array();
$pks[0] = $this->getAppUid();
$pks[1] = $this->getDelIndex();
$pks[1] = $this->getUsrUid();
$pks[2] = $this->getUsrUid();
return $pks;
}
@@ -1436,8 +1721,10 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
{
$this->setAppUid($keys[0]);
$this->setDelIndex($keys[1]);
$this->setUsrUid($keys[1]);
$this->setUsrUid($keys[2]);
}
@@ -1466,7 +1753,9 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
$copyObj->setAppTasTitle($this->app_tas_title);
$copyObj->setDelIndex($this->del_index);
$copyObj->setAppStatus($this->app_status);
// $copyObj->setDelIndex($this->del_index);
$copyObj->setDelPreviousUsrUid($this->del_previous_usr_uid);
@@ -1476,6 +1765,12 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
$copyObj->setDelPreviousUsrLastname($this->del_previous_usr_lastname);
$copyObj->setDelCurrentUsrUsername($this->del_current_usr_username);
$copyObj->setDelCurrentUsrFirstname($this->del_current_usr_firstname);
$copyObj->setDelCurrentUsrLastname($this->del_current_usr_lastname);
$copyObj->setDelDelegateDate($this->del_delegate_date);
$copyObj->setDelInitDate($this->del_init_date);
@@ -1483,11 +1778,15 @@ abstract class BaseListParticipatedLast extends BaseObject implements Persistent
$copyObj->setDelDueDate($this->del_due_date);
$copyObj->setDelPriority($this->del_priority);
$copyObj->setDelThreadStatus($this->del_thread_status);
$copyObj->setNew(true);
$copyObj->setAppUid(''); // this is a pkey column, so set to default value
$copyObj->setDelIndex(''); // this is a pkey column, so set to default value
$copyObj->setUsrUid(''); // this is a pkey column, so set to default value

View File

@@ -5,13 +5,15 @@ require_once 'propel/util/BasePeer.php';
// actual class may be a subclass -- as returned by ListParticipatedLastPeer::getOMClass()
include_once 'classes/model/ListParticipatedLast.php';
/**
* Base static class for performing query and update operations on the 'LIST_PARTICIPATED_LAST' table.
*
*
*
* @package workflow.classes.model.om
*/
*/
abstract class BaseListParticipatedLastPeer
{
@@ -25,7 +27,7 @@ abstract class BaseListParticipatedLastPeer
const CLASS_DEFAULT = 'classes.model.ListParticipatedLast';
/** The total number of columns. */
const NUM_COLUMNS = 17;
const NUM_COLUMNS = 21;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -33,6 +35,9 @@ abstract class BaseListParticipatedLastPeer
/** the column name for the APP_UID field */
const APP_UID = 'LIST_PARTICIPATED_LAST.APP_UID';
/** the column name for the DEL_INDEX field */
const DEL_INDEX = 'LIST_PARTICIPATED_LAST.DEL_INDEX';
/** the column name for the USR_UID field */
const USR_UID = 'LIST_PARTICIPATED_LAST.USR_UID';
@@ -55,8 +60,8 @@ abstract class BaseListParticipatedLastPeer
/** the column name for the APP_TAS_TITLE field */
const APP_TAS_TITLE = 'LIST_PARTICIPATED_LAST.APP_TAS_TITLE';
/** the column name for the DEL_INDEX field */
const DEL_INDEX = 'LIST_PARTICIPATED_LAST.DEL_INDEX';
/** the column name for the APP_STATUS field */
const APP_STATUS = 'LIST_PARTICIPATED_LAST.APP_STATUS';
/** the column name for the DEL_PREVIOUS_USR_UID field */
const DEL_PREVIOUS_USR_UID = 'LIST_PARTICIPATED_LAST.DEL_PREVIOUS_USR_UID';
@@ -70,6 +75,15 @@ abstract class BaseListParticipatedLastPeer
/** the column name for the DEL_PREVIOUS_USR_LASTNAME field */
const DEL_PREVIOUS_USR_LASTNAME = 'LIST_PARTICIPATED_LAST.DEL_PREVIOUS_USR_LASTNAME';
/** the column name for the DEL_CURRENT_USR_USERNAME field */
const DEL_CURRENT_USR_USERNAME = 'LIST_PARTICIPATED_LAST.DEL_CURRENT_USR_USERNAME';
/** the column name for the DEL_CURRENT_USR_FIRSTNAME field */
const DEL_CURRENT_USR_FIRSTNAME = 'LIST_PARTICIPATED_LAST.DEL_CURRENT_USR_FIRSTNAME';
/** the column name for the DEL_CURRENT_USR_LASTNAME field */
const DEL_CURRENT_USR_LASTNAME = 'LIST_PARTICIPATED_LAST.DEL_CURRENT_USR_LASTNAME';
/** the column name for the DEL_DELEGATE_DATE field */
const DEL_DELEGATE_DATE = 'LIST_PARTICIPATED_LAST.DEL_DELEGATE_DATE';
@@ -81,6 +95,9 @@ abstract class BaseListParticipatedLastPeer
/** the column name for the DEL_PRIORITY field */
const DEL_PRIORITY = 'LIST_PARTICIPATED_LAST.DEL_PRIORITY';
/** the column name for the DEL_THREAD_STATUS field */
const DEL_THREAD_STATUS = 'LIST_PARTICIPATED_LAST.DEL_THREAD_STATUS';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -93,10 +110,10 @@ abstract class BaseListParticipatedLastPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AppUid', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'DelIndex', 'DelPreviousUsrUid', 'DelPreviousUsrUsername', 'DelPreviousUsrFirstname', 'DelPreviousUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', ),
BasePeer::TYPE_COLNAME => array (ListParticipatedLastPeer::APP_UID, ListParticipatedLastPeer::USR_UID, ListParticipatedLastPeer::TAS_UID, ListParticipatedLastPeer::PRO_UID, ListParticipatedLastPeer::APP_NUMBER, ListParticipatedLastPeer::APP_TITLE, ListParticipatedLastPeer::APP_PRO_TITLE, ListParticipatedLastPeer::APP_TAS_TITLE, ListParticipatedLastPeer::DEL_INDEX, ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID, ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME, ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME, ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME, ListParticipatedLastPeer::DEL_DELEGATE_DATE, ListParticipatedLastPeer::DEL_INIT_DATE, ListParticipatedLastPeer::DEL_DUE_DATE, ListParticipatedLastPeer::DEL_PRIORITY, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'DEL_INDEX', 'DEL_PREVIOUS_USR_UID', 'DEL_PREVIOUS_USR_USERNAME', 'DEL_PREVIOUS_USR_FIRSTNAME', 'DEL_PREVIOUS_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
BasePeer::TYPE_PHPNAME => array ('AppUid', 'DelIndex', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'AppStatus', 'DelPreviousUsrUid', 'DelPreviousUsrUsername', 'DelPreviousUsrFirstname', 'DelPreviousUsrLastname', 'DelCurrentUsrUsername', 'DelCurrentUsrFirstname', 'DelCurrentUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', 'DelPriority', 'DelThreadStatus'),
BasePeer::TYPE_COLNAME => array (ListParticipatedLastPeer::APP_UID, ListParticipatedLastPeer::DEL_INDEX, ListParticipatedLastPeer::USR_UID, ListParticipatedLastPeer::TAS_UID, ListParticipatedLastPeer::PRO_UID, ListParticipatedLastPeer::APP_NUMBER, ListParticipatedLastPeer::APP_TITLE, ListParticipatedLastPeer::APP_PRO_TITLE, ListParticipatedLastPeer::APP_TAS_TITLE, ListParticipatedLastPeer::APP_STATUS, ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID, ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME, ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME, ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME, ListParticipatedLastPeer::DEL_CURRENT_USR_USERNAME, ListParticipatedLastPeer::DEL_CURRENT_USR_FIRSTNAME, ListParticipatedLastPeer::DEL_CURRENT_USR_LASTNAME, ListParticipatedLastPeer::DEL_DELEGATE_DATE, ListParticipatedLastPeer::DEL_INIT_DATE, ListParticipatedLastPeer::DEL_DUE_DATE, ListParticipatedLastPeer::DEL_PRIORITY, ListParticipatedLastPeer::DEL_THREAD_STATUS, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'DEL_INDEX', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'APP_STATUS', 'DEL_PREVIOUS_USR_UID', 'DEL_PREVIOUS_USR_USERNAME', 'DEL_PREVIOUS_USR_FIRSTNAME', 'DEL_PREVIOUS_USR_LASTNAME', 'DEL_CURRENT_USR_USERNAME', 'DEL_CURRENT_USR_FIRSTNAME', 'DEL_CURRENT_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', 'DEL_THREAD_STATUS', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, )
);
/**
@@ -106,10 +123,10 @@ abstract class BaseListParticipatedLastPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'UsrUid' => 1, 'TasUid' => 2, 'ProUid' => 3, 'AppNumber' => 4, 'AppTitle' => 5, 'AppProTitle' => 6, 'AppTasTitle' => 7, 'DelIndex' => 8, 'DelPreviousUsrUid' => 9, 'DelPreviousUsrUsername' => 10, 'DelPreviousUsrFirstname' => 11, 'DelPreviousUsrLastname' => 12, 'DelDelegateDate' => 13, 'DelInitDate' => 14, 'DelDueDate' => 15, 'DelPriority' => 16, ),
BasePeer::TYPE_COLNAME => array (ListParticipatedLastPeer::APP_UID => 0, ListParticipatedLastPeer::USR_UID => 1, ListParticipatedLastPeer::TAS_UID => 2, ListParticipatedLastPeer::PRO_UID => 3, ListParticipatedLastPeer::APP_NUMBER => 4, ListParticipatedLastPeer::APP_TITLE => 5, ListParticipatedLastPeer::APP_PRO_TITLE => 6, ListParticipatedLastPeer::APP_TAS_TITLE => 7, ListParticipatedLastPeer::DEL_INDEX => 8, ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID => 9, ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME => 10, ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME => 11, ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME => 12, ListParticipatedLastPeer::DEL_DELEGATE_DATE => 13, ListParticipatedLastPeer::DEL_INIT_DATE => 14, ListParticipatedLastPeer::DEL_DUE_DATE => 15, ListParticipatedLastPeer::DEL_PRIORITY => 16, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'USR_UID' => 1, 'TAS_UID' => 2, 'PRO_UID' => 3, 'APP_NUMBER' => 4, 'APP_TITLE' => 5, 'APP_PRO_TITLE' => 6, 'APP_TAS_TITLE' => 7, 'DEL_INDEX' => 8, 'DEL_PREVIOUS_USR_UID' => 9, 'DEL_PREVIOUS_USR_USERNAME' => 10, 'DEL_PREVIOUS_USR_FIRSTNAME' => 11, 'DEL_PREVIOUS_USR_LASTNAME' => 12, 'DEL_DELEGATE_DATE' => 13, 'DEL_INIT_DATE' => 14, 'DEL_DUE_DATE' => 15, 'DEL_PRIORITY' => 16, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'DelIndex' => 2, 'UsrUid' => 3, 'TasUid' => 4, 'ProUid' => 5, 'AppNumber' => 6, 'AppTitle' => 7, 'AppProTitle' => 8, 'AppTasTitle' => 9, 'AppStatus' => 9, 'DelPreviousUsrUid' => 10, 'DelPreviousUsrUsername' => 11, 'DelPreviousUsrFirstname' => 12, 'DelPreviousUsrLastname' => 13, 'DelCurrentUsrUsername' => 14, 'DelCurrentUsrFirstname' => 15, 'DelCurrentUsrLastname' => 16, 'DelDelegateDate' => 17, 'DelInitDate' => 18, 'DelDueDate' => 19, 'DelPriority' => 20, 'DelThreadStatus' => 21,),
BasePeer::TYPE_COLNAME => array (ListParticipatedLastPeer::APP_UID => 0, ListParticipatedLastPeer::DEL_INDEX => 1, ListParticipatedLastPeer::USR_UID => 2, ListParticipatedLastPeer::TAS_UID => 3, ListParticipatedLastPeer::PRO_UID => 4, ListParticipatedLastPeer::APP_NUMBER => 5, ListParticipatedLastPeer::APP_TITLE => 6, ListParticipatedLastPeer::APP_PRO_TITLE => 7, ListParticipatedLastPeer::APP_TAS_TITLE => 8, ListParticipatedLastPeer::APP_STATUS => 9, ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID => 10, ListParticipatedLastPeer::DEL_PREVIOUS_USR_USERNAME => 11, ListParticipatedLastPeer::DEL_PREVIOUS_USR_FIRSTNAME => 12, ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME => 13, ListParticipatedLastPeer::DEL_CURRENT_USR_USERNAME => 14, ListParticipatedLastPeer::DEL_CURRENT_USR_FIRSTNAME => 15, ListParticipatedLastPeer::DEL_CURRENT_USR_LASTNAME => 16, ListParticipatedLastPeer::DEL_DELEGATE_DATE => 17, ListParticipatedLastPeer::DEL_INIT_DATE => 18, ListParticipatedLastPeer::DEL_DUE_DATE => 19, ListParticipatedLastPeer::DEL_PRIORITY => 20, ListParticipatedLastPeer::DEL_THREAD_STATUS => 21, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'DEL_INDEX' => 1, 'USR_UID' => 2, 'TAS_UID' => 3, 'PRO_UID' => 4, 'APP_NUMBER' => 5, 'APP_TITLE' => 6, 'APP_PRO_TITLE' => 7, 'APP_TAS_TITLE' => 8, 'APP_STATUS' => 9, 'DEL_PREVIOUS_USR_UID' => 10, 'DEL_PREVIOUS_USR_USERNAME' => 11, 'DEL_PREVIOUS_USR_FIRSTNAME' => 12, 'DEL_PREVIOUS_USR_LASTNAME' => 13, 'DEL_CURRENT_USR_USERNAME' => 14, 'DEL_CURRENT_USR_FIRSTNAME' => 15, 'DEL_CURRENT_USR_LASTNAME' => 16, 'DEL_DELEGATE_DATE' => 17, 'DEL_INIT_DATE' => 18, 'DEL_DUE_DATE' => 19, 'DEL_PRIORITY' => 20, 'DEL_THREAD_STATUS' => 21, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, )
);
/**
@@ -211,6 +228,8 @@ abstract class BaseListParticipatedLastPeer
{
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_UID);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INDEX);
$criteria->addSelectColumn(ListParticipatedLastPeer::USR_UID);
@@ -226,7 +245,7 @@ abstract class BaseListParticipatedLastPeer
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_TAS_TITLE);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INDEX);
$criteria->addSelectColumn(ListParticipatedLastPeer::APP_STATUS);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_UID);
@@ -236,6 +255,12 @@ abstract class BaseListParticipatedLastPeer
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PREVIOUS_USR_LASTNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_CURRENT_USR_USERNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_CURRENT_USR_FIRSTNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_CURRENT_USR_LASTNAME);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_DELEGATE_DATE);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_INIT_DATE);
@@ -243,6 +268,8 @@ abstract class BaseListParticipatedLastPeer
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_PRIORITY);
$criteria->addSelectColumn(ListParticipatedLastPeer::DEL_THREAD_STATUS);
}
@@ -458,6 +485,9 @@ abstract class BaseListParticipatedLastPeer
$comparison = $criteria->getComparison(ListParticipatedLastPeer::APP_UID);
$selectCriteria->add(ListParticipatedLastPeer::APP_UID, $criteria->remove(ListParticipatedLastPeer::APP_UID), $comparison);
$comparison = $criteria->getComparison(ListParticipatedLastPeer::DEL_INDEX);
$selectCriteria->add(ListParticipatedLastPeer::DEL_INDEX, $criteria->remove(ListParticipatedLastPeer::DEL_INDEX), $comparison);
$comparison = $criteria->getComparison(ListParticipatedLastPeer::USR_UID);
$selectCriteria->add(ListParticipatedLastPeer::USR_UID, $criteria->remove(ListParticipatedLastPeer::USR_UID), $comparison);
@@ -535,10 +565,12 @@ abstract class BaseListParticipatedLastPeer
$vals[0][] = $value[0];
$vals[1][] = $value[1];
$vals[2][] = $value[2];
}
$criteria->add(ListParticipatedLastPeer::APP_UID, $vals[0], Criteria::IN);
$criteria->add(ListParticipatedLastPeer::USR_UID, $vals[1], Criteria::IN);
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, $vals[1], Criteria::IN);
$criteria->add(ListParticipatedLastPeer::USR_UID, $vals[2], Criteria::IN);
}
// Set the correct dbName
@@ -604,13 +636,14 @@ abstract class BaseListParticipatedLastPeer
* @param Connection $con
* @return ListParticipatedLast
*/
public static function retrieveByPK($app_uid, $usr_uid, $con = null)
public static function retrieveByPK($app_uid, $usr_uid, $del_index, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria();
$criteria->add(ListParticipatedLastPeer::APP_UID, $app_uid);
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, $del_index);
$criteria->add(ListParticipatedLastPeer::USR_UID, $usr_uid);
$v = ListParticipatedLastPeer::doSelect($criteria, $con);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,662 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by ListPausedPeer::getOMClass()
include_once 'classes/model/ListPaused.php';
/**
* Base static class for performing query and update operations on the 'LIST_PAUSED' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseListPausedPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'LIST_PAUSED';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.ListPaused';
/** The total number of columns. */
const NUM_COLUMNS = 22;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the APP_UID field */
const APP_UID = 'LIST_PAUSED.APP_UID';
/** the column name for the DEL_INDEX field */
const DEL_INDEX = 'LIST_PAUSED.DEL_INDEX';
/** the column name for the USR_UID field */
const USR_UID = 'LIST_PAUSED.USR_UID';
/** the column name for the TAS_UID field */
const TAS_UID = 'LIST_PAUSED.TAS_UID';
/** the column name for the PRO_UID field */
const PRO_UID = 'LIST_PAUSED.PRO_UID';
/** the column name for the APP_NUMBER field */
const APP_NUMBER = 'LIST_PAUSED.APP_NUMBER';
/** the column name for the APP_TITLE field */
const APP_TITLE = 'LIST_PAUSED.APP_TITLE';
/** the column name for the APP_PRO_TITLE field */
const APP_PRO_TITLE = 'LIST_PAUSED.APP_PRO_TITLE';
/** the column name for the APP_TAS_TITLE field */
const APP_TAS_TITLE = 'LIST_PAUSED.APP_TAS_TITLE';
/** the column name for the APP_PAUSED_DATE field */
const APP_PAUSED_DATE = 'LIST_PAUSED.APP_PAUSED_DATE';
/** the column name for the APP_RESTART_DATE field */
const APP_RESTART_DATE = 'LIST_PAUSED.APP_RESTART_DATE';
/** the column name for the DEL_PREVIOUS_USR_UID field */
const DEL_PREVIOUS_USR_UID = 'LIST_PAUSED.DEL_PREVIOUS_USR_UID';
/** the column name for the DEL_PREVIOUS_USR_USERNAME field */
const DEL_PREVIOUS_USR_USERNAME = 'LIST_PAUSED.DEL_PREVIOUS_USR_USERNAME';
/** the column name for the DEL_PREVIOUS_USR_FIRSTNAME field */
const DEL_PREVIOUS_USR_FIRSTNAME = 'LIST_PAUSED.DEL_PREVIOUS_USR_FIRSTNAME';
/** the column name for the DEL_PREVIOUS_USR_LASTNAME field */
const DEL_PREVIOUS_USR_LASTNAME = 'LIST_PAUSED.DEL_PREVIOUS_USR_LASTNAME';
/** the column name for the DEL_CURRENT_USR_USERNAME field */
const DEL_CURRENT_USR_USERNAME = 'LIST_PAUSED.DEL_CURRENT_USR_USERNAME';
/** the column name for the DEL_CURRENT_USR_FIRSTNAME field */
const DEL_CURRENT_USR_FIRSTNAME = 'LIST_PAUSED.DEL_CURRENT_USR_FIRSTNAME';
/** the column name for the DEL_CURRENT_USR_LASTNAME field */
const DEL_CURRENT_USR_LASTNAME = 'LIST_PAUSED.DEL_CURRENT_USR_LASTNAME';
/** the column name for the DEL_DELEGATE_DATE field */
const DEL_DELEGATE_DATE = 'LIST_PAUSED.DEL_DELEGATE_DATE';
/** the column name for the DEL_INIT_DATE field */
const DEL_INIT_DATE = 'LIST_PAUSED.DEL_INIT_DATE';
/** the column name for the DEL_DUE_DATE field */
const DEL_DUE_DATE = 'LIST_PAUSED.DEL_DUE_DATE';
/** the column name for the DEL_PRIORITY field */
const DEL_PRIORITY = 'LIST_PAUSED.DEL_PRIORITY';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AppUid', 'DelIndex', 'UsrUid', 'TasUid', 'ProUid', 'AppNumber', 'AppTitle', 'AppProTitle', 'AppTasTitle', 'AppPausedDate', 'AppRestartDate', 'DelPreviousUsrUid', 'DelPreviousUsrUsername', 'DelPreviousUsrFirstname', 'DelPreviousUsrLastname', 'DelCurrentUsrUsername', 'DelCurrentUsrFirstname', 'DelCurrentUsrLastname', 'DelDelegateDate', 'DelInitDate', 'DelDueDate', 'DelPriority', ),
BasePeer::TYPE_COLNAME => array (ListPausedPeer::APP_UID, ListPausedPeer::DEL_INDEX, ListPausedPeer::USR_UID, ListPausedPeer::TAS_UID, ListPausedPeer::PRO_UID, ListPausedPeer::APP_NUMBER, ListPausedPeer::APP_TITLE, ListPausedPeer::APP_PRO_TITLE, ListPausedPeer::APP_TAS_TITLE, ListPausedPeer::APP_PAUSED_DATE, ListPausedPeer::APP_RESTART_DATE, ListPausedPeer::DEL_PREVIOUS_USR_UID, ListPausedPeer::DEL_PREVIOUS_USR_USERNAME, ListPausedPeer::DEL_PREVIOUS_USR_FIRSTNAME, ListPausedPeer::DEL_PREVIOUS_USR_LASTNAME, ListPausedPeer::DEL_CURRENT_USR_USERNAME, ListPausedPeer::DEL_CURRENT_USR_FIRSTNAME, ListPausedPeer::DEL_CURRENT_USR_LASTNAME, ListPausedPeer::DEL_DELEGATE_DATE, ListPausedPeer::DEL_INIT_DATE, ListPausedPeer::DEL_DUE_DATE, ListPausedPeer::DEL_PRIORITY, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'DEL_INDEX', 'USR_UID', 'TAS_UID', 'PRO_UID', 'APP_NUMBER', 'APP_TITLE', 'APP_PRO_TITLE', 'APP_TAS_TITLE', 'APP_PAUSED_DATE', 'APP_RESTART_DATE', 'DEL_PREVIOUS_USR_UID', 'DEL_PREVIOUS_USR_USERNAME', 'DEL_PREVIOUS_USR_FIRSTNAME', 'DEL_PREVIOUS_USR_LASTNAME', 'DEL_CURRENT_USR_USERNAME', 'DEL_CURRENT_USR_FIRSTNAME', 'DEL_CURRENT_USR_LASTNAME', 'DEL_DELEGATE_DATE', 'DEL_INIT_DATE', 'DEL_DUE_DATE', 'DEL_PRIORITY', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, )
);
/**
* holds an array of keys for quick access to the fieldnames array
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'DelIndex' => 1, 'UsrUid' => 2, 'TasUid' => 3, 'ProUid' => 4, 'AppNumber' => 5, 'AppTitle' => 6, 'AppProTitle' => 7, 'AppTasTitle' => 8, 'AppPausedDate' => 9, 'AppRestartDate' => 10, 'DelPreviousUsrUid' => 11, 'DelPreviousUsrUsername' => 12, 'DelPreviousUsrFirstname' => 13, 'DelPreviousUsrLastname' => 14, 'DelCurrentUsrUsername' => 15, 'DelCurrentUsrFirstname' => 16, 'DelCurrentUsrLastname' => 17, 'DelDelegateDate' => 18, 'DelInitDate' => 19, 'DelDueDate' => 20, 'DelPriority' => 21, ),
BasePeer::TYPE_COLNAME => array (ListPausedPeer::APP_UID => 0, ListPausedPeer::DEL_INDEX => 1, ListPausedPeer::USR_UID => 2, ListPausedPeer::TAS_UID => 3, ListPausedPeer::PRO_UID => 4, ListPausedPeer::APP_NUMBER => 5, ListPausedPeer::APP_TITLE => 6, ListPausedPeer::APP_PRO_TITLE => 7, ListPausedPeer::APP_TAS_TITLE => 8, ListPausedPeer::APP_PAUSED_DATE => 9, ListPausedPeer::APP_RESTART_DATE => 10, ListPausedPeer::DEL_PREVIOUS_USR_UID => 11, ListPausedPeer::DEL_PREVIOUS_USR_USERNAME => 12, ListPausedPeer::DEL_PREVIOUS_USR_FIRSTNAME => 13, ListPausedPeer::DEL_PREVIOUS_USR_LASTNAME => 14, ListPausedPeer::DEL_CURRENT_USR_USERNAME => 15, ListPausedPeer::DEL_CURRENT_USR_FIRSTNAME => 16, ListPausedPeer::DEL_CURRENT_USR_LASTNAME => 17, ListPausedPeer::DEL_DELEGATE_DATE => 18, ListPausedPeer::DEL_INIT_DATE => 19, ListPausedPeer::DEL_DUE_DATE => 20, ListPausedPeer::DEL_PRIORITY => 21, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'DEL_INDEX' => 1, 'USR_UID' => 2, 'TAS_UID' => 3, 'PRO_UID' => 4, 'APP_NUMBER' => 5, 'APP_TITLE' => 6, 'APP_PRO_TITLE' => 7, 'APP_TAS_TITLE' => 8, 'APP_PAUSED_DATE' => 9, 'APP_RESTART_DATE' => 10, 'DEL_PREVIOUS_USR_UID' => 11, 'DEL_PREVIOUS_USR_USERNAME' => 12, 'DEL_PREVIOUS_USR_FIRSTNAME' => 13, 'DEL_PREVIOUS_USR_LASTNAME' => 14, 'DEL_CURRENT_USR_USERNAME' => 15, 'DEL_CURRENT_USR_FIRSTNAME' => 16, 'DEL_CURRENT_USR_LASTNAME' => 17, 'DEL_DELEGATE_DATE' => 18, 'DEL_INIT_DATE' => 19, 'DEL_DUE_DATE' => 20, 'DEL_PRIORITY' => 21, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, )
);
/**
* @return MapBuilder the map builder for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getMapBuilder()
{
include_once 'classes/model/map/ListPausedMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.ListPausedMapBuilder');
}
/**
* Gets a map (hash) of PHP names to DB column names.
*
* @return array The PHP to DB name map for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
$map = ListPausedPeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName();
}
self::$phpNameMap = $nameMap;
}
return self::$phpNameMap;
}
/**
* Translates a fieldname to another type
*
* @param string $name field name
* @param string $fromType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @param string $toType One of the class type constants
* @return string translated name of the field.
*/
static public function translateFieldName($name, $fromType, $toType)
{
$toNames = self::getFieldNames($toType);
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : 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));
}
return $toNames[$key];
}
/**
* Returns an array of of field names.
*
* @param string $type The type of fieldnames to return:
* One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return array A list of field names
*/
static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{
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.');
}
return self::$fieldNames[$type];
}
/**
* Convenience method which changes table.column to alias.column.
*
* Using this method you can maintain SQL abstraction while using column aliases.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. ListPausedPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(ListPausedPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
* Add all the columns needed to create a new object.
*
* Note: any columns that were marked with lazyLoad="true" in the
* XML schema will not be added to the select list and only loaded
* on demand.
*
* @param criteria object containing the columns to add.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria)
{
$criteria->addSelectColumn(ListPausedPeer::APP_UID);
$criteria->addSelectColumn(ListPausedPeer::DEL_INDEX);
$criteria->addSelectColumn(ListPausedPeer::USR_UID);
$criteria->addSelectColumn(ListPausedPeer::TAS_UID);
$criteria->addSelectColumn(ListPausedPeer::PRO_UID);
$criteria->addSelectColumn(ListPausedPeer::APP_NUMBER);
$criteria->addSelectColumn(ListPausedPeer::APP_TITLE);
$criteria->addSelectColumn(ListPausedPeer::APP_PRO_TITLE);
$criteria->addSelectColumn(ListPausedPeer::APP_TAS_TITLE);
$criteria->addSelectColumn(ListPausedPeer::APP_PAUSED_DATE);
$criteria->addSelectColumn(ListPausedPeer::APP_RESTART_DATE);
$criteria->addSelectColumn(ListPausedPeer::DEL_PREVIOUS_USR_UID);
$criteria->addSelectColumn(ListPausedPeer::DEL_PREVIOUS_USR_USERNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_PREVIOUS_USR_FIRSTNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_PREVIOUS_USR_LASTNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_CURRENT_USR_USERNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_CURRENT_USR_FIRSTNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_CURRENT_USR_LASTNAME);
$criteria->addSelectColumn(ListPausedPeer::DEL_DELEGATE_DATE);
$criteria->addSelectColumn(ListPausedPeer::DEL_INIT_DATE);
$criteria->addSelectColumn(ListPausedPeer::DEL_DUE_DATE);
$criteria->addSelectColumn(ListPausedPeer::DEL_PRIORITY);
}
const COUNT = 'COUNT(LIST_PAUSED.APP_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT LIST_PAUSED.APP_UID)';
/**
* Returns the number of rows matching criteria.
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
* @param Connection $con
* @return int Number of matching rows.
*/
public static function doCount(Criteria $criteria, $distinct = false, $con = null)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn(ListPausedPeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(ListPausedPeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn($column);
}
$rs = ListPausedPeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
} else {
// no rows returned; we infer that means 0 matches.
return 0;
}
}
/**
* Method to select one object from the DB.
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con
* @return ListPaused
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectOne(Criteria $criteria, $con = null)
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = ListPausedPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
return null;
}
/**
* Method to do selects.
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con
* @return array Array of selected Objects
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelect(Criteria $criteria, $con = null)
{
return ListPausedPeer::populateObjects(ListPausedPeer::doSelectRS($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect()
* method to get a ResultSet.
*
* Use this method directly if you want to just get the resultset
* (instead of an array of objects).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect()
*/
public static function doSelectRS(Criteria $criteria, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria;
ListPausedPeer::addSelectColumns($criteria);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
// BasePeer returns a Creole ResultSet, set to return
// rows indexed numerically.
return BasePeer::doSelect($criteria, $con);
}
/**
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function populateObjects(ResultSet $rs)
{
$results = array();
// set the class once to avoid overhead in the loop
$cls = ListPausedPeer::getOMClass();
$cls = Propel::import($cls);
// populate the object(s)
while ($rs->next()) {
$obj = new $cls();
$obj->hydrate($rs);
$results[] = $obj;
}
return $results;
}
/**
* Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need.
* @return TableMap
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
}
/**
* The class that the Peer will make instances of.
*
* This uses a dot-path notation which is tranalted into a path
* relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
*
* @return string path.to.ClassName
*/
public static function getOMClass()
{
return ListPausedPeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a ListPaused or Criteria object.
*
* @param mixed $values Criteria or ListPaused object containing data that is used to create the INSERT statement.
* @param Connection $con the connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doInsert($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
$criteria = $values->buildCriteria(); // build Criteria from ListPaused object
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
try {
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
$con->begin();
$pk = BasePeer::doInsert($criteria, $con);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
return $pk;
}
/**
* Method perform an UPDATE on the database, given a ListPaused or Criteria object.
*
* @param mixed $values Criteria or ListPaused object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doUpdate($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison(ListPausedPeer::APP_UID);
$selectCriteria->add(ListPausedPeer::APP_UID, $criteria->remove(ListPausedPeer::APP_UID), $comparison);
$comparison = $criteria->getComparison(ListPausedPeer::DEL_INDEX);
$selectCriteria->add(ListPausedPeer::DEL_INDEX, $criteria->remove(ListPausedPeer::DEL_INDEX), $comparison);
} else {
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
// set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
return BasePeer::doUpdate($selectCriteria, $criteria, $con);
}
/**
* Method to DELETE all rows from the LIST_PAUSED table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDeleteAll(ListPausedPeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Method perform a DELETE on the database, given a ListPaused or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or ListPaused object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
* This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(ListPausedPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof ListPaused) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
// primary key is composite; we therefore, expect
// the primary key passed to be an array of pkey
// values
if (count($values) == count($values, COUNT_RECURSIVE)) {
// array is not multi-dimensional
$values = array($values);
}
$vals = array();
foreach ($values as $value) {
$vals[0][] = $value[0];
$vals[1][] = $value[1];
}
$criteria->add(ListPausedPeer::APP_UID, $vals[0], Criteria::IN);
$criteria->add(ListPausedPeer::DEL_INDEX, $vals[1], Criteria::IN);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Validates all modified columns of given ListPaused object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
* @param ListPaused $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
public static function doValidate(ListPaused $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(ListPausedPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(ListPausedPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
}
foreach ($cols as $colName) {
if ($tableMap->containsColumn($colName)) {
$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
$columns[$colName] = $obj->$get();
}
}
} else {
}
return BasePeer::doValidate(ListPausedPeer::DATABASE_NAME, ListPausedPeer::TABLE_NAME, $columns);
}
/**
* Retrieve object using using composite pkey values.
* @param string $app_uid
* @param int $del_index
* @param Connection $con
* @return ListPaused
*/
public static function retrieveByPK($app_uid, $del_index, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria();
$criteria->add(ListPausedPeer::APP_UID, $app_uid);
$criteria->add(ListPausedPeer::DEL_INDEX, $del_index);
$v = ListPausedPeer::doSelect($criteria, $con);
return !empty($v) ? $v[0] : null;
}
}
// static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization
// so we need to load them here.
try {
BaseListPausedPeer::getMapBuilder();
} catch (Exception $e) {
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
}
} else {
// even if Propel is not yet initialized, the map builder class can be registered
// now and then it will be loaded when Propel initializes.
require_once 'classes/model/map/ListPausedMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.ListPausedMapBuilder');
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,615 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by MessageApplicationPeer::getOMClass()
include_once 'classes/model/MessageApplication.php';
/**
* Base static class for performing query and update operations on the 'MESSAGE_APPLICATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageApplicationPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'MESSAGE_APPLICATION';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.MessageApplication';
/** The total number of columns. */
const NUM_COLUMNS = 10;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the MSGAPP_UID field */
const MSGAPP_UID = 'MESSAGE_APPLICATION.MSGAPP_UID';
/** the column name for the APP_UID field */
const APP_UID = 'MESSAGE_APPLICATION.APP_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'MESSAGE_APPLICATION.PRJ_UID';
/** the column name for the EVN_UID_THROW field */
const EVN_UID_THROW = 'MESSAGE_APPLICATION.EVN_UID_THROW';
/** the column name for the EVN_UID_CATCH field */
const EVN_UID_CATCH = 'MESSAGE_APPLICATION.EVN_UID_CATCH';
/** the column name for the MSGAPP_VARIABLES field */
const MSGAPP_VARIABLES = 'MESSAGE_APPLICATION.MSGAPP_VARIABLES';
/** the column name for the MSGAPP_CORRELATION field */
const MSGAPP_CORRELATION = 'MESSAGE_APPLICATION.MSGAPP_CORRELATION';
/** the column name for the MSGAPP_THROW_DATE field */
const MSGAPP_THROW_DATE = 'MESSAGE_APPLICATION.MSGAPP_THROW_DATE';
/** the column name for the MSGAPP_CATCH_DATE field */
const MSGAPP_CATCH_DATE = 'MESSAGE_APPLICATION.MSGAPP_CATCH_DATE';
/** the column name for the MSGAPP_STATUS field */
const MSGAPP_STATUS = 'MESSAGE_APPLICATION.MSGAPP_STATUS';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('MsgappUid', 'AppUid', 'PrjUid', 'EvnUidThrow', 'EvnUidCatch', 'MsgappVariables', 'MsgappCorrelation', 'MsgappThrowDate', 'MsgappCatchDate', 'MsgappStatus', ),
BasePeer::TYPE_COLNAME => array (MessageApplicationPeer::MSGAPP_UID, MessageApplicationPeer::APP_UID, MessageApplicationPeer::PRJ_UID, MessageApplicationPeer::EVN_UID_THROW, MessageApplicationPeer::EVN_UID_CATCH, MessageApplicationPeer::MSGAPP_VARIABLES, MessageApplicationPeer::MSGAPP_CORRELATION, MessageApplicationPeer::MSGAPP_THROW_DATE, MessageApplicationPeer::MSGAPP_CATCH_DATE, MessageApplicationPeer::MSGAPP_STATUS, ),
BasePeer::TYPE_FIELDNAME => array ('MSGAPP_UID', 'APP_UID', 'PRJ_UID', 'EVN_UID_THROW', 'EVN_UID_CATCH', 'MSGAPP_VARIABLES', 'MSGAPP_CORRELATION', 'MSGAPP_THROW_DATE', 'MSGAPP_CATCH_DATE', 'MSGAPP_STATUS', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
);
/**
* holds an array of keys for quick access to the fieldnames array
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('MsgappUid' => 0, 'AppUid' => 1, 'PrjUid' => 2, 'EvnUidThrow' => 3, 'EvnUidCatch' => 4, 'MsgappVariables' => 5, 'MsgappCorrelation' => 6, 'MsgappThrowDate' => 7, 'MsgappCatchDate' => 8, 'MsgappStatus' => 9, ),
BasePeer::TYPE_COLNAME => array (MessageApplicationPeer::MSGAPP_UID => 0, MessageApplicationPeer::APP_UID => 1, MessageApplicationPeer::PRJ_UID => 2, MessageApplicationPeer::EVN_UID_THROW => 3, MessageApplicationPeer::EVN_UID_CATCH => 4, MessageApplicationPeer::MSGAPP_VARIABLES => 5, MessageApplicationPeer::MSGAPP_CORRELATION => 6, MessageApplicationPeer::MSGAPP_THROW_DATE => 7, MessageApplicationPeer::MSGAPP_CATCH_DATE => 8, MessageApplicationPeer::MSGAPP_STATUS => 9, ),
BasePeer::TYPE_FIELDNAME => array ('MSGAPP_UID' => 0, 'APP_UID' => 1, 'PRJ_UID' => 2, 'EVN_UID_THROW' => 3, 'EVN_UID_CATCH' => 4, 'MSGAPP_VARIABLES' => 5, 'MSGAPP_CORRELATION' => 6, 'MSGAPP_THROW_DATE' => 7, 'MSGAPP_CATCH_DATE' => 8, 'MSGAPP_STATUS' => 9, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
);
/**
* @return MapBuilder the map builder for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getMapBuilder()
{
include_once 'classes/model/map/MessageApplicationMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageApplicationMapBuilder');
}
/**
* Gets a map (hash) of PHP names to DB column names.
*
* @return array The PHP to DB name map for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
$map = MessageApplicationPeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName();
}
self::$phpNameMap = $nameMap;
}
return self::$phpNameMap;
}
/**
* Translates a fieldname to another type
*
* @param string $name field name
* @param string $fromType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @param string $toType One of the class type constants
* @return string translated name of the field.
*/
static public function translateFieldName($name, $fromType, $toType)
{
$toNames = self::getFieldNames($toType);
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : 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));
}
return $toNames[$key];
}
/**
* Returns an array of of field names.
*
* @param string $type The type of fieldnames to return:
* One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return array A list of field names
*/
static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{
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.');
}
return self::$fieldNames[$type];
}
/**
* Convenience method which changes table.column to alias.column.
*
* Using this method you can maintain SQL abstraction while using column aliases.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. MessageApplicationPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(MessageApplicationPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
* Add all the columns needed to create a new object.
*
* Note: any columns that were marked with lazyLoad="true" in the
* XML schema will not be added to the select list and only loaded
* on demand.
*
* @param criteria object containing the columns to add.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria)
{
$criteria->addSelectColumn(MessageApplicationPeer::MSGAPP_UID);
$criteria->addSelectColumn(MessageApplicationPeer::APP_UID);
$criteria->addSelectColumn(MessageApplicationPeer::PRJ_UID);
$criteria->addSelectColumn(MessageApplicationPeer::EVN_UID_THROW);
$criteria->addSelectColumn(MessageApplicationPeer::EVN_UID_CATCH);
$criteria->addSelectColumn(MessageApplicationPeer::MSGAPP_VARIABLES);
$criteria->addSelectColumn(MessageApplicationPeer::MSGAPP_CORRELATION);
$criteria->addSelectColumn(MessageApplicationPeer::MSGAPP_THROW_DATE);
$criteria->addSelectColumn(MessageApplicationPeer::MSGAPP_CATCH_DATE);
$criteria->addSelectColumn(MessageApplicationPeer::MSGAPP_STATUS);
}
const COUNT = 'COUNT(MESSAGE_APPLICATION.MSGAPP_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_APPLICATION.MSGAPP_UID)';
/**
* Returns the number of rows matching criteria.
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
* @param Connection $con
* @return int Number of matching rows.
*/
public static function doCount(Criteria $criteria, $distinct = false, $con = null)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn(MessageApplicationPeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(MessageApplicationPeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn($column);
}
$rs = MessageApplicationPeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
} else {
// no rows returned; we infer that means 0 matches.
return 0;
}
}
/**
* Method to select one object from the DB.
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con
* @return MessageApplication
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectOne(Criteria $criteria, $con = null)
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = MessageApplicationPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
return null;
}
/**
* Method to do selects.
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con
* @return array Array of selected Objects
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelect(Criteria $criteria, $con = null)
{
return MessageApplicationPeer::populateObjects(MessageApplicationPeer::doSelectRS($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect()
* method to get a ResultSet.
*
* Use this method directly if you want to just get the resultset
* (instead of an array of objects).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect()
*/
public static function doSelectRS(Criteria $criteria, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria;
MessageApplicationPeer::addSelectColumns($criteria);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
// BasePeer returns a Creole ResultSet, set to return
// rows indexed numerically.
return BasePeer::doSelect($criteria, $con);
}
/**
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function populateObjects(ResultSet $rs)
{
$results = array();
// set the class once to avoid overhead in the loop
$cls = MessageApplicationPeer::getOMClass();
$cls = Propel::import($cls);
// populate the object(s)
while ($rs->next()) {
$obj = new $cls();
$obj->hydrate($rs);
$results[] = $obj;
}
return $results;
}
/**
* Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need.
* @return TableMap
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
}
/**
* The class that the Peer will make instances of.
*
* This uses a dot-path notation which is tranalted into a path
* relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
*
* @return string path.to.ClassName
*/
public static function getOMClass()
{
return MessageApplicationPeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a MessageApplication or Criteria object.
*
* @param mixed $values Criteria or MessageApplication object containing data that is used to create the INSERT statement.
* @param Connection $con the connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doInsert($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
$criteria = $values->buildCriteria(); // build Criteria from MessageApplication object
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
try {
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
$con->begin();
$pk = BasePeer::doInsert($criteria, $con);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
return $pk;
}
/**
* Method perform an UPDATE on the database, given a MessageApplication or Criteria object.
*
* @param mixed $values Criteria or MessageApplication object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doUpdate($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison(MessageApplicationPeer::MSGAPP_UID);
$selectCriteria->add(MessageApplicationPeer::MSGAPP_UID, $criteria->remove(MessageApplicationPeer::MSGAPP_UID), $comparison);
} else {
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
// set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
return BasePeer::doUpdate($selectCriteria, $criteria, $con);
}
/**
* Method to DELETE all rows from the MESSAGE_APPLICATION table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDeleteAll(MessageApplicationPeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Method perform a DELETE on the database, given a MessageApplication or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or MessageApplication object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
* This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(MessageApplicationPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof MessageApplication) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(MessageApplicationPeer::MSGAPP_UID, (array) $values, Criteria::IN);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Validates all modified columns of given MessageApplication object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
* @param MessageApplication $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
public static function doValidate(MessageApplication $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(MessageApplicationPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessageApplicationPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
}
foreach ($cols as $colName) {
if ($tableMap->containsColumn($colName)) {
$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
$columns[$colName] = $obj->$get();
}
}
} else {
if ($obj->isNew() || $obj->isColumnModified(MessageApplicationPeer::MSGAPP_STATUS))
$columns[MessageApplicationPeer::MSGAPP_STATUS] = $obj->getMsgappStatus();
}
return BasePeer::doValidate(MessageApplicationPeer::DATABASE_NAME, MessageApplicationPeer::TABLE_NAME, $columns);
}
/**
* Retrieve a single object by pkey.
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return MessageApplication
*/
public static function retrieveByPK($pk, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(MessageApplicationPeer::DATABASE_NAME);
$criteria->add(MessageApplicationPeer::MSGAPP_UID, $pk);
$v = MessageApplicationPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
/**
* Retrieve multiple objects by pkey.
*
* @param array $pks List of primary keys
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function retrieveByPKs($pks, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
$criteria = new Criteria();
$criteria->add(MessageApplicationPeer::MSGAPP_UID, $pks, Criteria::IN);
$objs = MessageApplicationPeer::doSelect($criteria, $con);
}
return $objs;
}
}
// static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization
// so we need to load them here.
try {
BaseMessageApplicationPeer::getMapBuilder();
} catch (Exception $e) {
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
}
} else {
// even if Propel is not yet initialized, the map builder class can be registered
// now and then it will be loaded when Propel initializes.
require_once 'classes/model/map/MessageApplicationMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageApplicationMapBuilder');
}

View File

@@ -0,0 +1,858 @@
<?php
require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/MessageEventDefinitionPeer.php';
/**
* Base class that represents a row from the 'MESSAGE_EVENT_DEFINITION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventDefinition extends BaseObject implements Persistent
{
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
* @var MessageEventDefinitionPeer
*/
protected static $peer;
/**
* The value for the msged_uid field.
* @var string
*/
protected $msged_uid;
/**
* The value for the prj_uid field.
* @var string
*/
protected $prj_uid;
/**
* The value for the evn_uid field.
* @var string
*/
protected $evn_uid;
/**
* The value for the msgt_uid field.
* @var string
*/
protected $msgt_uid = '';
/**
* The value for the msged_usr_uid field.
* @var string
*/
protected $msged_usr_uid = '';
/**
* The value for the msged_variables field.
* @var string
*/
protected $msged_variables = '';
/**
* The value for the msged_correlation field.
* @var string
*/
protected $msged_correlation = '';
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInSave = false;
/**
* Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInValidation = false;
/**
* Get the [msged_uid] column value.
*
* @return string
*/
public function getMsgedUid()
{
return $this->msged_uid;
}
/**
* Get the [prj_uid] column value.
*
* @return string
*/
public function getPrjUid()
{
return $this->prj_uid;
}
/**
* Get the [evn_uid] column value.
*
* @return string
*/
public function getEvnUid()
{
return $this->evn_uid;
}
/**
* Get the [msgt_uid] column value.
*
* @return string
*/
public function getMsgtUid()
{
return $this->msgt_uid;
}
/**
* Get the [msged_usr_uid] column value.
*
* @return string
*/
public function getMsgedUsrUid()
{
return $this->msged_usr_uid;
}
/**
* Get the [msged_variables] column value.
*
* @return string
*/
public function getMsgedVariables()
{
return $this->msged_variables;
}
/**
* Get the [msged_correlation] column value.
*
* @return string
*/
public function getMsgedCorrelation()
{
return $this->msged_correlation;
}
/**
* Set the value of [msged_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMsgedUid($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->msged_uid !== $v) {
$this->msged_uid = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGED_UID;
}
} // setMsgedUid()
/**
* Set the value of [prj_uid] column.
*
* @param string $v new value
* @return void
*/
public function setPrjUid($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->prj_uid !== $v) {
$this->prj_uid = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::PRJ_UID;
}
} // setPrjUid()
/**
* Set the value of [evn_uid] column.
*
* @param string $v new value
* @return void
*/
public function setEvnUid($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->evn_uid !== $v) {
$this->evn_uid = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::EVN_UID;
}
} // setEvnUid()
/**
* Set the value of [msgt_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMsgtUid($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->msgt_uid !== $v || $v === '') {
$this->msgt_uid = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGT_UID;
}
} // setMsgtUid()
/**
* Set the value of [msged_usr_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMsgedUsrUid($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->msged_usr_uid !== $v || $v === '') {
$this->msged_usr_uid = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGED_USR_UID;
}
} // setMsgedUsrUid()
/**
* Set the value of [msged_variables] column.
*
* @param string $v new value
* @return void
*/
public function setMsgedVariables($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->msged_variables !== $v || $v === '') {
$this->msged_variables = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGED_VARIABLES;
}
} // setMsgedVariables()
/**
* Set the value of [msged_correlation] column.
*
* @param string $v new value
* @return void
*/
public function setMsgedCorrelation($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->msged_correlation !== $v || $v === '') {
$this->msged_correlation = $v;
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGED_CORRELATION;
}
} // setMsgedCorrelation()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
* An offset (1-based "start column") is specified so that objects can be hydrated
* with a subset of the columns in the resultset rows. This is needed, for example,
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
* @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos.
* @param int $startcol 1-based offset column which indicates which restultset column to start with.
* @return int next starting column
* @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
public function hydrate(ResultSet $rs, $startcol = 1)
{
try {
$this->msged_uid = $rs->getString($startcol + 0);
$this->prj_uid = $rs->getString($startcol + 1);
$this->evn_uid = $rs->getString($startcol + 2);
$this->msgt_uid = $rs->getString($startcol + 3);
$this->msged_usr_uid = $rs->getString($startcol + 4);
$this->msged_variables = $rs->getString($startcol + 5);
$this->msged_correlation = $rs->getString($startcol + 6);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 7; // 7 = MessageEventDefinitionPeer::NUM_COLUMNS - MessageEventDefinitionPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating MessageEventDefinition object", $e);
}
}
/**
* Removes this object from datastore and sets delete attribute.
*
* @param Connection $con
* @return void
* @throws PropelException
* @see BaseObject::setDeleted()
* @see BaseObject::isDeleted()
*/
public function delete($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventDefinitionPeer::DATABASE_NAME);
}
try {
$con->begin();
MessageEventDefinitionPeer::doDelete($this, $con);
$this->setDeleted(true);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed. This method
* wraps the doSave() worker method in a transaction.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update
* @throws PropelException
* @see doSave()
*/
public function save($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventDefinitionPeer::DATABASE_NAME);
}
try {
$con->begin();
$affectedRows = $this->doSave($con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database.
*
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update and any referring
* @throws PropelException
* @see save()
*/
protected function doSave($con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$pk = MessageEventDefinitionPeer::doInsert($this, $con);
$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
// should always be true here (even though technically
// BasePeer::doInsert() can insert multiple rows).
$this->setNew(false);
} else {
$affectedRows += MessageEventDefinitionPeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
$this->alreadyInSave = false;
}
return $affectedRows;
} // doSave()
/**
* Array of ValidationFailed objects.
* @var array ValidationFailed[]
*/
protected $validationFailures = array();
/**
* Gets any ValidationFailed objects that resulted from last call to validate().
*
*
* @return array ValidationFailed[]
* @see validate()
*/
public function getValidationFailures()
{
return $this->validationFailures;
}
/**
* Validates the objects modified field values and all objects related to this table.
*
* If $columns is either a column name or an array of column names
* only those columns are validated.
*
* @param mixed $columns Column name or an array of column names.
* @return boolean Whether all columns pass validation.
* @see doValidate()
* @see getValidationFailures()
*/
public function validate($columns = null)
{
$res = $this->doValidate($columns);
if ($res === true) {
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
}
/**
* This function performs the validation work for complex object models.
*
* In addition to checking the current object, all related objects will
* also be validated. If all pass then <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
if (($retval = MessageEventDefinitionPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
$this->alreadyInValidation = false;
}
return (!empty($failureMap) ? $failureMap : true);
}
/**
* Retrieves a field from the object by name passed in as a string.
*
* @param string $name name
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return mixed Value of field.
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventDefinitionPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->getByPosition($pos);
}
/**
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @return mixed Value of field at $pos
*/
public function getByPosition($pos)
{
switch($pos) {
case 0:
return $this->getMsgedUid();
break;
case 1:
return $this->getPrjUid();
break;
case 2:
return $this->getEvnUid();
break;
case 3:
return $this->getMsgtUid();
break;
case 4:
return $this->getMsgedUsrUid();
break;
case 5:
return $this->getMsgedVariables();
break;
case 6:
return $this->getMsgedCorrelation();
break;
default:
return null;
break;
} // switch()
}
/**
* Exports the object as an array.
*
* You can specify the key type of the array by passing one of the class
* type constants.
*
* @param string $keyType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return an associative array containing the field names (as keys) and field values
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventDefinitionPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getMsgedUid(),
$keys[1] => $this->getPrjUid(),
$keys[2] => $this->getEvnUid(),
$keys[3] => $this->getMsgtUid(),
$keys[4] => $this->getMsgedUsrUid(),
$keys[5] => $this->getMsgedVariables(),
$keys[6] => $this->getMsgedCorrelation(),
);
return $result;
}
/**
* Sets a field from the object by name passed in as a string.
*
* @param string $name peer name
* @param mixed $value field value
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return void
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventDefinitionPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @param mixed $value field value
* @return void
*/
public function setByPosition($pos, $value)
{
switch($pos) {
case 0:
$this->setMsgedUid($value);
break;
case 1:
$this->setPrjUid($value);
break;
case 2:
$this->setEvnUid($value);
break;
case 3:
$this->setMsgtUid($value);
break;
case 4:
$this->setMsgedUsrUid($value);
break;
case 5:
$this->setMsgedVariables($value);
break;
case 6:
$this->setMsgedCorrelation($value);
break;
} // switch()
}
/**
* Populates the object using an array.
*
* This is particularly useful when populating an object from one of the
* request arrays (e.g. $_POST). This method goes through the column
* names, checking to see whether a matching key exists in populated
* array. If so the setByName() method is called for that column.
*
* You can specify the key type of the array by additionally passing one
* of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME,
* TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId')
*
* @param array $arr An array to populate the object from.
* @param string $keyType The type of keys the array uses.
* @return void
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventDefinitionPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) {
$this->setMsgedUid($arr[$keys[0]]);
}
if (array_key_exists($keys[1], $arr)) {
$this->setPrjUid($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setEvnUid($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setMsgtUid($arr[$keys[3]]);
}
if (array_key_exists($keys[4], $arr)) {
$this->setMsgedUsrUid($arr[$keys[4]]);
}
if (array_key_exists($keys[5], $arr)) {
$this->setMsgedVariables($arr[$keys[5]]);
}
if (array_key_exists($keys[6], $arr)) {
$this->setMsgedCorrelation($arr[$keys[6]]);
}
}
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
* @return Criteria The Criteria object containing all modified values.
*/
public function buildCriteria()
{
$criteria = new Criteria(MessageEventDefinitionPeer::DATABASE_NAME);
if ($this->isColumnModified(MessageEventDefinitionPeer::MSGED_UID)) {
$criteria->add(MessageEventDefinitionPeer::MSGED_UID, $this->msged_uid);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::PRJ_UID)) {
$criteria->add(MessageEventDefinitionPeer::PRJ_UID, $this->prj_uid);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::EVN_UID)) {
$criteria->add(MessageEventDefinitionPeer::EVN_UID, $this->evn_uid);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::MSGT_UID)) {
$criteria->add(MessageEventDefinitionPeer::MSGT_UID, $this->msgt_uid);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::MSGED_USR_UID)) {
$criteria->add(MessageEventDefinitionPeer::MSGED_USR_UID, $this->msged_usr_uid);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::MSGED_VARIABLES)) {
$criteria->add(MessageEventDefinitionPeer::MSGED_VARIABLES, $this->msged_variables);
}
if ($this->isColumnModified(MessageEventDefinitionPeer::MSGED_CORRELATION)) {
$criteria->add(MessageEventDefinitionPeer::MSGED_CORRELATION, $this->msged_correlation);
}
return $criteria;
}
/**
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
* of whether or not they have been modified.
*
* @return Criteria The Criteria object containing value(s) for primary key(s).
*/
public function buildPkeyCriteria()
{
$criteria = new Criteria(MessageEventDefinitionPeer::DATABASE_NAME);
$criteria->add(MessageEventDefinitionPeer::MSGED_UID, $this->msged_uid);
return $criteria;
}
/**
* Returns the primary key for this object (row).
* @return string
*/
public function getPrimaryKey()
{
return $this->getMsgedUid();
}
/**
* Generic method to set the primary key (msged_uid column).
*
* @param string $key Primary key.
* @return void
*/
public function setPrimaryKey($key)
{
$this->setMsgedUid($key);
}
/**
* Sets contents of passed object to values from current object.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param object $copyObj An object of MessageEventDefinition (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false)
{
$copyObj->setPrjUid($this->prj_uid);
$copyObj->setEvnUid($this->evn_uid);
$copyObj->setMsgtUid($this->msgt_uid);
$copyObj->setMsgedUsrUid($this->msged_usr_uid);
$copyObj->setMsgedVariables($this->msged_variables);
$copyObj->setMsgedCorrelation($this->msged_correlation);
$copyObj->setNew(true);
$copyObj->setMsgedUid(NULL); // this is a pkey column, so set to default value
}
/**
* Makes a copy of this object that will be inserted as a new row in table when saved.
* It creates a new object filling in the simple attributes, but skipping any primary
* keys that are defined for the table.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return MessageEventDefinition Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
$copyObj = new $clazz();
$this->copyInto($copyObj, $deepCopy);
return $copyObj;
}
/**
* Returns a peer instance associated with this om.
*
* Since Peer classes are not to have any instance attributes, this method returns the
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
* @return MessageEventDefinitionPeer
*/
public function getPeer()
{
if (self::$peer === null) {
self::$peer = new MessageEventDefinitionPeer();
}
return self::$peer;
}
}

View File

@@ -0,0 +1,597 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by MessageEventDefinitionPeer::getOMClass()
include_once 'classes/model/MessageEventDefinition.php';
/**
* Base static class for performing query and update operations on the 'MESSAGE_EVENT_DEFINITION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventDefinitionPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'MESSAGE_EVENT_DEFINITION';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.MessageEventDefinition';
/** The total number of columns. */
const NUM_COLUMNS = 7;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the MSGED_UID field */
const MSGED_UID = 'MESSAGE_EVENT_DEFINITION.MSGED_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'MESSAGE_EVENT_DEFINITION.PRJ_UID';
/** the column name for the EVN_UID field */
const EVN_UID = 'MESSAGE_EVENT_DEFINITION.EVN_UID';
/** the column name for the MSGT_UID field */
const MSGT_UID = 'MESSAGE_EVENT_DEFINITION.MSGT_UID';
/** the column name for the MSGED_USR_UID field */
const MSGED_USR_UID = 'MESSAGE_EVENT_DEFINITION.MSGED_USR_UID';
/** the column name for the MSGED_VARIABLES field */
const MSGED_VARIABLES = 'MESSAGE_EVENT_DEFINITION.MSGED_VARIABLES';
/** the column name for the MSGED_CORRELATION field */
const MSGED_CORRELATION = 'MESSAGE_EVENT_DEFINITION.MSGED_CORRELATION';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('MsgedUid', 'PrjUid', 'EvnUid', 'MsgtUid', 'MsgedUsrUid', 'MsgedVariables', 'MsgedCorrelation', ),
BasePeer::TYPE_COLNAME => array (MessageEventDefinitionPeer::MSGED_UID, MessageEventDefinitionPeer::PRJ_UID, MessageEventDefinitionPeer::EVN_UID, MessageEventDefinitionPeer::MSGT_UID, MessageEventDefinitionPeer::MSGED_USR_UID, MessageEventDefinitionPeer::MSGED_VARIABLES, MessageEventDefinitionPeer::MSGED_CORRELATION, ),
BasePeer::TYPE_FIELDNAME => array ('MSGED_UID', 'PRJ_UID', 'EVN_UID', 'MSGT_UID', 'MSGED_USR_UID', 'MSGED_VARIABLES', 'MSGED_CORRELATION', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
);
/**
* holds an array of keys for quick access to the fieldnames array
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('MsgedUid' => 0, 'PrjUid' => 1, 'EvnUid' => 2, 'MsgtUid' => 3, 'MsgedUsrUid' => 4, 'MsgedVariables' => 5, 'MsgedCorrelation' => 6, ),
BasePeer::TYPE_COLNAME => array (MessageEventDefinitionPeer::MSGED_UID => 0, MessageEventDefinitionPeer::PRJ_UID => 1, MessageEventDefinitionPeer::EVN_UID => 2, MessageEventDefinitionPeer::MSGT_UID => 3, MessageEventDefinitionPeer::MSGED_USR_UID => 4, MessageEventDefinitionPeer::MSGED_VARIABLES => 5, MessageEventDefinitionPeer::MSGED_CORRELATION => 6, ),
BasePeer::TYPE_FIELDNAME => array ('MSGED_UID' => 0, 'PRJ_UID' => 1, 'EVN_UID' => 2, 'MSGT_UID' => 3, 'MSGED_USR_UID' => 4, 'MSGED_VARIABLES' => 5, 'MSGED_CORRELATION' => 6, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, )
);
/**
* @return MapBuilder the map builder for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getMapBuilder()
{
include_once 'classes/model/map/MessageEventDefinitionMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageEventDefinitionMapBuilder');
}
/**
* Gets a map (hash) of PHP names to DB column names.
*
* @return array The PHP to DB name map for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
$map = MessageEventDefinitionPeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName();
}
self::$phpNameMap = $nameMap;
}
return self::$phpNameMap;
}
/**
* Translates a fieldname to another type
*
* @param string $name field name
* @param string $fromType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @param string $toType One of the class type constants
* @return string translated name of the field.
*/
static public function translateFieldName($name, $fromType, $toType)
{
$toNames = self::getFieldNames($toType);
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : 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));
}
return $toNames[$key];
}
/**
* Returns an array of of field names.
*
* @param string $type The type of fieldnames to return:
* One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return array A list of field names
*/
static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{
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.');
}
return self::$fieldNames[$type];
}
/**
* Convenience method which changes table.column to alias.column.
*
* Using this method you can maintain SQL abstraction while using column aliases.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. MessageEventDefinitionPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(MessageEventDefinitionPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
* Add all the columns needed to create a new object.
*
* Note: any columns that were marked with lazyLoad="true" in the
* XML schema will not be added to the select list and only loaded
* on demand.
*
* @param criteria object containing the columns to add.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria)
{
$criteria->addSelectColumn(MessageEventDefinitionPeer::MSGED_UID);
$criteria->addSelectColumn(MessageEventDefinitionPeer::PRJ_UID);
$criteria->addSelectColumn(MessageEventDefinitionPeer::EVN_UID);
$criteria->addSelectColumn(MessageEventDefinitionPeer::MSGT_UID);
$criteria->addSelectColumn(MessageEventDefinitionPeer::MSGED_USR_UID);
$criteria->addSelectColumn(MessageEventDefinitionPeer::MSGED_VARIABLES);
$criteria->addSelectColumn(MessageEventDefinitionPeer::MSGED_CORRELATION);
}
const COUNT = 'COUNT(MESSAGE_EVENT_DEFINITION.MSGED_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_EVENT_DEFINITION.MSGED_UID)';
/**
* Returns the number of rows matching criteria.
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
* @param Connection $con
* @return int Number of matching rows.
*/
public static function doCount(Criteria $criteria, $distinct = false, $con = null)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn(MessageEventDefinitionPeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(MessageEventDefinitionPeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn($column);
}
$rs = MessageEventDefinitionPeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
} else {
// no rows returned; we infer that means 0 matches.
return 0;
}
}
/**
* Method to select one object from the DB.
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con
* @return MessageEventDefinition
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectOne(Criteria $criteria, $con = null)
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = MessageEventDefinitionPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
return null;
}
/**
* Method to do selects.
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con
* @return array Array of selected Objects
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelect(Criteria $criteria, $con = null)
{
return MessageEventDefinitionPeer::populateObjects(MessageEventDefinitionPeer::doSelectRS($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect()
* method to get a ResultSet.
*
* Use this method directly if you want to just get the resultset
* (instead of an array of objects).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect()
*/
public static function doSelectRS(Criteria $criteria, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria;
MessageEventDefinitionPeer::addSelectColumns($criteria);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
// BasePeer returns a Creole ResultSet, set to return
// rows indexed numerically.
return BasePeer::doSelect($criteria, $con);
}
/**
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function populateObjects(ResultSet $rs)
{
$results = array();
// set the class once to avoid overhead in the loop
$cls = MessageEventDefinitionPeer::getOMClass();
$cls = Propel::import($cls);
// populate the object(s)
while ($rs->next()) {
$obj = new $cls();
$obj->hydrate($rs);
$results[] = $obj;
}
return $results;
}
/**
* Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need.
* @return TableMap
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
}
/**
* The class that the Peer will make instances of.
*
* This uses a dot-path notation which is tranalted into a path
* relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
*
* @return string path.to.ClassName
*/
public static function getOMClass()
{
return MessageEventDefinitionPeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a MessageEventDefinition or Criteria object.
*
* @param mixed $values Criteria or MessageEventDefinition object containing data that is used to create the INSERT statement.
* @param Connection $con the connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doInsert($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
$criteria = $values->buildCriteria(); // build Criteria from MessageEventDefinition object
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
try {
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
$con->begin();
$pk = BasePeer::doInsert($criteria, $con);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
return $pk;
}
/**
* Method perform an UPDATE on the database, given a MessageEventDefinition or Criteria object.
*
* @param mixed $values Criteria or MessageEventDefinition object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doUpdate($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison(MessageEventDefinitionPeer::MSGED_UID);
$selectCriteria->add(MessageEventDefinitionPeer::MSGED_UID, $criteria->remove(MessageEventDefinitionPeer::MSGED_UID), $comparison);
} else {
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
// set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
return BasePeer::doUpdate($selectCriteria, $criteria, $con);
}
/**
* Method to DELETE all rows from the MESSAGE_EVENT_DEFINITION table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDeleteAll(MessageEventDefinitionPeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Method perform a DELETE on the database, given a MessageEventDefinition or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or MessageEventDefinition object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
* This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(MessageEventDefinitionPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof MessageEventDefinition) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(MessageEventDefinitionPeer::MSGED_UID, (array) $values, Criteria::IN);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Validates all modified columns of given MessageEventDefinition object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
* @param MessageEventDefinition $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
public static function doValidate(MessageEventDefinition $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(MessageEventDefinitionPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessageEventDefinitionPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
}
foreach ($cols as $colName) {
if ($tableMap->containsColumn($colName)) {
$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
$columns[$colName] = $obj->$get();
}
}
} else {
}
return BasePeer::doValidate(MessageEventDefinitionPeer::DATABASE_NAME, MessageEventDefinitionPeer::TABLE_NAME, $columns);
}
/**
* Retrieve a single object by pkey.
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return MessageEventDefinition
*/
public static function retrieveByPK($pk, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(MessageEventDefinitionPeer::DATABASE_NAME);
$criteria->add(MessageEventDefinitionPeer::MSGED_UID, $pk);
$v = MessageEventDefinitionPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
/**
* Retrieve multiple objects by pkey.
*
* @param array $pks List of primary keys
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function retrieveByPKs($pks, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
$criteria = new Criteria();
$criteria->add(MessageEventDefinitionPeer::MSGED_UID, $pks, Criteria::IN);
$objs = MessageEventDefinitionPeer::doSelect($criteria, $con);
}
return $objs;
}
}
// static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization
// so we need to load them here.
try {
BaseMessageEventDefinitionPeer::getMapBuilder();
} catch (Exception $e) {
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
}
} else {
// even if Propel is not yet initialized, the map builder class can be registered
// now and then it will be loaded when Propel initializes.
require_once 'classes/model/map/MessageEventDefinitionMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageEventDefinitionMapBuilder');
}

View File

@@ -0,0 +1,684 @@
<?php
require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/MessageEventRelationPeer.php';
/**
* Base class that represents a row from the 'MESSAGE_EVENT_RELATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventRelation extends BaseObject implements Persistent
{
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
* @var MessageEventRelationPeer
*/
protected static $peer;
/**
* The value for the msger_uid field.
* @var string
*/
protected $msger_uid;
/**
* The value for the prj_uid field.
* @var string
*/
protected $prj_uid;
/**
* The value for the evn_uid_throw field.
* @var string
*/
protected $evn_uid_throw;
/**
* The value for the evn_uid_catch field.
* @var string
*/
protected $evn_uid_catch;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInSave = false;
/**
* Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInValidation = false;
/**
* Get the [msger_uid] column value.
*
* @return string
*/
public function getMsgerUid()
{
return $this->msger_uid;
}
/**
* Get the [prj_uid] column value.
*
* @return string
*/
public function getPrjUid()
{
return $this->prj_uid;
}
/**
* Get the [evn_uid_throw] column value.
*
* @return string
*/
public function getEvnUidThrow()
{
return $this->evn_uid_throw;
}
/**
* Get the [evn_uid_catch] column value.
*
* @return string
*/
public function getEvnUidCatch()
{
return $this->evn_uid_catch;
}
/**
* Set the value of [msger_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMsgerUid($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->msger_uid !== $v) {
$this->msger_uid = $v;
$this->modifiedColumns[] = MessageEventRelationPeer::MSGER_UID;
}
} // setMsgerUid()
/**
* Set the value of [prj_uid] column.
*
* @param string $v new value
* @return void
*/
public function setPrjUid($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->prj_uid !== $v) {
$this->prj_uid = $v;
$this->modifiedColumns[] = MessageEventRelationPeer::PRJ_UID;
}
} // setPrjUid()
/**
* Set the value of [evn_uid_throw] column.
*
* @param string $v new value
* @return void
*/
public function setEvnUidThrow($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->evn_uid_throw !== $v) {
$this->evn_uid_throw = $v;
$this->modifiedColumns[] = MessageEventRelationPeer::EVN_UID_THROW;
}
} // setEvnUidThrow()
/**
* Set the value of [evn_uid_catch] column.
*
* @param string $v new value
* @return void
*/
public function setEvnUidCatch($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->evn_uid_catch !== $v) {
$this->evn_uid_catch = $v;
$this->modifiedColumns[] = MessageEventRelationPeer::EVN_UID_CATCH;
}
} // setEvnUidCatch()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
* An offset (1-based "start column") is specified so that objects can be hydrated
* with a subset of the columns in the resultset rows. This is needed, for example,
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
* @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos.
* @param int $startcol 1-based offset column which indicates which restultset column to start with.
* @return int next starting column
* @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
public function hydrate(ResultSet $rs, $startcol = 1)
{
try {
$this->msger_uid = $rs->getString($startcol + 0);
$this->prj_uid = $rs->getString($startcol + 1);
$this->evn_uid_throw = $rs->getString($startcol + 2);
$this->evn_uid_catch = $rs->getString($startcol + 3);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 4; // 4 = MessageEventRelationPeer::NUM_COLUMNS - MessageEventRelationPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating MessageEventRelation object", $e);
}
}
/**
* Removes this object from datastore and sets delete attribute.
*
* @param Connection $con
* @return void
* @throws PropelException
* @see BaseObject::setDeleted()
* @see BaseObject::isDeleted()
*/
public function delete($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventRelationPeer::DATABASE_NAME);
}
try {
$con->begin();
MessageEventRelationPeer::doDelete($this, $con);
$this->setDeleted(true);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed. This method
* wraps the doSave() worker method in a transaction.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update
* @throws PropelException
* @see doSave()
*/
public function save($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventRelationPeer::DATABASE_NAME);
}
try {
$con->begin();
$affectedRows = $this->doSave($con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database.
*
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update and any referring
* @throws PropelException
* @see save()
*/
protected function doSave($con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$pk = MessageEventRelationPeer::doInsert($this, $con);
$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
// should always be true here (even though technically
// BasePeer::doInsert() can insert multiple rows).
$this->setNew(false);
} else {
$affectedRows += MessageEventRelationPeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
$this->alreadyInSave = false;
}
return $affectedRows;
} // doSave()
/**
* Array of ValidationFailed objects.
* @var array ValidationFailed[]
*/
protected $validationFailures = array();
/**
* Gets any ValidationFailed objects that resulted from last call to validate().
*
*
* @return array ValidationFailed[]
* @see validate()
*/
public function getValidationFailures()
{
return $this->validationFailures;
}
/**
* Validates the objects modified field values and all objects related to this table.
*
* If $columns is either a column name or an array of column names
* only those columns are validated.
*
* @param mixed $columns Column name or an array of column names.
* @return boolean Whether all columns pass validation.
* @see doValidate()
* @see getValidationFailures()
*/
public function validate($columns = null)
{
$res = $this->doValidate($columns);
if ($res === true) {
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
}
/**
* This function performs the validation work for complex object models.
*
* In addition to checking the current object, all related objects will
* also be validated. If all pass then <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
if (($retval = MessageEventRelationPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
$this->alreadyInValidation = false;
}
return (!empty($failureMap) ? $failureMap : true);
}
/**
* Retrieves a field from the object by name passed in as a string.
*
* @param string $name name
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return mixed Value of field.
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->getByPosition($pos);
}
/**
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @return mixed Value of field at $pos
*/
public function getByPosition($pos)
{
switch($pos) {
case 0:
return $this->getMsgerUid();
break;
case 1:
return $this->getPrjUid();
break;
case 2:
return $this->getEvnUidThrow();
break;
case 3:
return $this->getEvnUidCatch();
break;
default:
return null;
break;
} // switch()
}
/**
* Exports the object as an array.
*
* You can specify the key type of the array by passing one of the class
* type constants.
*
* @param string $keyType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return an associative array containing the field names (as keys) and field values
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventRelationPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getMsgerUid(),
$keys[1] => $this->getPrjUid(),
$keys[2] => $this->getEvnUidThrow(),
$keys[3] => $this->getEvnUidCatch(),
);
return $result;
}
/**
* Sets a field from the object by name passed in as a string.
*
* @param string $name peer name
* @param mixed $value field value
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return void
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @param mixed $value field value
* @return void
*/
public function setByPosition($pos, $value)
{
switch($pos) {
case 0:
$this->setMsgerUid($value);
break;
case 1:
$this->setPrjUid($value);
break;
case 2:
$this->setEvnUidThrow($value);
break;
case 3:
$this->setEvnUidCatch($value);
break;
} // switch()
}
/**
* Populates the object using an array.
*
* This is particularly useful when populating an object from one of the
* request arrays (e.g. $_POST). This method goes through the column
* names, checking to see whether a matching key exists in populated
* array. If so the setByName() method is called for that column.
*
* You can specify the key type of the array by additionally passing one
* of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME,
* TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId')
*
* @param array $arr An array to populate the object from.
* @param string $keyType The type of keys the array uses.
* @return void
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventRelationPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) {
$this->setMsgerUid($arr[$keys[0]]);
}
if (array_key_exists($keys[1], $arr)) {
$this->setPrjUid($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setEvnUidThrow($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setEvnUidCatch($arr[$keys[3]]);
}
}
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
* @return Criteria The Criteria object containing all modified values.
*/
public function buildCriteria()
{
$criteria = new Criteria(MessageEventRelationPeer::DATABASE_NAME);
if ($this->isColumnModified(MessageEventRelationPeer::MSGER_UID)) {
$criteria->add(MessageEventRelationPeer::MSGER_UID, $this->msger_uid);
}
if ($this->isColumnModified(MessageEventRelationPeer::PRJ_UID)) {
$criteria->add(MessageEventRelationPeer::PRJ_UID, $this->prj_uid);
}
if ($this->isColumnModified(MessageEventRelationPeer::EVN_UID_THROW)) {
$criteria->add(MessageEventRelationPeer::EVN_UID_THROW, $this->evn_uid_throw);
}
if ($this->isColumnModified(MessageEventRelationPeer::EVN_UID_CATCH)) {
$criteria->add(MessageEventRelationPeer::EVN_UID_CATCH, $this->evn_uid_catch);
}
return $criteria;
}
/**
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
* of whether or not they have been modified.
*
* @return Criteria The Criteria object containing value(s) for primary key(s).
*/
public function buildPkeyCriteria()
{
$criteria = new Criteria(MessageEventRelationPeer::DATABASE_NAME);
$criteria->add(MessageEventRelationPeer::MSGER_UID, $this->msger_uid);
return $criteria;
}
/**
* Returns the primary key for this object (row).
* @return string
*/
public function getPrimaryKey()
{
return $this->getMsgerUid();
}
/**
* Generic method to set the primary key (msger_uid column).
*
* @param string $key Primary key.
* @return void
*/
public function setPrimaryKey($key)
{
$this->setMsgerUid($key);
}
/**
* Sets contents of passed object to values from current object.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param object $copyObj An object of MessageEventRelation (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false)
{
$copyObj->setPrjUid($this->prj_uid);
$copyObj->setEvnUidThrow($this->evn_uid_throw);
$copyObj->setEvnUidCatch($this->evn_uid_catch);
$copyObj->setNew(true);
$copyObj->setMsgerUid(NULL); // this is a pkey column, so set to default value
}
/**
* Makes a copy of this object that will be inserted as a new row in table when saved.
* It creates a new object filling in the simple attributes, but skipping any primary
* keys that are defined for the table.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return MessageEventRelation Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
$copyObj = new $clazz();
$this->copyInto($copyObj, $deepCopy);
return $copyObj;
}
/**
* Returns a peer instance associated with this om.
*
* Since Peer classes are not to have any instance attributes, this method returns the
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
* @return MessageEventRelationPeer
*/
public function getPeer()
{
if (self::$peer === null) {
self::$peer = new MessageEventRelationPeer();
}
return self::$peer;
}
}

View File

@@ -0,0 +1,582 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by MessageEventRelationPeer::getOMClass()
include_once 'classes/model/MessageEventRelation.php';
/**
* Base static class for performing query and update operations on the 'MESSAGE_EVENT_RELATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventRelationPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'MESSAGE_EVENT_RELATION';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.MessageEventRelation';
/** The total number of columns. */
const NUM_COLUMNS = 4;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the MSGER_UID field */
const MSGER_UID = 'MESSAGE_EVENT_RELATION.MSGER_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'MESSAGE_EVENT_RELATION.PRJ_UID';
/** the column name for the EVN_UID_THROW field */
const EVN_UID_THROW = 'MESSAGE_EVENT_RELATION.EVN_UID_THROW';
/** the column name for the EVN_UID_CATCH field */
const EVN_UID_CATCH = 'MESSAGE_EVENT_RELATION.EVN_UID_CATCH';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('MsgerUid', 'PrjUid', 'EvnUidThrow', 'EvnUidCatch', ),
BasePeer::TYPE_COLNAME => array (MessageEventRelationPeer::MSGER_UID, MessageEventRelationPeer::PRJ_UID, MessageEventRelationPeer::EVN_UID_THROW, MessageEventRelationPeer::EVN_UID_CATCH, ),
BasePeer::TYPE_FIELDNAME => array ('MSGER_UID', 'PRJ_UID', 'EVN_UID_THROW', 'EVN_UID_CATCH', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
/**
* holds an array of keys for quick access to the fieldnames array
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('MsgerUid' => 0, 'PrjUid' => 1, 'EvnUidThrow' => 2, 'EvnUidCatch' => 3, ),
BasePeer::TYPE_COLNAME => array (MessageEventRelationPeer::MSGER_UID => 0, MessageEventRelationPeer::PRJ_UID => 1, MessageEventRelationPeer::EVN_UID_THROW => 2, MessageEventRelationPeer::EVN_UID_CATCH => 3, ),
BasePeer::TYPE_FIELDNAME => array ('MSGER_UID' => 0, 'PRJ_UID' => 1, 'EVN_UID_THROW' => 2, 'EVN_UID_CATCH' => 3, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
/**
* @return MapBuilder the map builder for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getMapBuilder()
{
include_once 'classes/model/map/MessageEventRelationMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageEventRelationMapBuilder');
}
/**
* Gets a map (hash) of PHP names to DB column names.
*
* @return array The PHP to DB name map for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
$map = MessageEventRelationPeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName();
}
self::$phpNameMap = $nameMap;
}
return self::$phpNameMap;
}
/**
* Translates a fieldname to another type
*
* @param string $name field name
* @param string $fromType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @param string $toType One of the class type constants
* @return string translated name of the field.
*/
static public function translateFieldName($name, $fromType, $toType)
{
$toNames = self::getFieldNames($toType);
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : 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));
}
return $toNames[$key];
}
/**
* Returns an array of of field names.
*
* @param string $type The type of fieldnames to return:
* One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return array A list of field names
*/
static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{
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.');
}
return self::$fieldNames[$type];
}
/**
* Convenience method which changes table.column to alias.column.
*
* Using this method you can maintain SQL abstraction while using column aliases.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. MessageEventRelationPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(MessageEventRelationPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
* Add all the columns needed to create a new object.
*
* Note: any columns that were marked with lazyLoad="true" in the
* XML schema will not be added to the select list and only loaded
* on demand.
*
* @param criteria object containing the columns to add.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria)
{
$criteria->addSelectColumn(MessageEventRelationPeer::MSGER_UID);
$criteria->addSelectColumn(MessageEventRelationPeer::PRJ_UID);
$criteria->addSelectColumn(MessageEventRelationPeer::EVN_UID_THROW);
$criteria->addSelectColumn(MessageEventRelationPeer::EVN_UID_CATCH);
}
const COUNT = 'COUNT(MESSAGE_EVENT_RELATION.MSGER_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_EVENT_RELATION.MSGER_UID)';
/**
* Returns the number of rows matching criteria.
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
* @param Connection $con
* @return int Number of matching rows.
*/
public static function doCount(Criteria $criteria, $distinct = false, $con = null)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn(MessageEventRelationPeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(MessageEventRelationPeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn($column);
}
$rs = MessageEventRelationPeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
} else {
// no rows returned; we infer that means 0 matches.
return 0;
}
}
/**
* Method to select one object from the DB.
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con
* @return MessageEventRelation
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectOne(Criteria $criteria, $con = null)
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = MessageEventRelationPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
return null;
}
/**
* Method to do selects.
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con
* @return array Array of selected Objects
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelect(Criteria $criteria, $con = null)
{
return MessageEventRelationPeer::populateObjects(MessageEventRelationPeer::doSelectRS($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect()
* method to get a ResultSet.
*
* Use this method directly if you want to just get the resultset
* (instead of an array of objects).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect()
*/
public static function doSelectRS(Criteria $criteria, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria;
MessageEventRelationPeer::addSelectColumns($criteria);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
// BasePeer returns a Creole ResultSet, set to return
// rows indexed numerically.
return BasePeer::doSelect($criteria, $con);
}
/**
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function populateObjects(ResultSet $rs)
{
$results = array();
// set the class once to avoid overhead in the loop
$cls = MessageEventRelationPeer::getOMClass();
$cls = Propel::import($cls);
// populate the object(s)
while ($rs->next()) {
$obj = new $cls();
$obj->hydrate($rs);
$results[] = $obj;
}
return $results;
}
/**
* Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need.
* @return TableMap
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
}
/**
* The class that the Peer will make instances of.
*
* This uses a dot-path notation which is tranalted into a path
* relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
*
* @return string path.to.ClassName
*/
public static function getOMClass()
{
return MessageEventRelationPeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a MessageEventRelation or Criteria object.
*
* @param mixed $values Criteria or MessageEventRelation object containing data that is used to create the INSERT statement.
* @param Connection $con the connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doInsert($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
$criteria = $values->buildCriteria(); // build Criteria from MessageEventRelation object
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
try {
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
$con->begin();
$pk = BasePeer::doInsert($criteria, $con);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
return $pk;
}
/**
* Method perform an UPDATE on the database, given a MessageEventRelation or Criteria object.
*
* @param mixed $values Criteria or MessageEventRelation object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doUpdate($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison(MessageEventRelationPeer::MSGER_UID);
$selectCriteria->add(MessageEventRelationPeer::MSGER_UID, $criteria->remove(MessageEventRelationPeer::MSGER_UID), $comparison);
} else {
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
// set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
return BasePeer::doUpdate($selectCriteria, $criteria, $con);
}
/**
* Method to DELETE all rows from the MESSAGE_EVENT_RELATION table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDeleteAll(MessageEventRelationPeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Method perform a DELETE on the database, given a MessageEventRelation or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or MessageEventRelation object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
* This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(MessageEventRelationPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof MessageEventRelation) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(MessageEventRelationPeer::MSGER_UID, (array) $values, Criteria::IN);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Validates all modified columns of given MessageEventRelation object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
* @param MessageEventRelation $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
public static function doValidate(MessageEventRelation $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(MessageEventRelationPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessageEventRelationPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
}
foreach ($cols as $colName) {
if ($tableMap->containsColumn($colName)) {
$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
$columns[$colName] = $obj->$get();
}
}
} else {
}
return BasePeer::doValidate(MessageEventRelationPeer::DATABASE_NAME, MessageEventRelationPeer::TABLE_NAME, $columns);
}
/**
* Retrieve a single object by pkey.
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return MessageEventRelation
*/
public static function retrieveByPK($pk, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(MessageEventRelationPeer::DATABASE_NAME);
$criteria->add(MessageEventRelationPeer::MSGER_UID, $pk);
$v = MessageEventRelationPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
/**
* Retrieve multiple objects by pkey.
*
* @param array $pks List of primary keys
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function retrieveByPKs($pks, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
$criteria = new Criteria();
$criteria->add(MessageEventRelationPeer::MSGER_UID, $pks, Criteria::IN);
$objs = MessageEventRelationPeer::doSelect($criteria, $con);
}
return $objs;
}
}
// static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization
// so we need to load them here.
try {
BaseMessageEventRelationPeer::getMapBuilder();
} catch (Exception $e) {
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
}
} else {
// even if Propel is not yet initialized, the map builder class can be registered
// now and then it will be loaded when Propel initializes.
require_once 'classes/model/map/MessageEventRelationMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageEventRelationMapBuilder');
}

View File

@@ -0,0 +1,684 @@
<?php
require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/MessageEventTaskRelationPeer.php';
/**
* Base class that represents a row from the 'MESSAGE_EVENT_TASK_RELATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventTaskRelation extends BaseObject implements Persistent
{
/**
* The Peer class.
* Instance provides a convenient way of calling static methods on a class
* that calling code may not be able to identify.
* @var MessageEventTaskRelationPeer
*/
protected static $peer;
/**
* The value for the msgetr_uid field.
* @var string
*/
protected $msgetr_uid;
/**
* The value for the prj_uid field.
* @var string
*/
protected $prj_uid;
/**
* The value for the evn_uid field.
* @var string
*/
protected $evn_uid;
/**
* The value for the tas_uid field.
* @var string
*/
protected $tas_uid;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInSave = false;
/**
* Flag to prevent endless validation loop, if this object is referenced
* by another object which falls in this transaction.
* @var boolean
*/
protected $alreadyInValidation = false;
/**
* Get the [msgetr_uid] column value.
*
* @return string
*/
public function getMsgetrUid()
{
return $this->msgetr_uid;
}
/**
* Get the [prj_uid] column value.
*
* @return string
*/
public function getPrjUid()
{
return $this->prj_uid;
}
/**
* Get the [evn_uid] column value.
*
* @return string
*/
public function getEvnUid()
{
return $this->evn_uid;
}
/**
* Get the [tas_uid] column value.
*
* @return string
*/
public function getTasUid()
{
return $this->tas_uid;
}
/**
* Set the value of [msgetr_uid] column.
*
* @param string $v new value
* @return void
*/
public function setMsgetrUid($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->msgetr_uid !== $v) {
$this->msgetr_uid = $v;
$this->modifiedColumns[] = MessageEventTaskRelationPeer::MSGETR_UID;
}
} // setMsgetrUid()
/**
* Set the value of [prj_uid] column.
*
* @param string $v new value
* @return void
*/
public function setPrjUid($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->prj_uid !== $v) {
$this->prj_uid = $v;
$this->modifiedColumns[] = MessageEventTaskRelationPeer::PRJ_UID;
}
} // setPrjUid()
/**
* Set the value of [evn_uid] column.
*
* @param string $v new value
* @return void
*/
public function setEvnUid($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->evn_uid !== $v) {
$this->evn_uid = $v;
$this->modifiedColumns[] = MessageEventTaskRelationPeer::EVN_UID;
}
} // setEvnUid()
/**
* Set the value of [tas_uid] column.
*
* @param string $v new value
* @return void
*/
public function setTasUid($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->tas_uid !== $v) {
$this->tas_uid = $v;
$this->modifiedColumns[] = MessageEventTaskRelationPeer::TAS_UID;
}
} // setTasUid()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
* An offset (1-based "start column") is specified so that objects can be hydrated
* with a subset of the columns in the resultset rows. This is needed, for example,
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
* @param ResultSet $rs The ResultSet class with cursor advanced to desired record pos.
* @param int $startcol 1-based offset column which indicates which restultset column to start with.
* @return int next starting column
* @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
public function hydrate(ResultSet $rs, $startcol = 1)
{
try {
$this->msgetr_uid = $rs->getString($startcol + 0);
$this->prj_uid = $rs->getString($startcol + 1);
$this->evn_uid = $rs->getString($startcol + 2);
$this->tas_uid = $rs->getString($startcol + 3);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 4; // 4 = MessageEventTaskRelationPeer::NUM_COLUMNS - MessageEventTaskRelationPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating MessageEventTaskRelation object", $e);
}
}
/**
* Removes this object from datastore and sets delete attribute.
*
* @param Connection $con
* @return void
* @throws PropelException
* @see BaseObject::setDeleted()
* @see BaseObject::isDeleted()
*/
public function delete($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("This object has already been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventTaskRelationPeer::DATABASE_NAME);
}
try {
$con->begin();
MessageEventTaskRelationPeer::doDelete($this, $con);
$this->setDeleted(true);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed. This method
* wraps the doSave() worker method in a transaction.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update
* @throws PropelException
* @see doSave()
*/
public function save($con = null)
{
if ($this->isDeleted()) {
throw new PropelException("You cannot save an object that has been deleted.");
}
if ($con === null) {
$con = Propel::getConnection(MessageEventTaskRelationPeer::DATABASE_NAME);
}
try {
$con->begin();
$affectedRows = $this->doSave($con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Stores the object in the database.
*
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
* @param Connection $con
* @return int The number of rows affected by this insert/update and any referring
* @throws PropelException
* @see save()
*/
protected function doSave($con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
$pk = MessageEventTaskRelationPeer::doInsert($this, $con);
$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
// should always be true here (even though technically
// BasePeer::doInsert() can insert multiple rows).
$this->setNew(false);
} else {
$affectedRows += MessageEventTaskRelationPeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
$this->alreadyInSave = false;
}
return $affectedRows;
} // doSave()
/**
* Array of ValidationFailed objects.
* @var array ValidationFailed[]
*/
protected $validationFailures = array();
/**
* Gets any ValidationFailed objects that resulted from last call to validate().
*
*
* @return array ValidationFailed[]
* @see validate()
*/
public function getValidationFailures()
{
return $this->validationFailures;
}
/**
* Validates the objects modified field values and all objects related to this table.
*
* If $columns is either a column name or an array of column names
* only those columns are validated.
*
* @param mixed $columns Column name or an array of column names.
* @return boolean Whether all columns pass validation.
* @see doValidate()
* @see getValidationFailures()
*/
public function validate($columns = null)
{
$res = $this->doValidate($columns);
if ($res === true) {
$this->validationFailures = array();
return true;
} else {
$this->validationFailures = $res;
return false;
}
}
/**
* This function performs the validation work for complex object models.
*
* In addition to checking the current object, all related objects will
* also be validated. If all pass then <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned.
*
* @param array $columns Array of column names to validate.
* @return mixed <code>true</code> if all validations pass;
array of <code>ValidationFailed</code> objects otherwise.
*/
protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
if (($retval = MessageEventTaskRelationPeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
$this->alreadyInValidation = false;
}
return (!empty($failureMap) ? $failureMap : true);
}
/**
* Retrieves a field from the object by name passed in as a string.
*
* @param string $name name
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return mixed Value of field.
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventTaskRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->getByPosition($pos);
}
/**
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @return mixed Value of field at $pos
*/
public function getByPosition($pos)
{
switch($pos) {
case 0:
return $this->getMsgetrUid();
break;
case 1:
return $this->getPrjUid();
break;
case 2:
return $this->getEvnUid();
break;
case 3:
return $this->getTasUid();
break;
default:
return null;
break;
} // switch()
}
/**
* Exports the object as an array.
*
* You can specify the key type of the array by passing one of the class
* type constants.
*
* @param string $keyType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return an associative array containing the field names (as keys) and field values
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventTaskRelationPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getMsgetrUid(),
$keys[1] => $this->getPrjUid(),
$keys[2] => $this->getEvnUid(),
$keys[3] => $this->getTasUid(),
);
return $result;
}
/**
* Sets a field from the object by name passed in as a string.
*
* @param string $name peer name
* @param mixed $value field value
* @param string $type The type of fieldname the $name is of:
* one of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return void
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
$pos = MessageEventTaskRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
/**
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
* @param int $pos position in xml schema
* @param mixed $value field value
* @return void
*/
public function setByPosition($pos, $value)
{
switch($pos) {
case 0:
$this->setMsgetrUid($value);
break;
case 1:
$this->setPrjUid($value);
break;
case 2:
$this->setEvnUid($value);
break;
case 3:
$this->setTasUid($value);
break;
} // switch()
}
/**
* Populates the object using an array.
*
* This is particularly useful when populating an object from one of the
* request arrays (e.g. $_POST). This method goes through the column
* names, checking to see whether a matching key exists in populated
* array. If so the setByName() method is called for that column.
*
* You can specify the key type of the array by additionally passing one
* of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME,
* TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId')
*
* @param array $arr An array to populate the object from.
* @param string $keyType The type of keys the array uses.
* @return void
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = MessageEventTaskRelationPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) {
$this->setMsgetrUid($arr[$keys[0]]);
}
if (array_key_exists($keys[1], $arr)) {
$this->setPrjUid($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setEvnUid($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setTasUid($arr[$keys[3]]);
}
}
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
* @return Criteria The Criteria object containing all modified values.
*/
public function buildCriteria()
{
$criteria = new Criteria(MessageEventTaskRelationPeer::DATABASE_NAME);
if ($this->isColumnModified(MessageEventTaskRelationPeer::MSGETR_UID)) {
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $this->msgetr_uid);
}
if ($this->isColumnModified(MessageEventTaskRelationPeer::PRJ_UID)) {
$criteria->add(MessageEventTaskRelationPeer::PRJ_UID, $this->prj_uid);
}
if ($this->isColumnModified(MessageEventTaskRelationPeer::EVN_UID)) {
$criteria->add(MessageEventTaskRelationPeer::EVN_UID, $this->evn_uid);
}
if ($this->isColumnModified(MessageEventTaskRelationPeer::TAS_UID)) {
$criteria->add(MessageEventTaskRelationPeer::TAS_UID, $this->tas_uid);
}
return $criteria;
}
/**
* Builds a Criteria object containing the primary key for this object.
*
* Unlike buildCriteria() this method includes the primary key values regardless
* of whether or not they have been modified.
*
* @return Criteria The Criteria object containing value(s) for primary key(s).
*/
public function buildPkeyCriteria()
{
$criteria = new Criteria(MessageEventTaskRelationPeer::DATABASE_NAME);
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $this->msgetr_uid);
return $criteria;
}
/**
* Returns the primary key for this object (row).
* @return string
*/
public function getPrimaryKey()
{
return $this->getMsgetrUid();
}
/**
* Generic method to set the primary key (msgetr_uid column).
*
* @param string $key Primary key.
* @return void
*/
public function setPrimaryKey($key)
{
$this->setMsgetrUid($key);
}
/**
* Sets contents of passed object to values from current object.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param object $copyObj An object of MessageEventTaskRelation (or compatible) type.
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false)
{
$copyObj->setPrjUid($this->prj_uid);
$copyObj->setEvnUid($this->evn_uid);
$copyObj->setTasUid($this->tas_uid);
$copyObj->setNew(true);
$copyObj->setMsgetrUid(NULL); // this is a pkey column, so set to default value
}
/**
* Makes a copy of this object that will be inserted as a new row in table when saved.
* It creates a new object filling in the simple attributes, but skipping any primary
* keys that are defined for the table.
*
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
* @return MessageEventTaskRelation Clone of current object.
* @throws PropelException
*/
public function copy($deepCopy = false)
{
// we use get_class(), because this might be a subclass
$clazz = get_class($this);
$copyObj = new $clazz();
$this->copyInto($copyObj, $deepCopy);
return $copyObj;
}
/**
* Returns a peer instance associated with this om.
*
* Since Peer classes are not to have any instance attributes, this method returns the
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
* @return MessageEventTaskRelationPeer
*/
public function getPeer()
{
if (self::$peer === null) {
self::$peer = new MessageEventTaskRelationPeer();
}
return self::$peer;
}
}

View File

@@ -0,0 +1,582 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by MessageEventTaskRelationPeer::getOMClass()
include_once 'classes/model/MessageEventTaskRelation.php';
/**
* Base static class for performing query and update operations on the 'MESSAGE_EVENT_TASK_RELATION' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseMessageEventTaskRelationPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'MESSAGE_EVENT_TASK_RELATION';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.MessageEventTaskRelation';
/** The total number of columns. */
const NUM_COLUMNS = 4;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the MSGETR_UID field */
const MSGETR_UID = 'MESSAGE_EVENT_TASK_RELATION.MSGETR_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'MESSAGE_EVENT_TASK_RELATION.PRJ_UID';
/** the column name for the EVN_UID field */
const EVN_UID = 'MESSAGE_EVENT_TASK_RELATION.EVN_UID';
/** the column name for the TAS_UID field */
const TAS_UID = 'MESSAGE_EVENT_TASK_RELATION.TAS_UID';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('MsgetrUid', 'PrjUid', 'EvnUid', 'TasUid', ),
BasePeer::TYPE_COLNAME => array (MessageEventTaskRelationPeer::MSGETR_UID, MessageEventTaskRelationPeer::PRJ_UID, MessageEventTaskRelationPeer::EVN_UID, MessageEventTaskRelationPeer::TAS_UID, ),
BasePeer::TYPE_FIELDNAME => array ('MSGETR_UID', 'PRJ_UID', 'EVN_UID', 'TAS_UID', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
/**
* holds an array of keys for quick access to the fieldnames array
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('MsgetrUid' => 0, 'PrjUid' => 1, 'EvnUid' => 2, 'TasUid' => 3, ),
BasePeer::TYPE_COLNAME => array (MessageEventTaskRelationPeer::MSGETR_UID => 0, MessageEventTaskRelationPeer::PRJ_UID => 1, MessageEventTaskRelationPeer::EVN_UID => 2, MessageEventTaskRelationPeer::TAS_UID => 3, ),
BasePeer::TYPE_FIELDNAME => array ('MSGETR_UID' => 0, 'PRJ_UID' => 1, 'EVN_UID' => 2, 'TAS_UID' => 3, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
/**
* @return MapBuilder the map builder for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getMapBuilder()
{
include_once 'classes/model/map/MessageEventTaskRelationMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.MessageEventTaskRelationMapBuilder');
}
/**
* Gets a map (hash) of PHP names to DB column names.
*
* @return array The PHP to DB name map for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
$map = MessageEventTaskRelationPeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName();
}
self::$phpNameMap = $nameMap;
}
return self::$phpNameMap;
}
/**
* Translates a fieldname to another type
*
* @param string $name field name
* @param string $fromType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @param string $toType One of the class type constants
* @return string translated name of the field.
*/
static public function translateFieldName($name, $fromType, $toType)
{
$toNames = self::getFieldNames($toType);
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : 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));
}
return $toNames[$key];
}
/**
* Returns an array of of field names.
*
* @param string $type The type of fieldnames to return:
* One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return array A list of field names
*/
static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{
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.');
}
return self::$fieldNames[$type];
}
/**
* Convenience method which changes table.column to alias.column.
*
* Using this method you can maintain SQL abstraction while using column aliases.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. MessageEventTaskRelationPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(MessageEventTaskRelationPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
* Add all the columns needed to create a new object.
*
* Note: any columns that were marked with lazyLoad="true" in the
* XML schema will not be added to the select list and only loaded
* on demand.
*
* @param criteria object containing the columns to add.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria)
{
$criteria->addSelectColumn(MessageEventTaskRelationPeer::MSGETR_UID);
$criteria->addSelectColumn(MessageEventTaskRelationPeer::PRJ_UID);
$criteria->addSelectColumn(MessageEventTaskRelationPeer::EVN_UID);
$criteria->addSelectColumn(MessageEventTaskRelationPeer::TAS_UID);
}
const COUNT = 'COUNT(MESSAGE_EVENT_TASK_RELATION.MSGETR_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_EVENT_TASK_RELATION.MSGETR_UID)';
/**
* Returns the number of rows matching criteria.
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
* @param Connection $con
* @return int Number of matching rows.
*/
public static function doCount(Criteria $criteria, $distinct = false, $con = null)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn(MessageEventTaskRelationPeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(MessageEventTaskRelationPeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn($column);
}
$rs = MessageEventTaskRelationPeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
} else {
// no rows returned; we infer that means 0 matches.
return 0;
}
}
/**
* Method to select one object from the DB.
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con
* @return MessageEventTaskRelation
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectOne(Criteria $criteria, $con = null)
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = MessageEventTaskRelationPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
return null;
}
/**
* Method to do selects.
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con
* @return array Array of selected Objects
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelect(Criteria $criteria, $con = null)
{
return MessageEventTaskRelationPeer::populateObjects(MessageEventTaskRelationPeer::doSelectRS($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect()
* method to get a ResultSet.
*
* Use this method directly if you want to just get the resultset
* (instead of an array of objects).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect()
*/
public static function doSelectRS(Criteria $criteria, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria;
MessageEventTaskRelationPeer::addSelectColumns($criteria);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
// BasePeer returns a Creole ResultSet, set to return
// rows indexed numerically.
return BasePeer::doSelect($criteria, $con);
}
/**
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function populateObjects(ResultSet $rs)
{
$results = array();
// set the class once to avoid overhead in the loop
$cls = MessageEventTaskRelationPeer::getOMClass();
$cls = Propel::import($cls);
// populate the object(s)
while ($rs->next()) {
$obj = new $cls();
$obj->hydrate($rs);
$results[] = $obj;
}
return $results;
}
/**
* Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need.
* @return TableMap
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
}
/**
* The class that the Peer will make instances of.
*
* This uses a dot-path notation which is tranalted into a path
* relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
*
* @return string path.to.ClassName
*/
public static function getOMClass()
{
return MessageEventTaskRelationPeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a MessageEventTaskRelation or Criteria object.
*
* @param mixed $values Criteria or MessageEventTaskRelation object containing data that is used to create the INSERT statement.
* @param Connection $con the connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doInsert($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
$criteria = $values->buildCriteria(); // build Criteria from MessageEventTaskRelation object
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
try {
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
$con->begin();
$pk = BasePeer::doInsert($criteria, $con);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
return $pk;
}
/**
* Method perform an UPDATE on the database, given a MessageEventTaskRelation or Criteria object.
*
* @param mixed $values Criteria or MessageEventTaskRelation object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doUpdate($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison(MessageEventTaskRelationPeer::MSGETR_UID);
$selectCriteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $criteria->remove(MessageEventTaskRelationPeer::MSGETR_UID), $comparison);
} else {
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
// set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
return BasePeer::doUpdate($selectCriteria, $criteria, $con);
}
/**
* Method to DELETE all rows from the MESSAGE_EVENT_TASK_RELATION table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDeleteAll(MessageEventTaskRelationPeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Method perform a DELETE on the database, given a MessageEventTaskRelation or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or MessageEventTaskRelation object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
* This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(MessageEventTaskRelationPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof MessageEventTaskRelation) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, (array) $values, Criteria::IN);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Validates all modified columns of given MessageEventTaskRelation object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
* @param MessageEventTaskRelation $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
public static function doValidate(MessageEventTaskRelation $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(MessageEventTaskRelationPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(MessageEventTaskRelationPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
}
foreach ($cols as $colName) {
if ($tableMap->containsColumn($colName)) {
$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
$columns[$colName] = $obj->$get();
}
}
} else {
}
return BasePeer::doValidate(MessageEventTaskRelationPeer::DATABASE_NAME, MessageEventTaskRelationPeer::TABLE_NAME, $columns);
}
/**
* Retrieve a single object by pkey.
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return MessageEventTaskRelation
*/
public static function retrieveByPK($pk, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(MessageEventTaskRelationPeer::DATABASE_NAME);
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $pk);
$v = MessageEventTaskRelationPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
/**
* Retrieve multiple objects by pkey.
*
* @param array $pks List of primary keys
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function retrieveByPKs($pks, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
$criteria = new Criteria();
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $pks, Criteria::IN);
$objs = MessageEventTaskRelationPeer::doSelect($criteria, $con);
}
return $objs;
}
}
// static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization
// so we need to load them here.
try {
BaseMessageEventTaskRelationPeer::getMapBuilder();
} catch (Exception $e) {
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
}
} else {
// even if Propel is not yet initialized, the map builder class can be registered
// now and then it will be loaded when Propel initializes.
require_once 'classes/model/map/MessageEventTaskRelationMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.MessageEventTaskRelationMapBuilder');
}

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ProcessMaker 3.0\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2015-02-06 16:16:09\n"
"PO-Revision-Date: 2015-02-24 12:12:47\n"
"Last-Translator: \n"
"Language-Team: Colosa Developers Team <developers@colosa.com>\n"
"MIME-Version: 1.0\n"
@@ -3880,8 +3880,8 @@ msgstr "Saved"
# TRANSLATION
# LABEL/ID_ASSIGN_RULES
#: LABEL/ID_ASSIGN_RULES
msgid "[LABEL/ID_ASSIGN_RULES] Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn't be used with subprocesses"
msgstr "Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn't be used with subprocesses"
msgid "Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn't be used with sub-processes"
msgstr "Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn't be used with sub-processes"
# TRANSLATION
# LABEL/ID_SELECT_OPTION_TABLE
@@ -3898,8 +3898,8 @@ msgstr "Please select a table to export."
# TRANSLATION
# LABEL/ID_TASK_WAS_ASSIGNED_TO_USER
#: LABEL/ID_TASK_WAS_ASSIGNED_TO_USER
msgid "Manual assignment shouldn't be used with subprocesses.<br>The task \"{0}\" from case {1} was assigned to user <b>{2}</b> ( {3} {4} )"
msgstr "Manual assignment shouldn't be used with subprocesses.<br>The task \"{0}\" from case {1} was assigned to user <b>{2}</b> ( {3} {4} )"
msgid "Manual assignment shouldn't be used with sub-processes.<br>The task \"{0}\" from case {1} was assigned to user <b>{2}</b> ( {3} {4} )"
msgstr "Manual assignment shouldn't be used with sub-processes.<br>The task \"{0}\" from case {1} was assigned to user <b>{2}</b> ( {3} {4} )"
# TRANSLATION
# LABEL/ID_USER_ONVACATION
@@ -8320,8 +8320,8 @@ msgstr "Sub-Process"
# TRANSLATION
# LABEL/ID_SUBPROCESS_NAME
#: LABEL/ID_SUBPROCESS_NAME
msgid "SubProcess name"
msgstr "SubProcess name"
msgid "Sub-Process name"
msgstr "Sub-Process name"
# TRANSLATION
# LABEL/ID_VARIABLES_OUT
@@ -13432,8 +13432,8 @@ msgstr "Check Workspace Configuration"
# TRANSLATION
# LABEL/ID_DELETE_DATABASES
#: LABEL/ID_DELETE_DATABASES
msgid "Delete Databases if exists"
msgstr "Delete Databases if exists"
msgid "Delete database if it exists"
msgstr "Delete database if it exists"
# TRANSLATION
# LABEL/ID_RP_DATABASE_NAME
@@ -13456,8 +13456,8 @@ msgstr "Workflow Database Name"
# TRANSLATION
# LABEL/ID_CHANGE_DATABASE_NAME
#: LABEL/ID_CHANGE_DATABASE_NAME
msgid "Change Database names"
msgstr "Change Database names"
msgid "Change database name"
msgstr "Change database name"
# TRANSLATION
# LABEL/ID_ADMIN_USERNAME
@@ -13570,8 +13570,8 @@ msgstr "File Permissions"
# TRANSLATION
# LABEL/ID_DATA_CORRECT
#: LABEL/ID_DATA_CORRECT
msgid "The data is correct."
msgstr "The data is correct."
msgid "The configuration is correct."
msgstr "The configuration is correct."
# TRANSLATION
# LABEL/ID_EXIST
@@ -17851,6 +17851,474 @@ msgstr "The Variable with {0}: {1} does not exist."
msgid "The Variable Name with {0}: \"{1}\" already exists."
msgstr "The Variable Name with {0}: \"{1}\" already exists."
# TRANSLATION
# LABEL/ID_BPMN_PROCESS_DEF_PROBLEM
#: LABEL/ID_BPMN_PROCESS_DEF_PROBLEM
msgid "There is a problem in the BPMN process definition and/or an exception error occurred."
msgstr "There is a problem in the BPMN process definition and/or an exception error occurred."
# TRANSLATION
# LABEL/ID_CREATE_DYNAFORM
#: LABEL/ID_CREATE_DYNAFORM
msgid "Create Dynaform"
msgstr "Create Dynaform"
# TRANSLATION
# LABEL/ID_UPDATE_DYNAFORM
#: LABEL/ID_UPDATE_DYNAFORM
msgid "Update Dynaform add/deleted fields"
msgstr "Update Dynaform add/deleted fields"
# TRANSLATION
# LABEL/ID_DELETE_DYNAFORM
#: LABEL/ID_DELETE_DYNAFORM
msgid "Delete Dynaform"
msgstr "Delete Dynaform"
# TRANSLATION
# LABEL/ID_CONDITIONS_EDITOR_DYNAFORM
#: LABEL/ID_CONDITIONS_EDITOR_DYNAFORM
msgid "Updated conditions editor in dynaform"
msgstr "Updated conditions editor in dynaform"
# TRANSLATION
# LABEL/ID_COSTS
#: LABEL/ID_COSTS
msgid "Costs"
msgstr "Costs"
# TRANSLATION
# LABEL/ID_COST_BY_HOUR
#: LABEL/ID_COST_BY_HOUR
msgid "Cost by hour"
msgstr "Cost by hour"
# TRANSLATION
# LABEL/ID_UNITS
#: LABEL/ID_UNITS
msgid "Units"
msgstr "Units"
# TRANSLATION
# LABEL/ID_START_DATE_NOT_VALID
#: LABEL/ID_START_DATE_NOT_VALID
msgid "The start date provided is not valid, please enter a valid date."
msgstr "The start date provided is not valid, please enter a valid date."
# TRANSLATION
# LABEL/ID_END_DATE_NOT_VALID
#: LABEL/ID_END_DATE_NOT_VALID
msgid "The end date provided is not valid, please enter a valid date."
msgstr "The end date provided is not valid, please enter a valid date."
# TRANSLATION
# LABEL/ID_END_DATE_GREATER
#: LABEL/ID_END_DATE_GREATER
msgid "End date should be greater than Start date"
msgstr "End date should be greater than Start date"
# TRANSLATION
# LABEL/ID_CREATE_CASE_SCHEDULER
#: LABEL/ID_CREATE_CASE_SCHEDULER
msgid "Create new Case Scheduler"
msgstr "Create new Case Scheduler"
# TRANSLATION
# LABEL/ID_UPDATE_CASE_SCHEDULER
#: LABEL/ID_UPDATE_CASE_SCHEDULER
msgid "Update Case Scheduler"
msgstr "Update Case Scheduler"
# TRANSLATION
# LABEL/ID_ADD_HORIZONTAL_LINE
#: LABEL/ID_ADD_HORIZONTAL_LINE
msgid "Add horizontal line"
msgstr "Add horizontal line"
# TRANSLATION
# LABEL/ID_ADD_VERTICAL_LINE
#: LABEL/ID_ADD_VERTICAL_LINE
msgid "Add Vertical Line"
msgstr "Add Vertical Line"
# TRANSLATION
# LABEL/ID_DELETE_CASE_SCHEDULER
#: LABEL/ID_DELETE_CASE_SCHEDULER
msgid "Delete Case Scheduler"
msgstr "Delete Case Scheduler"
# TRANSLATION
# LABEL/ID_REMOVE_USER
#: LABEL/ID_REMOVE_USER
msgid "Remove User"
msgstr "Remove User"
# TRANSLATION
# LABEL/ID_ADD_TASK
#: LABEL/ID_ADD_TASK
msgid "Add Task"
msgstr "Add Task"
# TRANSLATION
# LABEL/ID_ADD_SUB_PROCESS
#: LABEL/ID_ADD_SUB_PROCESS
msgid "[LABEL/ID_ADD_SUB_PROCESS] Add Sub-Process"
msgstr "Add Sub-Process"
# TRANSLATION
# LABEL/ID_SAVE_TASK_POSITION
#: LABEL/ID_SAVE_TASK_POSITION
msgid "Save Task Position"
msgstr "Save Task Position"
# TRANSLATION
# LABEL/ID_CREATE_DATABASE_CONNECTION
#: LABEL/ID_CREATE_DATABASE_CONNECTION
msgid "Create New Database connection"
msgstr "Create New Database connection"
# TRANSLATION
# LABEL/ID_SAVE_GUIDE_POSITION
#: LABEL/ID_SAVE_GUIDE_POSITION
msgid "Save Line Position"
msgstr "Save Line Position"
# TRANSLATION
# LABEL/ID_UPDATE_DATABASE_CONNECTION
#: LABEL/ID_UPDATE_DATABASE_CONNECTION
msgid "Update Database Connection"
msgstr "Update Database Connection"
# TRANSLATION
# LABEL/ID_DELETE_DATABASE_CONNECTION
#: LABEL/ID_DELETE_DATABASE_CONNECTION
msgid "Delete Database Connection"
msgstr "Delete Database Connection"
# TRANSLATION
# LABEL/ID_CREATE_INPUT_DOCUMENT
#: LABEL/ID_CREATE_INPUT_DOCUMENT
msgid "Create New Input Document"
msgstr "Create New Input Document"
# TRANSLATION
# LABEL/ID_DELETE_LINE
#: LABEL/ID_DELETE_LINE
msgid "Delete Line"
msgstr "Delete Line"
# TRANSLATION
# LABEL/ID_UPDATE_INPUT_DOCUMENT
#: LABEL/ID_UPDATE_INPUT_DOCUMENT
msgid "Update Input Document"
msgstr "Update Input Document"
# TRANSLATION
# LABEL/ID_DELETE_INPUT_DOCUMENT
#: LABEL/ID_DELETE_INPUT_DOCUMENT
msgid "Delete Input Document"
msgstr "Delete Input Document"
# TRANSLATION
# LABEL/ID_ADD_TEXT
#: LABEL/ID_ADD_TEXT
msgid "Add Text"
msgstr "Add Text"
# TRANSLATION
# LABEL/ID_CREATE_OUTPUT_DOCUMENT
#: LABEL/ID_CREATE_OUTPUT_DOCUMENT
msgid "Create new Output Document"
msgstr "Create new Output Document"
# TRANSLATION
# LABEL/ID_UPDATE_TEXT
#: LABEL/ID_UPDATE_TEXT
msgid "Edit Text"
msgstr "Edit Text"
# TRANSLATION
# LABEL/ID_SAVE_TEXT_POSITION
#: LABEL/ID_SAVE_TEXT_POSITION
msgid "Save Text Position"
msgstr "Save Text Position"
# TRANSLATION
# LABEL/ID_UPDATE_OUTPUT_DOCUMENT
#: LABEL/ID_UPDATE_OUTPUT_DOCUMENT
msgid "Update Output Document"
msgstr "Update Output Document"
# TRANSLATION
# LABEL/ID_DELETE_TEXT
#: LABEL/ID_DELETE_TEXT
msgid "Delete Text"
msgstr "Delete Text"
# TRANSLATION
# LABEL/ID_DELETE_OUTPUT_DOCUMENT
#: LABEL/ID_DELETE_OUTPUT_DOCUMENT
msgid "Delete Output Document"
msgstr "Delete Output Document"
# TRANSLATION
# LABEL/ID_CREATE_TRIGGER
#: LABEL/ID_CREATE_TRIGGER
msgid "Create New trigger"
msgstr "Create New trigger"
# TRANSLATION
# LABEL/ID_UPDATE_TRIGGER
#: LABEL/ID_UPDATE_TRIGGER
msgid "Update trigger"
msgstr "Update trigger"
# TRANSLATION
# LABEL/ID_DELETE_TRIGGER
#: LABEL/ID_DELETE_TRIGGER
msgid "Delete Trigger"
msgstr "Delete Trigger"
# TRANSLATION
# LABEL/ID_DERIVATION_RULE
#: LABEL/ID_DERIVATION_RULE
msgid "Derivation Rule"
msgstr "Derivation Rule"
# TRANSLATION
# LABEL/ID_OPTIONS_MENU_TASK
#: LABEL/ID_OPTIONS_MENU_TASK
msgid "Options Menu Task"
msgstr "Options Menu Task"
# TRANSLATION
# LABEL/ID_DELETE_TASK
#: LABEL/ID_DELETE_TASK
msgid "Delete Task"
msgstr "Delete Task"
# TRANSLATION
# LABEL/ID_DELETE_ROUTES
#: LABEL/ID_DELETE_ROUTES
msgid "Delete Routes"
msgstr "Delete Routes"
# TRANSLATION
# LABEL/ID_DELETE_SUB_PROCESS
#: LABEL/ID_DELETE_SUB_PROCESS
msgid "[LABEL/ID_DELETE_SUB_PROCESS] Delete Sub-Process"
msgstr "Delete Sub-Process"
# TRANSLATION
# LABEL/ID_IMPORT_ALREADY_EXISTS_BPMN
#: LABEL/ID_IMPORT_ALREADY_EXISTS_BPMN
msgid "A process with the same name already exists!. Do you want to overwrite the existing process or you want to create a new process?."
msgstr "A process with the same name already exists!. Do you want to overwrite the existing process or you want to create a new process?."
# TRANSLATION
# LABEL/ID_IMPORT_ALREADY_EXISTS_BPMN_NOTE
#: LABEL/ID_IMPORT_ALREADY_EXISTS_BPMN_NOTE
msgid "Note that your changes will be lost in your existing process if you overwrite it."
msgstr "Note that your changes will be lost in your existing process if you overwrite it."
# TRANSLATION
# LABEL/ID_CREATE_NEW
#: LABEL/ID_CREATE_NEW
msgid "Create new"
msgstr "Create new"
# TRANSLATION
# LABEL/ID_IMPORT_BPMN
#: LABEL/ID_IMPORT_BPMN
msgid "Import BPMN"
msgstr "Import BPMN"
# TRANSLATION
# LABEL/ID_SAVE_TASK_PROPERTIES
#: LABEL/ID_SAVE_TASK_PROPERTIES
msgid "Save Task Properties"
msgstr "Save Task Properties"
# TRANSLATION
# LABEL/ID_DELETE_PERMISSIONS
#: LABEL/ID_DELETE_PERMISSIONS
msgid "Delete Permissions"
msgstr "Delete Permissions"
# TRANSLATION
# LABEL/ID_ASSIGN_SUPERVISOR_DYNAFORM
#: LABEL/ID_ASSIGN_SUPERVISOR_DYNAFORM
msgid "Assign Supervisor Dynaform"
msgstr "Assign Supervisor Dynaform"
# TRANSLATION
# LABEL/ID_REMOVE_SUPERVISOR_DYNAFORM
#: LABEL/ID_REMOVE_SUPERVISOR_DYNAFORM
msgid "Remove Supervisor Dynaform"
msgstr "Remove Supervisor Dynaform"
# TRANSLATION
# LABEL/ID_ASSIGN_SUPERVISOR_INPUT
#: LABEL/ID_ASSIGN_SUPERVISOR_INPUT
msgid "Assign Supervisor Input"
msgstr "Assign Supervisor Input"
# TRANSLATION
# LABEL/ID_REMOVE_SUPERVISOR_INPUT
#: LABEL/ID_REMOVE_SUPERVISOR_INPUT
msgid "Remove Supervisor Input"
msgstr "Remove Supervisor Input"
# TRANSLATION
# LABEL/ID_ASSIGN_TRIGGER
#: LABEL/ID_ASSIGN_TRIGGER
msgid "Assign Trigger"
msgstr "Assign Trigger"
# TRANSLATION
# LABEL/ID_UP_TRIGGER
#: LABEL/ID_UP_TRIGGER
msgid "Up Trigger"
msgstr "Up Trigger"
# TRANSLATION
# LABEL/ID_DOWN_TRIGGER
#: LABEL/ID_DOWN_TRIGGER
msgid "Down Trigger"
msgstr "Down Trigger"
# TRANSLATION
# LABEL/ID_NEW_CONDITION_FROM_STEP
#: LABEL/ID_NEW_CONDITION_FROM_STEP
msgid "New Condition From Step"
msgstr "New Condition From Step"
# TRANSLATION
# LABEL/ID_STEP_DELETE
#: LABEL/ID_STEP_DELETE
msgid "Step Delete"
msgstr "Step Delete"
# TRANSLATION
# LABEL/ID_STEP_DOWN
#: LABEL/ID_STEP_DOWN
msgid "Step Down"
msgstr "Step Down"
# TRANSLATION
# LABEL/ID_SAVE_NEW_STEP
#: LABEL/ID_SAVE_NEW_STEP
msgid "Save New Step"
msgstr "Save New Step"
# TRANSLATION
# LABEL/ID_ASSIGN_USER_TASK
#: LABEL/ID_ASSIGN_USER_TASK
msgid "Assign User Task"
msgstr "Assign User Task"
# TRANSLATION
# LABEL/ID_ASSIGN_GROUP_TASK
#: LABEL/ID_ASSIGN_GROUP_TASK
msgid "Assign Group Task"
msgstr "Assign Group Task"
# TRANSLATION
# LABEL/ID_DELETE_USER_TASK
#: LABEL/ID_DELETE_USER_TASK
msgid "Delete User Task"
msgstr "Delete User Task"
# TRANSLATION
# LABEL/ID_DELETE_GROUP_TASK
#: LABEL/ID_DELETE_GROUP_TASK
msgid "Delete Group Task"
msgstr "Delete Group Task"
# TRANSLATION
# LABEL/ID_NO_DERIVATION_BPMN_RULE
#: LABEL/ID_NO_DERIVATION_BPMN_RULE
msgid "Process definition error: All conditions in evaluation routing rule evaluated to false, so workflow has stopped. Please change the definition of the evaluation routing rule."
msgstr "Process definition error: All conditions in evaluation routing rule evaluated to false, so workflow has stopped. Please change the definition of the evaluation routing rule."
# TRANSLATION
# LABEL/ID_STEP_UP
#: LABEL/ID_STEP_UP
msgid "Step Up"
msgstr "Step Up"
# TRANSLATION
# LABEL/ID_ROUTE_TO_TASK_INTERMEDIATE_CATCH_MESSAGE_EVENT
#: LABEL/ID_ROUTE_TO_TASK_INTERMEDIATE_CATCH_MESSAGE_EVENT
msgid "The case will be paused until you receive the corresponding message"
msgstr "The case will be paused until you receive the corresponding message"
# TRANSLATION
# LABEL/ID_MESSAGE_EVENT_TASK_RELATION_DOES_NOT_EXIST
#: LABEL/ID_MESSAGE_EVENT_TASK_RELATION_DOES_NOT_EXIST
msgid "The Message-Event-Task-Relation with {0}: {1} does not exist."
msgstr "The Message-Event-Task-Relation with {0}: {1} does not exist."
# TRANSLATION
# LABEL/ID_MESSAGE_EVENT_RELATION_DOES_NOT_EXIST
#: LABEL/ID_MESSAGE_EVENT_RELATION_DOES_NOT_EXIST
msgid "The Message-Event-Relation with {0}: {1} does not exist."
msgstr "The Message-Event-Relation with {0}: {1} does not exist."
# TRANSLATION
# LABEL/ID_MESSAGE_EVENT_RELATION_ALREADY_REGISTERED
#: LABEL/ID_MESSAGE_EVENT_RELATION_ALREADY_REGISTERED
msgid "The Message-Event-Relation already registered."
msgstr "The Message-Event-Relation already registered."
# TRANSLATION
# LABEL/ID_MESSAGE_EVENT_RELATION_DOES_NOT_EXIST_MESSAGE_FLOW
#: LABEL/ID_MESSAGE_EVENT_RELATION_DOES_NOT_EXIST_MESSAGE_FLOW
msgid "Does not exist a \"Message Flow\" between {0}: {1} and {2}: {3}"
msgstr "Does not exist a \"Message Flow\" between {0}: {1} and {2}: {3}"
# TRANSLATION
# LABEL/ID_EVENT_NOT_IS_MESSAGE_EVENT
#: LABEL/ID_EVENT_NOT_IS_MESSAGE_EVENT
msgid "The event with {0}: {1} not is \"Message event\"."
msgstr "The event with {0}: {1} not is \"Message event\"."
# TRANSLATION
# LABEL/ID_MESSAGE_EVENT_DEFINITION_DOES_NOT_EXIST
#: LABEL/ID_MESSAGE_EVENT_DEFINITION_DOES_NOT_EXIST
msgid "The Message-Event-Definition with {0}: {1} does not exist."
msgstr "The Message-Event-Definition with {0}: {1} does not exist."
# TRANSLATION
# LABEL/ID_MESSAGE_EVENT_DEFINITION_ALREADY_REGISTERED
#: LABEL/ID_MESSAGE_EVENT_DEFINITION_ALREADY_REGISTERED
msgid "The Message-Event-Definition with {0}: {1} already registered."
msgstr "The Message-Event-Definition with {0}: {1} already registered."
# TRANSLATION
# LABEL/ID_MESSAGE_EVENT_DEFINITION_VARIABLES_DO_NOT_MEET_DEFINITION
#: LABEL/ID_MESSAGE_EVENT_DEFINITION_VARIABLES_DO_NOT_MEET_DEFINITION
msgid "The variables do not meet with the definition of Message-Type-Variable"
msgstr "The variables do not meet with the definition of Message-Type-Variable"
# TRANSLATION
# LABEL/ID_MESSAGE_EVENT_DEFINITION_DOES_NOT_IS_REGISTERED
#: LABEL/ID_MESSAGE_EVENT_DEFINITION_DOES_NOT_IS_REGISTERED
msgid "The Message-Event-Definition with {0}: {1} does not is registered."
msgstr "The Message-Event-Definition with {0}: {1} does not is registered."
# TRANSLATION
# LABEL/ID_EDIT_PROCESS
#: LABEL/ID_EDIT_PROCESS
msgid "Process Edited"
msgstr "Process Edited"
# TRANSLATION
# LABEL/ID_EVENT_DELETED
#: LABEL/ID_EVENT_DELETED
msgid "Event deleted"
msgstr "Event deleted"
# additionalTables/additionalTablesData.xml?ADD_TAB_NAME
# additionalTables/additionalTablesData.xml
#: text - ADD_TAB_NAME
@@ -29972,7 +30440,7 @@ msgstr "Sub-Process"
# processes/processes_subProcess.xml?SPROCESS_NAME
# processes/processes_subProcess.xml
#: text - SPROCESS_NAME
msgid "[processes/processes_subProcess.xml?SPROCESS_NAME] SubProcess name"
msgid "SubProcess name"
msgstr "SubProcess name"
# processes/processes_subProcess.xml?TASKS

View File

@@ -1611,6 +1611,35 @@ class pmTablesProxy extends HttpProxyController
}
$oDataset->next();
}
// getting bpmn projects
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(BpmnProcessPeer::PRJ_UID);
$oCriteria->add(BpmnProcessPeer::PRJ_UID, $proUid);
$oDataset = BpmnProcessPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$row = $oDataset->getRow();
if (isset($row["PRJ_UID"])) {
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_UID);
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_NAME);
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_FIELD_TYPE);
$oCriteria->add(ProcessVariablesPeer::PRJ_UID, $row["PRJ_UID"]);
$oDataset = ProcessVariablesPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$index = 0;
while ($oDataset->next()) {
$row = $oDataset->getRow();
array_push($fields, array(
"FIELD_UID" => $row["VAR_NAME"] . "-" . $row["VAR_FIELD_TYPE"],
"FIELD_NAME" => $row["VAR_NAME"],
"FIELD_VALIDATE" => "any",
"_index" => $index ++,
"_isset" => true
));
}
}
sort( $fields );

View File

@@ -2694,13 +2694,13 @@ SELECT 'LABEL','ID_WARNING','en','WARNING','2014-01-15'
UNION ALL
SELECT 'LABEL','ID_SAVED','en','Saved','2014-01-15'
UNION ALL
SELECT 'LABEL','ID_ASSIGN_RULES','en','Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn''t be used with subprocesses','2014-01-15'
SELECT 'LABEL','ID_ASSIGN_RULES','en','Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn''t be used with sub-processes','2015-02-24'
UNION ALL
SELECT 'LABEL','ID_SELECT_OPTION_TABLE','en','Select an option to export the schema or data from the selected table(s).','2014-10-21'
UNION ALL
SELECT 'LABEL','ID_SELECT_TABLE','en','Please select a table to export.','2014-01-15'
UNION ALL
SELECT 'LABEL','ID_TASK_WAS_ASSIGNED_TO_USER','en','Manual assignment shouldn''t be used with subprocesses.<br>The task "{0}" from case {1} was assigned to user <b>{2}</b> ( {3} {4} )','2014-01-15'
SELECT 'LABEL','ID_TASK_WAS_ASSIGNED_TO_USER','en','Manual assignment shouldn''t be used with sub-processes.<br>The task "{0}" from case {1} was assigned to user <b>{2}</b> ( {3} {4} )','2015-02-24'
UNION ALL
SELECT 'LABEL','ID_USER_ONVACATION','en','User on vacation! Contact to your System Administrator if you want to login. please','2014-01-15'
UNION ALL
@@ -4192,7 +4192,7 @@ SELECT 'LABEL','ID_TARGET','en','Target','2014-01-15'
UNION ALL
SELECT 'LABEL','ID_SUBPROCESS','en','Sub-Process','2014-01-15'
UNION ALL
SELECT 'LABEL','ID_SUBPROCESS_NAME','en','SubProcess name','2014-01-15'
SELECT 'LABEL','ID_SUBPROCESS_NAME','en','Sub-Process name','2015-02-24'
UNION ALL
SELECT 'LABEL','ID_VARIABLES_OUT','en','Variables Out','2014-01-15'
UNION ALL
@@ -5842,7 +5842,7 @@ SELECT 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP6','en','xxx','2014
UNION ALL
SELECT 'LABEL','ID_SIZE_VERY_LARGE_PERMITTED','en','The file is too large . Please upload a smaller file.','2014-10-08'
UNION ALL
SELECT 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP5','en','ProcessMaker uses workspaces to store data. Please enter a valid workspace name and credentials to login.','2014-09-02'
SELECT 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP5','en','ProcessMaker uses workspaces to store data. Please enter a valid workspace name and credentials to login.','2015-02-23'
UNION ALL
SELECT 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP4_2','en','If you are installing ProcessMaker on a remote web server, you will need to get this information from your Database Server.','2014-01-15'
UNION ALL
@@ -5916,7 +5916,7 @@ SELECT 'LABEL','ID_NON_WRITABLE_FILES','en','Non-writable Files','2014-01-15'
UNION ALL
SELECT 'LABEL','ID_CHECK_WORKSPACE_CONFIGURATION','en','Check Workspace Configuration','2014-01-15'
UNION ALL
SELECT 'LABEL','ID_DELETE_DATABASES','en','Delete Databases if exists','2014-01-15'
SELECT 'LABEL','ID_DELETE_DATABASES','en','Delete database if it exists','2015-02-23'
UNION ALL
SELECT 'LABEL','ID_RP_DATABASE_NAME','en','Report Database Name','2014-01-15'
UNION ALL
@@ -5926,7 +5926,7 @@ SELECT 'LABEL','ID_WF_DATABASE_NAME','en','Workflow Database Name','2014-01-15'
;
INSERT INTO [TRANSLATION] ([TRN_CATEGORY],[TRN_ID],[TRN_LANG],[TRN_VALUE],[TRN_UPDATE_DATE])
SELECT 'LABEL','ID_CHANGE_DATABASE_NAME','en','Change Database names','2014-01-15'
SELECT 'LABEL','ID_CHANGE_DATABASE_NAME','en','Change database name','2015-02-23'
UNION ALL
SELECT 'LABEL','ID_ADMIN_USERNAME','en','Admin Username','2014-01-15'
UNION ALL
@@ -5964,7 +5964,7 @@ SELECT 'LABEL','ID_PREINSTALLATION','en','Pre-installation check','2014-01-15'
UNION ALL
SELECT 'LABEL','ID_DIRECTORY_FILE_PERMISSION','en','File Permissions','2014-10-21'
UNION ALL
SELECT 'LABEL','ID_DATA_CORRECT','en','The data is correct.','2014-01-15'
SELECT 'LABEL','ID_DATA_CORRECT','en','The configuration is correct.','2015-02-23'
UNION ALL
SELECT 'LABEL','ID_EXIST','en','Exist','2014-01-15'
UNION ALL
@@ -7409,6 +7409,164 @@ SELECT 'LABEL','ID_MESSAGE_TYPE_NAME_VARIABLE_EXISTS','en','The name of the vari
SELECT 'LABEL','ID_MESSAGE_TYPE_VARIABLE_DOES_NOT_EXIST','en','The Variable with {0}: {1} does not exist.','2015-02-05'
UNION ALL
SELECT 'LABEL','ID_MESSAGE_TYPE_VARIABLE_NAME_ALREADY_EXISTS','en','The Variable Name with {0}: "{1}" already exists.','2015-02-05'
UNION ALL
SELECT 'LABEL','ID_BPMN_PROCESS_DEF_PROBLEM','en','There is a problem in the BPMN process definition and/or an exception error occurred.','2015-02-13'
UNION ALL
SELECT 'LABEL','ID_CREATE_DYNAFORM','en','Create Dynaform','2015-02-13'
UNION ALL
SELECT 'LABEL','ID_UPDATE_DYNAFORM','en','Update Dynaform add/deleted fields','2015-02-13'
UNION ALL
SELECT 'LABEL','ID_DELETE_DYNAFORM','en','Delete Dynaform','2015-02-13'
UNION ALL
SELECT 'LABEL','ID_CONDITIONS_EDITOR_DYNAFORM','en','Updated conditions editor in dynaform','2015-02-13'
UNION ALL
SELECT 'LABEL','ID_COSTS','en','Costs','2015-02-18'
UNION ALL
SELECT 'LABEL','ID_COST_BY_HOUR','en','Cost by hour','2015-02-18'
UNION ALL
SELECT 'LABEL','ID_UNITS','en','Units','2015-02-18'
UNION ALL
SELECT 'LABEL','ID_START_DATE_NOT_VALID','en','The start date provided is not valid, please enter a valid date.','2015-02-19'
UNION ALL
SELECT 'LABEL','ID_END_DATE_NOT_VALID','en','The end date provided is not valid, please enter a valid date.','2015-02-19'
UNION ALL
SELECT 'LABEL','ID_END_DATE_GREATER','en','End date should be greater than Start date','2015-02-19'
UNION ALL
SELECT 'LABEL','ID_CREATE_CASE_SCHEDULER','en','Create new Case Scheduler','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_UPDATE_CASE_SCHEDULER','en','Update Case Scheduler','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_ADD_HORIZONTAL_LINE','en','Add horizontal line','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_ADD_VERTICAL_LINE','en','Add Vertical Line','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_CASE_SCHEDULER','en','Delete Case Scheduler','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_REMOVE_USER','en','Remove User','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_ADD_TASK','en','Add Task','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_ADD_SUB_PROCESS','en','Add Sub-Process','2015-02-24'
UNION ALL
SELECT 'LABEL','ID_SAVE_TASK_POSITION','en','Save Task Position','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_CREATE_DATABASE_CONNECTION','en','Create New Database connection','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_SAVE_GUIDE_POSITION','en','Save Line Position','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_UPDATE_DATABASE_CONNECTION','en','Update Database Connection','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_DATABASE_CONNECTION','en','Delete Database Connection','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_CREATE_INPUT_DOCUMENT','en','Create New Input Document','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_LINE','en','Delete Line','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_UPDATE_INPUT_DOCUMENT','en','Update Input Document','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_INPUT_DOCUMENT','en','Delete Input Document','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_ADD_TEXT','en','Add Text','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_CREATE_OUTPUT_DOCUMENT','en','Create new Output Document','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_UPDATE_TEXT','en','Edit Text','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_SAVE_TEXT_POSITION','en','Save Text Position','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_UPDATE_OUTPUT_DOCUMENT','en','Update Output Document','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_TEXT','en','Delete Text','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_OUTPUT_DOCUMENT','en','Delete Output Document','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_CREATE_TRIGGER','en','Create New trigger','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_UPDATE_TRIGGER','en','Update trigger','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_TRIGGER','en','Delete Trigger','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DERIVATION_RULE','en','Derivation Rule','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_OPTIONS_MENU_TASK','en','Options Menu Task','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_TASK','en','Delete Task','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_ROUTES','en','Delete Routes','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_SUB_PROCESS','en','Delete Sub-Process','2015-02-24'
UNION ALL
SELECT 'LABEL','ID_IMPORT_ALREADY_EXISTS_BPMN','en','A process with the same name already exists!. Do you want to overwrite the existing process or you want to create a new process?.','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_IMPORT_ALREADY_EXISTS_BPMN_NOTE','en','Note that your changes will be lost in your existing process if you overwrite it.','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_CREATE_NEW','en','Create new','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_IMPORT_BPMN','en','Import BPMN','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_SAVE_TASK_PROPERTIES','en','Save Task Properties','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_PERMISSIONS','en','Delete Permissions','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_ASSIGN_SUPERVISOR_DYNAFORM','en','Assign Supervisor Dynaform','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_REMOVE_SUPERVISOR_DYNAFORM','en','Remove Supervisor Dynaform','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_ASSIGN_SUPERVISOR_INPUT','en','Assign Supervisor Input','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_REMOVE_SUPERVISOR_INPUT','en','Remove Supervisor Input','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_ASSIGN_TRIGGER','en','Assign Trigger','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_UP_TRIGGER','en','Up Trigger','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DOWN_TRIGGER','en','Down Trigger','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_NEW_CONDITION_FROM_STEP','en','New Condition From Step','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_STEP_DELETE','en','Step Delete','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_STEP_DOWN','en','Step Down','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_SAVE_NEW_STEP','en','Save New Step','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_ASSIGN_USER_TASK','en','Assign User Task','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_ASSIGN_GROUP_TASK','en','Assign Group Task','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_USER_TASK','en','Delete User Task','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_DELETE_GROUP_TASK','en','Delete Group Task','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_NO_DERIVATION_BPMN_RULE','en','Process definition error: All conditions in evaluation routing rule evaluated to false, so workflow has stopped. Please change the definition of the evaluation routing rule.','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_STEP_UP','en','Step Up','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_ROUTE_TO_TASK_INTERMEDIATE_CATCH_MESSAGE_EVENT','en','The case will be paused until you receive the corresponding message','2015-02-20'
;
INSERT INTO [TRANSLATION] ([TRN_CATEGORY],[TRN_ID],[TRN_LANG],[TRN_VALUE],[TRN_UPDATE_DATE])
SELECT 'LABEL','ID_MESSAGE_EVENT_TASK_RELATION_DOES_NOT_EXIST','en','The Message-Event-Task-Relation with {0}: {1} does not exist.','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_MESSAGE_EVENT_RELATION_DOES_NOT_EXIST','en','The Message-Event-Relation with {0}: {1} does not exist.','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_MESSAGE_EVENT_RELATION_ALREADY_REGISTERED','en','The Message-Event-Relation already registered.','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_MESSAGE_EVENT_RELATION_DOES_NOT_EXIST_MESSAGE_FLOW','en','Does not exist a "Message Flow" between {0}: {1} and {2}: {3}','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_EVENT_NOT_IS_MESSAGE_EVENT','en','The event with {0}: {1} not is "Message event".','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_MESSAGE_EVENT_DEFINITION_DOES_NOT_EXIST','en','The Message-Event-Definition with {0}: {1} does not exist.','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_MESSAGE_EVENT_DEFINITION_ALREADY_REGISTERED','en','The Message-Event-Definition with {0}: {1} already registered.','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_MESSAGE_EVENT_DEFINITION_VARIABLES_DO_NOT_MEET_DEFINITION','en','The variables do not meet with the definition of Message-Type-Variable','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_MESSAGE_EVENT_DEFINITION_DOES_NOT_IS_REGISTERED','en','The Message-Event-Definition with {0}: {1} does not is registered.','2015-02-20'
UNION ALL
SELECT 'LABEL','ID_EDIT_PROCESS','en','Process Edited','2015-02-21'
UNION ALL
SELECT 'LABEL','ID_EVENT_DELETED','en','Event deleted','2015-02-21'
;
INSERT INTO ISO_LOCATION ([IC_UID],[IL_UID],[IL_NAME],[IL_NORMAL_NAME],[IS_UID])

View File

@@ -2050,10 +2050,10 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_FIELD_INVALID','en','Field Invalid','2014-01-15') ,
( 'LABEL','ID_WARNING','en','WARNING','2014-01-15') ,
( 'LABEL','ID_SAVED','en','Saved','2014-01-15') ,
( 'LABEL','ID_ASSIGN_RULES','en','Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn''t be used with subprocesses','2014-01-15') ,
( 'LABEL','ID_ASSIGN_RULES','en','Error: There is a problem with the next tasks of this process. One of them has manual assignment. Manual assignment shouldn''t be used with sub-processes','2015-02-24') ,
( 'LABEL','ID_SELECT_OPTION_TABLE','en','Select an option to export the schema or data from the selected table(s).','2014-10-21') ,
( 'LABEL','ID_SELECT_TABLE','en','Please select a table to export.','2014-01-15') ,
( 'LABEL','ID_TASK_WAS_ASSIGNED_TO_USER','en','Manual assignment shouldn''t be used with subprocesses.<br>The task "{0}" from case {1} was assigned to user <b>{2}</b> ( {3} {4} )','2014-01-15') ,
( 'LABEL','ID_TASK_WAS_ASSIGNED_TO_USER','en','Manual assignment shouldn''t be used with sub-processes.<br>The task "{0}" from case {1} was assigned to user <b>{2}</b> ( {3} {4} )','2015-02-24') ,
( 'LABEL','ID_USER_ONVACATION','en','User on vacation! Contact to your System Administrator if you want to login. please','2014-01-15') ,
( 'LABEL','PASSWORD_HISTORY','en','Password history','2014-01-15') ,
( 'JAVASCRIPT','ID_EMAIL_REQUIRED','en','Mail To is required, or uncheck the Send a Test Mail option','2014-01-15') ,
@@ -2808,7 +2808,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_ORIGIN','en','Origin','2014-01-15') ,
( 'LABEL','ID_TARGET','en','Target','2014-01-15') ,
( 'LABEL','ID_SUBPROCESS','en','Sub-Process','2014-01-15') ,
( 'LABEL','ID_SUBPROCESS_NAME','en','SubProcess name','2014-01-15') ,
( 'LABEL','ID_SUBPROCESS_NAME','en','Sub-Process name','2015-02-24') ,
( 'LABEL','ID_VARIABLES_OUT','en','Variables Out','2014-01-15') ,
( 'LABEL','ID_VARIABLES_IN','en','Variables In','2014-01-15') ,
( 'LABEL','ID_SUBPROCESS_SAVE','en','Sub-process properties have been saved successfully.','2015-01-16') ,
@@ -3643,7 +3643,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_LOGIN_WITH_FACEBOOK','en','Login with Facebook!!','2014-01-15') ,
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP6','en','xxx','2014-01-15') ,
( 'LABEL','ID_SIZE_VERY_LARGE_PERMITTED','en','The file is too large . Please upload a smaller file.','2014-10-08') ,
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP5','en','ProcessMaker uses workspaces to store data. Please enter a valid workspace name and credentials to login.','2014-09-02') ,
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP5','en','ProcessMaker uses workspaces to store data. Please enter a valid workspace name and credentials to login.','2015-02-23') ,
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP4_2','en','If you are installing ProcessMaker on a remote web server, you will need to get this information from your Database Server.','2014-01-15') ,
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP4_1','en','ProcessMaker stores all of its data in a database. This screen gives the installation program the information needed to create this database.','2014-01-15') ,
( 'LABEL','ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP3_2','en','If you see <font color=\"red\">\"unwritable\"</font>, change the permissions on the file or directory to allow ProcessMaker to write to it.','2015-01-16') ,
@@ -3680,13 +3680,13 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_FINISHING','en','Finishing...','2014-01-15') ,
( 'LABEL','ID_NON_WRITABLE_FILES','en','Non-writable Files','2014-01-15') ,
( 'LABEL','ID_CHECK_WORKSPACE_CONFIGURATION','en','Check Workspace Configuration','2014-01-15') ,
( 'LABEL','ID_DELETE_DATABASES','en','Delete Databases if exists','2014-01-15') ,
( 'LABEL','ID_DELETE_DATABASES','en','Delete database if it exists','2015-02-23') ,
( 'LABEL','ID_RP_DATABASE_NAME','en','Report Database Name','2014-01-15') ,
( 'LABEL','ID_RB_DATABASE_NAME','en','Rbac Database Name','2014-01-15') ,
( 'LABEL','ID_WF_DATABASE_NAME','en','Workflow Database Name','2014-01-15') ;
INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES
( 'LABEL','ID_CHANGE_DATABASE_NAME','en','Change Database names','2014-01-15') ,
( 'LABEL','ID_CHANGE_DATABASE_NAME','en','Change database name','2015-02-23') ,
( 'LABEL','ID_ADMIN_USERNAME','en','Admin Username','2014-01-15') ,
( 'LABEL','ID_ADMIN_PASSWORD','en','Confirm Admin Password','2014-01-15') ,
( 'LABEL','ID_WORKSPACE_NAME','en','Workspace Name','2014-01-15') ,
@@ -3705,7 +3705,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_NOT_PASSED','en','Not Passed.','2014-01-15') ,
( 'LABEL','ID_PREINSTALLATION','en','Pre-installation check','2014-01-15') ,
( 'LABEL','ID_DIRECTORY_FILE_PERMISSION','en','File Permissions','2014-10-21') ,
( 'LABEL','ID_DATA_CORRECT','en','The data is correct.','2014-01-15') ,
( 'LABEL','ID_DATA_CORRECT','en','The configuration is correct.','2015-02-23') ,
( 'LABEL','ID_EXIST','en','Exist','2014-01-15') ,
( 'LABEL','ID_NO_EXIST','en','Does not exist','2015-01-16') ,
( 'LABEL','ID_REPORT_DATABASE_NAME','en','Please enter the Report Database Name.','2014-01-15') ,
@@ -4436,7 +4436,87 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_MESSAGE_TYPE_NAME_ALREADY_EXISTS','en','The Message Type Name with {0}: "{1}" already exists.','2015-02-05') ,
( 'LABEL','ID_MESSAGE_TYPE_NAME_VARIABLE_EXISTS','en','The name of the variable exists.','2015-02-05') ,
( 'LABEL','ID_MESSAGE_TYPE_VARIABLE_DOES_NOT_EXIST','en','The Variable with {0}: {1} does not exist.','2015-02-05') ,
( 'LABEL','ID_MESSAGE_TYPE_VARIABLE_NAME_ALREADY_EXISTS','en','The Variable Name with {0}: "{1}" already exists.','2015-02-05') ;
( 'LABEL','ID_MESSAGE_TYPE_VARIABLE_NAME_ALREADY_EXISTS','en','The Variable Name with {0}: "{1}" already exists.','2015-02-05') ,
( 'LABEL','ID_BPMN_PROCESS_DEF_PROBLEM','en','There is a problem in the BPMN process definition and/or an exception error occurred.','2015-02-13') ,
( 'LABEL','ID_CREATE_DYNAFORM','en','Create Dynaform','2015-02-13') ,
( 'LABEL','ID_UPDATE_DYNAFORM','en','Update Dynaform add/deleted fields','2015-02-13') ,
( 'LABEL','ID_DELETE_DYNAFORM','en','Delete Dynaform','2015-02-13') ,
( 'LABEL','ID_CONDITIONS_EDITOR_DYNAFORM','en','Updated conditions editor in dynaform','2015-02-13') ,
( 'LABEL','ID_COSTS','en','Costs','2015-02-18') ,
( 'LABEL','ID_COST_BY_HOUR','en','Cost by hour','2015-02-18') ,
( 'LABEL','ID_UNITS','en','Units','2015-02-18') ,
( 'LABEL','ID_START_DATE_NOT_VALID','en','The start date provided is not valid, please enter a valid date.','2015-02-19') ,
( 'LABEL','ID_END_DATE_NOT_VALID','en','The end date provided is not valid, please enter a valid date.','2015-02-19') ,
( 'LABEL','ID_END_DATE_GREATER','en','End date should be greater than Start date','2015-02-19') ,
( 'LABEL','ID_CREATE_CASE_SCHEDULER','en','Create new Case Scheduler','2015-02-20') ,
( 'LABEL','ID_UPDATE_CASE_SCHEDULER','en','Update Case Scheduler','2015-02-20') ,
( 'LABEL','ID_ADD_HORIZONTAL_LINE','en','Add horizontal line','2015-02-20') ,
( 'LABEL','ID_ADD_VERTICAL_LINE','en','Add Vertical Line','2015-02-20') ,
( 'LABEL','ID_DELETE_CASE_SCHEDULER','en','Delete Case Scheduler','2015-02-20') ,
( 'LABEL','ID_REMOVE_USER','en','Remove User','2015-02-20') ,
( 'LABEL','ID_ADD_TASK','en','Add Task','2015-02-20') ,
( 'LABEL','ID_ADD_SUB_PROCESS','en','Add Sub-Process','2015-02-24') ,
( 'LABEL','ID_SAVE_TASK_POSITION','en','Save Task Position','2015-02-20') ,
( 'LABEL','ID_CREATE_DATABASE_CONNECTION','en','Create New Database connection','2015-02-20') ,
( 'LABEL','ID_SAVE_GUIDE_POSITION','en','Save Line Position','2015-02-20') ,
( 'LABEL','ID_UPDATE_DATABASE_CONNECTION','en','Update Database Connection','2015-02-20') ,
( 'LABEL','ID_DELETE_DATABASE_CONNECTION','en','Delete Database Connection','2015-02-20') ,
( 'LABEL','ID_CREATE_INPUT_DOCUMENT','en','Create New Input Document','2015-02-20') ,
( 'LABEL','ID_DELETE_LINE','en','Delete Line','2015-02-20') ,
( 'LABEL','ID_UPDATE_INPUT_DOCUMENT','en','Update Input Document','2015-02-20') ,
( 'LABEL','ID_DELETE_INPUT_DOCUMENT','en','Delete Input Document','2015-02-20') ,
( 'LABEL','ID_ADD_TEXT','en','Add Text','2015-02-20') ,
( 'LABEL','ID_CREATE_OUTPUT_DOCUMENT','en','Create new Output Document','2015-02-20') ,
( 'LABEL','ID_UPDATE_TEXT','en','Edit Text','2015-02-20') ,
( 'LABEL','ID_SAVE_TEXT_POSITION','en','Save Text Position','2015-02-20') ,
( 'LABEL','ID_UPDATE_OUTPUT_DOCUMENT','en','Update Output Document','2015-02-20') ,
( 'LABEL','ID_DELETE_TEXT','en','Delete Text','2015-02-20') ,
( 'LABEL','ID_DELETE_OUTPUT_DOCUMENT','en','Delete Output Document','2015-02-20') ,
( 'LABEL','ID_CREATE_TRIGGER','en','Create New trigger','2015-02-20') ,
( 'LABEL','ID_UPDATE_TRIGGER','en','Update trigger','2015-02-20') ,
( 'LABEL','ID_DELETE_TRIGGER','en','Delete Trigger','2015-02-20') ,
( 'LABEL','ID_DERIVATION_RULE','en','Derivation Rule','2015-02-20') ,
( 'LABEL','ID_OPTIONS_MENU_TASK','en','Options Menu Task','2015-02-20') ,
( 'LABEL','ID_DELETE_TASK','en','Delete Task','2015-02-20') ,
( 'LABEL','ID_DELETE_ROUTES','en','Delete Routes','2015-02-20') ,
( 'LABEL','ID_DELETE_SUB_PROCESS','en','Delete Sub-Process','2015-02-24') ,
( 'LABEL','ID_IMPORT_ALREADY_EXISTS_BPMN','en','A process with the same name already exists!. Do you want to overwrite the existing process or you want to create a new process?.','2015-02-20') ,
( 'LABEL','ID_IMPORT_ALREADY_EXISTS_BPMN_NOTE','en','Note that your changes will be lost in your existing process if you overwrite it.','2015-02-20') ,
( 'LABEL','ID_CREATE_NEW','en','Create new','2015-02-20') ,
( 'LABEL','ID_IMPORT_BPMN','en','Import BPMN','2015-02-20') ,
( 'LABEL','ID_SAVE_TASK_PROPERTIES','en','Save Task Properties','2015-02-20') ,
( 'LABEL','ID_DELETE_PERMISSIONS','en','Delete Permissions','2015-02-20') ,
( 'LABEL','ID_ASSIGN_SUPERVISOR_DYNAFORM','en','Assign Supervisor Dynaform','2015-02-20') ,
( 'LABEL','ID_REMOVE_SUPERVISOR_DYNAFORM','en','Remove Supervisor Dynaform','2015-02-20') ,
( 'LABEL','ID_ASSIGN_SUPERVISOR_INPUT','en','Assign Supervisor Input','2015-02-20') ,
( 'LABEL','ID_REMOVE_SUPERVISOR_INPUT','en','Remove Supervisor Input','2015-02-20') ,
( 'LABEL','ID_ASSIGN_TRIGGER','en','Assign Trigger','2015-02-20') ,
( 'LABEL','ID_UP_TRIGGER','en','Up Trigger','2015-02-20') ,
( 'LABEL','ID_DOWN_TRIGGER','en','Down Trigger','2015-02-20') ,
( 'LABEL','ID_NEW_CONDITION_FROM_STEP','en','New Condition From Step','2015-02-20') ,
( 'LABEL','ID_STEP_DELETE','en','Step Delete','2015-02-20') ,
( 'LABEL','ID_STEP_DOWN','en','Step Down','2015-02-20') ,
( 'LABEL','ID_SAVE_NEW_STEP','en','Save New Step','2015-02-20') ,
( 'LABEL','ID_ASSIGN_USER_TASK','en','Assign User Task','2015-02-20') ,
( 'LABEL','ID_ASSIGN_GROUP_TASK','en','Assign Group Task','2015-02-20') ,
( 'LABEL','ID_DELETE_USER_TASK','en','Delete User Task','2015-02-20') ,
( 'LABEL','ID_DELETE_GROUP_TASK','en','Delete Group Task','2015-02-20') ,
( 'LABEL','ID_NO_DERIVATION_BPMN_RULE','en','Process definition error: All conditions in evaluation routing rule evaluated to false, so workflow has stopped. Please change the definition of the evaluation routing rule.','2015-02-20') ,
( 'LABEL','ID_STEP_UP','en','Step Up','2015-02-20') ,
( 'LABEL','ID_ROUTE_TO_TASK_INTERMEDIATE_CATCH_MESSAGE_EVENT','en','The case will be paused until you receive the corresponding message','2015-02-20') ;
INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES
( 'LABEL','ID_MESSAGE_EVENT_TASK_RELATION_DOES_NOT_EXIST','en','The Message-Event-Task-Relation with {0}: {1} does not exist.','2015-02-20') ,
( 'LABEL','ID_MESSAGE_EVENT_RELATION_DOES_NOT_EXIST','en','The Message-Event-Relation with {0}: {1} does not exist.','2015-02-20') ,
( 'LABEL','ID_MESSAGE_EVENT_RELATION_ALREADY_REGISTERED','en','The Message-Event-Relation already registered.','2015-02-20') ,
( 'LABEL','ID_MESSAGE_EVENT_RELATION_DOES_NOT_EXIST_MESSAGE_FLOW','en','Does not exist a "Message Flow" between {0}: {1} and {2}: {3}','2015-02-20') ,
( 'LABEL','ID_EVENT_NOT_IS_MESSAGE_EVENT','en','The event with {0}: {1} not is "Message event".','2015-02-20') ,
( 'LABEL','ID_MESSAGE_EVENT_DEFINITION_DOES_NOT_EXIST','en','The Message-Event-Definition with {0}: {1} does not exist.','2015-02-20') ,
( 'LABEL','ID_MESSAGE_EVENT_DEFINITION_ALREADY_REGISTERED','en','The Message-Event-Definition with {0}: {1} already registered.','2015-02-20') ,
( 'LABEL','ID_MESSAGE_EVENT_DEFINITION_VARIABLES_DO_NOT_MEET_DEFINITION','en','The variables do not meet with the definition of Message-Type-Variable','2015-02-20') ,
( 'LABEL','ID_MESSAGE_EVENT_DEFINITION_DOES_NOT_IS_REGISTERED','en','The Message-Event-Definition with {0}: {1} does not is registered.','2015-02-20') ,
( 'LABEL','ID_EDIT_PROCESS','en','Process Edited','2015-02-21') ,
( 'LABEL','ID_EVENT_DELETED','en','Event deleted','2015-02-21') ;
INSERT INTO ISO_LOCATION (IC_UID,IL_UID,IL_NAME,IL_NORMAL_NAME,IS_UID) VALUES
('AD','','',' ','') ,
@@ -59807,4 +59887,4 @@ INSERT INTO DASHLET_INSTANCE (DAS_INS_UID,DAS_UID,DAS_INS_OWNER_TYPE,DAS_INS_OWN
('00000000000000000000000000000004','00000000000000000000000000000004','EVERYBODY','','a:2:{s:13:"DAS_INS_TITLE";s:15:"PM Plugins News";s:7:"DAS_URL";s:71:"http://license.processmaker.com/syspmLicenseSrv/en/green/services/rssAP";}','2012-04-16 00:00:00','2012-04-16 00:00:00',1);
INSERT INTO CONFIGURATION (CFG_UID,OBJ_UID,CFG_VALUE,PRO_UID,USR_UID,APP_UID) VALUES
('ENVIRONMENT_SETTINGS','','a:1:{s:18:"directoryStructure";i:2;}','','','');
('ENVIRONMENT_SETTINGS','','a:1:{s:18:"directoryStructure";i:2;}','','','');

View File

@@ -486,7 +486,7 @@ CREATE TABLE `ROUTE`
`ROU_PARENT` VARCHAR(32) default '0' NOT NULL,
`PRO_UID` VARCHAR(32) default '' NOT NULL,
`TAS_UID` VARCHAR(32) default '' NOT NULL,
`ROU_NEXT_TASK` VARCHAR(32) default '0' NOT NULL,
`ROU_NEXT_TASK` VARCHAR(32) default '0' NOT NULL,
`ROU_CASE` INTEGER default 0 NOT NULL,
`ROU_TYPE` VARCHAR(25) default 'SEQUENTIAL' NOT NULL,
`ROU_DEFAULT` INTEGER default 0 NOT NULL,
@@ -568,7 +568,7 @@ CREATE TABLE `TASK`
(
`PRO_UID` VARCHAR(32) default '' NOT NULL,
`TAS_UID` VARCHAR(32) default '' NOT NULL,
`TAS_TYPE` VARCHAR(20) default 'NORMAL' NOT NULL,
`TAS_TYPE` VARCHAR(50) default 'NORMAL' NOT NULL,
`TAS_DURATION` DOUBLE default 0 NOT NULL,
`TAS_DELAY_TYPE` VARCHAR(30) default '' NOT NULL,
`TAS_TEMPORIZER` DOUBLE default 0 NOT NULL,
@@ -1207,7 +1207,7 @@ CREATE TABLE `APP_HISTORY`
`PRO_UID` VARCHAR(32) default '' NOT NULL,
`TAS_UID` VARCHAR(32) default '' NOT NULL,
`DYN_UID` VARCHAR(32) default '' NOT NULL,
`OBJ_TYPE` VARCHAR(20) default 'DYNAFORM' NOT NULL,
`OBJ_TYPE` VARCHAR(20) default 'DYNAFORM' NOT NULL,
`USR_UID` VARCHAR(32) default '' NOT NULL,
`APP_STATUS` VARCHAR(100) default '' NOT NULL,
`HISTORY_DATE` DATETIME,
@@ -1907,7 +1907,7 @@ CREATE TABLE `BPMN_FLOW`
`FLO_X2` INTEGER default 0 NOT NULL,
`FLO_Y2` INTEGER default 0 NOT NULL,
`FLO_STATE` MEDIUMTEXT,
`FLO_POSITION` INTEGER default 0 NOT NULL,
`FLO_POSITION` INTEGER default 0 NOT NULL,
PRIMARY KEY (`FLO_UID`),
KEY `BPMN_FLOW_I_1`(`FLO_UID`),
KEY `BPMN_FLOW_I_2`(`PRJ_UID`),
@@ -2199,6 +2199,7 @@ CREATE TABLE `LIST_INBOX`
`TAS_UID` VARCHAR(32) default '' NOT NULL,
`PRO_UID` VARCHAR(32) default '' NOT NULL,
`APP_NUMBER` INTEGER default 0 NOT NULL,
`APP_STATUS` VARCHAR(32) default '' NOT NULL,
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
@@ -2212,7 +2213,7 @@ CREATE TABLE `LIST_INBOX`
`DEL_DUE_DATE` DATETIME,
`DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL,
PRIMARY KEY (`APP_UID`,`DEL_INDEX`),
KEY `indexInboxUser`(`USR_UID`, `DEL_DELEGATE_DATE`)
KEY `indexInboxUser`(`USR_UID`, `DEL_DELEGATE_DATE`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Inbox list';
#-----------------------------------------------------------------------------
#-- LIST_PARTICIPATED_HISTORY
@@ -2256,6 +2257,7 @@ DROP TABLE IF EXISTS `LIST_PARTICIPATED_LAST`;
CREATE TABLE `LIST_PARTICIPATED_LAST`
(
`APP_UID` VARCHAR(32) default '' NOT NULL,
`DEL_INDEX` INTEGER default 0 NOT NULL,
`USR_UID` VARCHAR(32) default '' NOT NULL,
`TAS_UID` VARCHAR(32) default '' NOT NULL,
`PRO_UID` VARCHAR(32) default '' NOT NULL,
@@ -2263,16 +2265,20 @@ CREATE TABLE `LIST_PARTICIPATED_LAST`
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
`DEL_INDEX` INTEGER default 0 NOT NULL,
`APP_STATUS` VARCHAR(20) default '0',
`DEL_PREVIOUS_USR_UID` VARCHAR(32) default '',
`DEL_PREVIOUS_USR_USERNAME` VARCHAR(100) default '',
`DEL_PREVIOUS_USR_FIRSTNAME` VARCHAR(50) default '',
`DEL_PREVIOUS_USR_LASTNAME` VARCHAR(50) default '',
`DEL_CURRENT_USR_USERNAME` VARCHAR(100) default '',
`DEL_CURRENT_USR_FIRSTNAME` VARCHAR(50) default '',
`DEL_CURRENT_USR_LASTNAME` VARCHAR(50) default '',
`DEL_DELEGATE_DATE` DATETIME NOT NULL,
`DEL_INIT_DATE` DATETIME,
`DEL_DUE_DATE` DATETIME,
`DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL,
PRIMARY KEY (`APP_UID`,`USR_UID`)
`DEL_THREAD_STATUS` VARCHAR(32) default 'OPEN' NOT NULL,
PRIMARY KEY (`APP_UID`,`DEL_INDEX`,`USR_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Participated last list';
#-----------------------------------------------------------------------------
#-- LIST_COMPLETED
@@ -2301,6 +2307,70 @@ CREATE TABLE `LIST_COMPLETED`
PRIMARY KEY (`APP_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Completed list';
#-----------------------------------------------------------------------------
#-- LIST_PAUSED
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `LIST_PAUSED`;
CREATE TABLE `LIST_PAUSED`
(
`APP_UID` VARCHAR(32) default '' NOT NULL,
`DEL_INDEX` INTEGER default 0 NOT NULL,
`USR_UID` VARCHAR(32) default '' NOT NULL,
`TAS_UID` VARCHAR(32) default '' NOT NULL,
`PRO_UID` VARCHAR(32) default '' NOT NULL,
`APP_NUMBER` INTEGER default 0 NOT NULL,
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
`APP_PAUSED_DATE` DATETIME NOT NULL,
`APP_RESTART_DATE` DATETIME NOT NULL,
`DEL_PREVIOUS_USR_UID` VARCHAR(32) default '',
`DEL_PREVIOUS_USR_USERNAME` VARCHAR(100) default '',
`DEL_PREVIOUS_USR_FIRSTNAME` VARCHAR(50) default '',
`DEL_PREVIOUS_USR_LASTNAME` VARCHAR(50) default '',
`DEL_CURRENT_USR_USERNAME` VARCHAR(100) default '',
`DEL_CURRENT_USR_FIRSTNAME` VARCHAR(50) default '',
`DEL_CURRENT_USR_LASTNAME` VARCHAR(50) default '',
`DEL_DELEGATE_DATE` DATETIME NOT NULL,
`DEL_INIT_DATE` DATETIME,
`DEL_DUE_DATE` DATETIME,
`DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL,
PRIMARY KEY (`APP_UID`,`DEL_INDEX`),
KEY `indexPausedUser`(`USR_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Paused list';
#-----------------------------------------------------------------------------
#-- LIST_CANCELED
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `LIST_CANCELED`;
CREATE TABLE `LIST_CANCELED`
(
`APP_UID` VARCHAR(32) default '' NOT NULL,
`USR_UID` VARCHAR(32) default '' NOT NULL,
`TAS_UID` VARCHAR(32) default '' NOT NULL,
`PRO_UID` VARCHAR(32) default '' NOT NULL,
`APP_NUMBER` INTEGER default 0 NOT NULL,
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
`APP_CANCELED_DATE` DATETIME NOT NULL,
`DEL_INDEX` INTEGER default 0 NOT NULL,
`DEL_PREVIOUS_USR_UID` VARCHAR(32) default '',
`DEL_CURRENT_USR_USERNAME` VARCHAR(100) default '',
`DEL_CURRENT_USR_FIRSTNAME` VARCHAR(50) default '',
`DEL_CURRENT_USR_LASTNAME` VARCHAR(50) default '',
`DEL_DELEGATE_DATE` DATETIME NOT NULL,
`DEL_INIT_DATE` DATETIME,
`DEL_DUE_DATE` DATETIME,
`DEL_PRIORITY` VARCHAR(32) default '3' NOT NULL,
PRIMARY KEY (`APP_UID`),
KEY `indexCanceledUser`(`USR_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Canceled list';
#-----------------------------------------------------------------------------
#-- LIST_MY_INBOX
#-----------------------------------------------------------------------------
@@ -2382,73 +2452,147 @@ CREATE TABLE `LIST_UNASSIGNED_GROUP`
#-- MESSAGE_TYPE
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS MESSAGE_TYPE;
DROP TABLE IF EXISTS `MESSAGE_TYPE`;
CREATE TABLE MESSAGE_TYPE
CREATE TABLE `MESSAGE_TYPE`
(
MSGT_UID VARCHAR(32) default '' NOT NULL,
PRJ_UID VARCHAR(32) default '' NOT NULL,
MSGT_NAME VARCHAR(256) default '' NOT NULL,
PRIMARY KEY (MSGT_UID)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
`MSGT_UID` VARCHAR(32) NOT NULL,
`PRJ_UID` VARCHAR(32) NOT NULL,
`MSGT_NAME` VARCHAR(512) default '',
PRIMARY KEY (`MSGT_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
#-- MESSAGE_TYPE_VARIABLE
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS MESSAGE_TYPE_VARIABLE;
DROP TABLE IF EXISTS `MESSAGE_TYPE_VARIABLE`;
CREATE TABLE MESSAGE_TYPE_VARIABLE
CREATE TABLE `MESSAGE_TYPE_VARIABLE`
(
MSGTV_UID VARCHAR(32) default '' NOT NULL,
MSGT_UID VARCHAR(32) default '' NOT NULL,
MSGTV_NAME VARCHAR(256) default '' NOT NULL,
MSGTV_DEFAULT_VALUE VARCHAR(256) default '' NOT NULL,
PRIMARY KEY (MSGTV_UID)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
`MSGTV_UID` VARCHAR(32) NOT NULL,
`MSGT_UID` VARCHAR(32) NOT NULL,
`MSGTV_NAME` VARCHAR(512) default '',
`MSGTV_DEFAULT_VALUE` VARCHAR(512) default '',
PRIMARY KEY (`MSGTV_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
#-- TABLE: EMAIL_SERVER
#-- EMAIL_SERVER
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `EMAIL_SERVER`;
CREATE TABLE `EMAIL_SERVER`
(
`MESS_UID` VARCHAR(32) default '' NOT NULL,
`MESS_ENGINE` VARCHAR(256) default '' NOT NULL,
`MESS_SERVER` VARCHAR(256) default '' NOT NULL,
`MESS_PORT` INTEGER default 0 NOT NULL,
`MESS_RAUTH` INTEGER default 0 NOT NULL,
`MESS_ACCOUNT` VARCHAR(256) default '' NOT NULL,
`MESS_PASSWORD` VARCHAR(256) default '' NOT NULL,
`MESS_FROM_MAIL` VARCHAR(256) default '' NOT NULL,
`MESS_FROM_NAME` VARCHAR(256) default '' NOT NULL,
`SMTPSECURE` VARCHAR(3) default 'No' NOT NULL,
`MESS_TRY_SEND_INMEDIATLY` INTEGER default 0 NOT NULL,
`MAIL_TO` VARCHAR(256) default '' NOT NULL,
`MESS_DEFAULT` INTEGER default 0 NOT NULL,
PRIMARY KEY (`MESS_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
`MESS_UID` VARCHAR(32) default '' NOT NULL,
`MESS_ENGINE` VARCHAR(256) default '' NOT NULL,
`MESS_SERVER` VARCHAR(256) default '' NOT NULL,
`MESS_PORT` INTEGER default 0 NOT NULL,
`MESS_RAUTH` INTEGER default 0 NOT NULL,
`MESS_ACCOUNT` VARCHAR(256) default '' NOT NULL,
`MESS_PASSWORD` VARCHAR(256) default '' NOT NULL,
`MESS_FROM_MAIL` VARCHAR(256) default '',
`MESS_FROM_NAME` VARCHAR(256) default '',
`SMTPSECURE` VARCHAR(3) default 'No' NOT NULL,
`MESS_TRY_SEND_INMEDIATLY` INTEGER default 0 NOT NULL,
`MAIL_TO` VARCHAR(256) default '' NOT NULL,
`MESS_DEFAULT` INTEGER default 0 NOT NULL,
PRIMARY KEY (`MESS_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
#-- WEB_ENTRY_EVENT
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS WEB_ENTRY_EVENT;
DROP TABLE IF EXISTS `WEB_ENTRY_EVENT`;
CREATE TABLE WEB_ENTRY_EVENT
CREATE TABLE `WEB_ENTRY_EVENT`
(
WEE_UID VARCHAR(32) NOT NULL,
PRJ_UID VARCHAR(32) NOT NULL,
EVN_UID VARCHAR(32) NOT NULL,
ACT_UID VARCHAR(32) NOT NULL,
DYN_UID VARCHAR(32) NOT NULL,
USR_UID VARCHAR(32) NOT NULL,
WEE_STATUS VARCHAR(10) NOT NULL DEFAULT 'ENABLED',
WEE_WE_UID VARCHAR(32) NOT NULL DEFAULT '',
WEE_WE_TAS_UID VARCHAR(32) NOT NULL DEFAULT '',
`WEE_UID` VARCHAR(32) NOT NULL,
`PRJ_UID` VARCHAR(32) NOT NULL,
`EVN_UID` VARCHAR(32) NOT NULL,
`ACT_UID` VARCHAR(32) NOT NULL,
`DYN_UID` VARCHAR(32) NOT NULL,
`USR_UID` VARCHAR(32) NOT NULL,
`WEE_STATUS` VARCHAR(10) default 'ENABLED' NOT NULL,
`WEE_WE_UID` VARCHAR(32) default '' NOT NULL,
`WEE_WE_TAS_UID` VARCHAR(32) default '' NOT NULL,
PRIMARY KEY (`WEE_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;
PRIMARY KEY (WEE_UID)
#-----------------------------------------------------------------------------
#-- MESSAGE_EVENT_DEFINITION
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS MESSAGE_EVENT_DEFINITION;
CREATE TABLE MESSAGE_EVENT_DEFINITION
(
MSGED_UID VARCHAR(32) NOT NULL,
PRJ_UID VARCHAR(32) NOT NULL,
EVN_UID VARCHAR(32) NOT NULL,
MSGT_UID VARCHAR(32) NOT NULL DEFAULT '',
MSGED_USR_UID VARCHAR(32) NOT NULL DEFAULT '',
MSGED_VARIABLES MEDIUMTEXT NOT NULL DEFAULT '',
MSGED_CORRELATION VARCHAR(512) NOT NULL DEFAULT '',
PRIMARY KEY (MSGED_UID)
) ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
#-- MESSAGE_EVENT_RELATION
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS MESSAGE_EVENT_RELATION;
CREATE TABLE MESSAGE_EVENT_RELATION
(
MSGER_UID VARCHAR(32) NOT NULL,
PRJ_UID VARCHAR(32) NOT NULL,
EVN_UID_THROW VARCHAR(32) NOT NULL,
EVN_UID_CATCH VARCHAR(32) NOT NULL,
PRIMARY KEY (MSGER_UID)
) ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
#-- MESSAGE_EVENT_TASK_RELATION
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS MESSAGE_EVENT_TASK_RELATION;
CREATE TABLE MESSAGE_EVENT_TASK_RELATION
(
MSGETR_UID VARCHAR(32) NOT NULL,
PRJ_UID VARCHAR(32) NOT NULL,
EVN_UID VARCHAR(32) NOT NULL,
TAS_UID VARCHAR(32) NOT NULL,
PRIMARY KEY (MSGETR_UID)
) ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
#-- MESSAGE_APPLICATION
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS MESSAGE_APPLICATION;
CREATE TABLE MESSAGE_APPLICATION
(
MSGAPP_UID VARCHAR(32) NOT NULL,
APP_UID VARCHAR(32) NOT NULL,
PRJ_UID VARCHAR(32) NOT NULL,
EVN_UID_THROW VARCHAR(32) NOT NULL,
EVN_UID_CATCH VARCHAR(32) NOT NULL,
MSGAPP_VARIABLES MEDIUMTEXT NOT NULL DEFAULT '',
MSGAPP_CORRELATION VARCHAR(512) NOT NULL DEFAULT '',
MSGAPP_THROW_DATE DATETIME NOT NULL,
MSGAPP_CATCH_DATE DATETIME,
MSGAPP_STATUS VARCHAR(25) NOT NULL DEFAULT 'UNREAD',
PRIMARY KEY (MSGAPP_UID)
) ENGINE=InnoDB DEFAULT CHARSET='utf8';

View File

@@ -1,43 +1,25 @@
function ajax_post(action, form, method, callback, asynchronous) {
document.getElementById("dyn_forward").onclick();
window.onload = function () {
method();
};
}
function dynaFormChanged(frm) {
for (var i1 = 0; i1 <= frm.elements.length - 1; i1++) {
if ((frm.elements[i1].type === "radio" || frm.elements[i1].type === "checkbox") && (frm.elements[i1].checked !== frm.elements[i1].defaultChecked)) {
return true;
}
if ((frm.elements[i1].type === "textarea" || frm.elements[i1].type === "text" || frm.elements[i1].type === "file") && (frm.elements[i1].value !== frm.elements[i1].defaultValue)) {
return true;
}
if (frm.elements[i1].tagName.toLowerCase() === "select") {
var selectDefaultValue = frm.elements[i1].value;
for (var i2 = 0; i2 <= frm.elements[i1].options.length - 1; i2++) {
if (frm.elements[i1].options[i2].defaultSelected) {
selectDefaultValue = frm.elements[i1].options[i2].value;
break;
}
}
if (frm.elements[i1].value !== selectDefaultValue) {
return true;
}
}
}
return false;
return true;
}
$(window).load(function () {
if ((navigator.userAgent.indexOf("MSIE") !== -1) || (navigator.userAgent.indexOf("Trident") !== -1)) {
document.body.innerHTML = "<div style='margin:15px'>Responsive Dynaforms are not supported in this browser.</div>";
return;
}
if (pm_run_outside_main_app === 'true') {
if (parent.showCaseNavigatorPanel) {
parent.showCaseNavigatorPanel('DRAFT');
}
if (parent.setCurrent) {
parent.setCurrent(dyn_uid);
}
}
var data = jsondata;
data.items[0].mode = step_mode.toLowerCase();
if (step_mode)
data.items[0].mode = step_mode.toLowerCase();
window.project = new PMDynaform.core.Project({
data: data,
keys: {
@@ -48,15 +30,6 @@ $(window).load(function () {
token: credentials,
submitRest: false
});
new PMDynaform.core.Proxy({
url: "http://" + window.project.keys.server + "/" + window.project.keys.apiName + "/" + window.project.keys.apiVersion + "/" + window.project.keys.workspace + "/cases/" + app_uid + "/variables",
method: 'GET',
data: {},
keys: window.project.token,
successCallback: function (xhr, response) {
window.project.setData2(response);
}
});
var type = document.createElement("input");
type.type = "hidden";
@@ -82,19 +55,27 @@ $(window).load(function () {
appuid.type = "hidden";
appuid.name = "APP_UID";
appuid.value = app_uid;
var arrayRequired = document.createElement("input");
arrayRequired.type = "hidden";
arrayRequired.name = "DynaformRequiredFields";
arrayRequired.value = fieldsRequired;
var form = document.getElementsByTagName("form")[0];
form.action = "cases_SaveData?UID=" + dyn_uid + "&APP_UID=" + app_uid;
form.action = filePost ? filePost : "cases_SaveData?UID=" + dyn_uid + "&APP_UID=" + app_uid;
form.method = "post";
form.enctype = "multipart/form-data";
form.appendChild(type);
form.appendChild(uid);
form.appendChild(position);
form.appendChild(action);
form.appendChild(dynaformname);
form.appendChild(appuid);
form.appendChild(arrayRequired);
var dyn_forward = document.getElementById("dyn_forward");
dyn_forward.onclick = function () {
form.submit();
return false;
};
if (triggerDebug === true) {
showdebug();
}
});

View File

@@ -1409,6 +1409,10 @@ function copyMoveExecuteTree($uidFolder, $newUidFolder)
//Copy file
$arrayPathFromFile = G::getPathFromFileUID($docInfo["APP_UID"], $docUid);
$newFile = $arrayPathFromFile[0] . PATH_SEP . $arrayPathFromFile[1] . "_" . $docInfo["DOC_VERSION"] . "." . $extension;
if(!file_exists($path . $arrayPathFromFile[0])) {
mkdir( $path . $arrayPathFromFile[0], 0777, true );
}
copy($path . $originFile, $path . $newFile);
} else {

View File

@@ -3,12 +3,79 @@ unset($_SESSION['APPLICATION']);
//get the action from GET or POST, default is todo
$action = isset( $_GET['action'] ) ? $_GET['action'] : (isset( $_POST['action'] ) ? $_POST['action'] : 'todo');
//fix a previous inconsistency
$urlProxy = 'proxyCasesList';
if ($action == 'selfservice') {
$action = 'unassigned';
//if ( $action == 'sent' ) $action = 'participated';
}
/*----------------------------------********---------------------------------*/
$urlProxy = '/api/1.0/' . SYS_SYS . '/lists/';
switch ($action) {
case 'todo':
case 'draft':
$urlProxy .= 'inbox';
break;
case 'sent':
$urlProxy .= 'participated';
break;
case 'search':
case 'participated-history':
$urlProxy = 'proxyCasesList';
break;
case 'paused':
$urlProxy .= 'paused';
break;
case 'cancel':
case 'canceled':
$urlProxy .= 'canceled';
break;
case 'completed':
$urlProxy .= 'completed';
break;
case 'myinbox':
case 'my-inbox':
$urlProxy .= 'my-inbox';
break;
case 'unassigned':
$urlProxy = 'proxyCasesList';
$action = 'unassigned';
break;
}
$clientId = 'x-pm-local-client';
$client = getClientCredentials($clientId);
$authCode = getAuthorizationCode($client);
$debug = false; //System::isDebugMode();
$loader = Maveriks\Util\ClassLoader::getInstance();
$loader->add(PATH_TRUNK . 'vendor/bshaffer/oauth2-server-php/src/', "OAuth2");
$request = array(
'grant_type' => 'authorization_code',
'code' => $authCode
);
$server = array(
'REQUEST_METHOD' => 'POST'
);
$headers = array(
"PHP_AUTH_USER" => $client['CLIENT_ID'],
"PHP_AUTH_PW" => $client['CLIENT_SECRET'],
"Content-Type" => "multipart/form-data;",
"Authorization" => "Basic " . base64_encode($client['CLIENT_ID'] . ":" . $client['CLIENT_SECRET'])
);
$request = new \OAuth2\Request(array(), $request, array(), array(), array(), $server, null, $headers);
$oauthServer = new \ProcessMaker\Services\OAuth2\Server();
$response = $oauthServer->postToken($request, true);
$clientToken = $response->getParameters();
$clientToken["client_id"] = $client['CLIENT_ID'];
$clientToken["client_secret"] = $client['CLIENT_SECRET'];
/*----------------------------------********---------------------------------*/
G::LoadClass("BasePeer");
G::LoadClass("configuration");
//require_once ("classes/model/Fields.php");
@@ -120,6 +187,10 @@ $oHeadPublisher->assign( 'columns', $columns ); //sending the columns to display
$oHeadPublisher->assign( 'readerFields', $readerFields ); //sending the fields to get from proxy
$oHeadPublisher->assign( 'reassignColumns', $reassignColumns ); //sending the columns to display in grid
$oHeadPublisher->assign( 'action', $action ); //sending the action to make
$oHeadPublisher->assign( 'urlProxy', $urlProxy ); //sending the urlProxy to make
/*----------------------------------********---------------------------------*/
$oHeadPublisher->assign( 'credentials', $clientToken ); //sending the SYS_SYS to make
/*----------------------------------********---------------------------------*/
$oHeadPublisher->assign( 'PMDateFormat', $dateFormat ); //sending the fields to get from proxy
$oHeadPublisher->assign( 'statusValues', $status ); //Sending the listing of status
$oHeadPublisher->assign( 'processValues', $processes ); //Sending the listing of processes
@@ -429,3 +500,41 @@ function getAdditionalFields($action, $confCasesList = array())
return $arrayConfig;
}
/*----------------------------------********---------------------------------*/
function getClientCredentials($clientId)
{
$oauthQuery = new ProcessMaker\Services\OAuth2\PmPdo(getDsn());
return $oauthQuery->getClientDetails($clientId);
}
function getDsn()
{
list($host, $port) = strpos(DB_HOST, ':') !== false ? explode(':', DB_HOST) : array(DB_HOST, '');
$port = empty($port) ? '' : ";port=$port";
$dsn = DB_ADAPTER.':host='.$host.';dbname='.DB_NAME.$port;
return array('dsn' => $dsn, 'username' => DB_USER, 'password' => DB_PASS);
}
function getAuthorizationCode($client)
{
\ProcessMaker\Services\OAuth2\Server::setDatabaseSource(getDsn());
\ProcessMaker\Services\OAuth2\Server::setPmClientId($client['CLIENT_ID']);
$oauthServer = new \ProcessMaker\Services\OAuth2\Server();
$userId = $_SESSION['USER_LOGGED'];
$authorize = true;
$_GET = array_merge($_GET, array(
'response_type' => 'code',
'client_id' => $client['CLIENT_ID'],
'scope' => implode(' ', $oauthServer->getScope())
));
$response = $oauthServer->postAuthorize($authorize, $userId, true);
$code = substr($response->getHttpHeader('Location'), strpos($response->getHttpHeader('Location'), 'code=')+5, 40);
return $code;
}
/*----------------------------------********---------------------------------*/

View File

@@ -0,0 +1,111 @@
<?php
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
if ($actionAjax == "streaming") {
$app_uid = isset( $_REQUEST['a'] ) ? $_REQUEST['a'] : null;
$inp_doc_uid = isset( $_REQUEST['d'] ) ? $_REQUEST['d'] : null;
$oAppDocument = new \AppDocument();
if (! isset( $fileData['version'] )) {
$docVersion = $oAppDocument->getLastAppDocVersion( $inp_doc_uid );
} else {
$docVersion = $fileData['version'];
}
$oAppDocument->Fields = $oAppDocument->load( $inp_doc_uid, $docVersion );
$sAppDocUid = $oAppDocument->getAppDocUid();
$iDocVersion = $oAppDocument->getDocVersion();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
$ext = (isset($info['extension'])?$info['extension']:'');
$file = \G::getPathFromFileUID($oAppDocument->Fields['APP_UID'], $sAppDocUid);
$realPath = PATH_DOCUMENT . $app_uid . '/' . $file[0] . $file[1] . '_' . $iDocVersion . '.' . $ext;
$realPath1 = PATH_DOCUMENT . $app_uid . '/' . $file[0] . $file[1] . '.' . $ext;
if (file_exists( $realPath )) {
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$mimeType = finfo_file($finfo, $realPath);
finfo_close($finfo);
if ($ext == "mp3") {
$mimeType = "audio/mpeg";
}
rangeDownload($realPath,$mimeType);
} elseif (file_exists( $realPath1 )) {
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$mimeType = finfo_file($finfo, $realPath1);
finfo_close($finfo);
if ($ext == "mp3") {
$mimeType = "audio/mpeg";
}
rangeDownload($realPath1,$mimeType);
} else {
header ("HTTP/1.0 404 Not Found");
return;
}
exit(0);
}
exit;
function rangeDownload($location,$mimeType)
{
if (!file_exists($location))
{
header ("HTTP/1.0 404 Not Found");
return;
}
$size = filesize($location);
$time = date('r', filemtime($location));
$fm = @fopen($location, 'rb');
if (!$fm)
{
header ("HTTP/1.0 505 Internal server error");
return;
}
$begin = 0;
$end = $size - 1;
if (isset($_SERVER['HTTP_RANGE']))
{
if (preg_match('/bytes=\h*(\d+)-(\d*)[\D.*]?/i', $_SERVER['HTTP_RANGE'], $matches))
{
$begin = intval($matches[1]);
if (!empty($matches[2]))
{
$end = intval($matches[2]);
}
}
}
header('HTTP/1.0 206 Partial Content');
header("Content-Type: $mimeType");
header('Cache-Control: public, must-revalidate, max-age=0');
header('Pragma: no-cache');
header('Accept-Ranges: bytes');
header('Content-Length:' . (($end - $begin) + 1));
if (isset($_SERVER['HTTP_RANGE']))
{
header("Content-Range: bytes $begin-$end/$size");
}
header("Content-Disposition: inline; filename=$location");
header("Content-Transfer-Encoding: binary");
header("Last-Modified: $time");
$cur = $begin;
fseek($fm, $begin, 0);
while(!feof($fm) && $cur <= $end && (connection_status() == 0))
{
set_time_limit(0);
print fread($fm, min(1024 * 16, ($end - $cur) + 1));
$cur += 1024 * 16;
flush();
}
}

View File

@@ -77,7 +77,11 @@ try {
$aFields = $oCase->loadCase( $sAppUid, $iDelIndex );
// g::pr($aFields);
// die;
if (!isset($_SESSION['CURRENT_TASK'])) {
$_SESSION['CURRENT_TASK'] = $aFields['TAS_UID'];
} else if ($_SESSION['CURRENT_TASK'] == '') {
$_SESSION['CURRENT_TASK'] = $aFields['TAS_UID'];
}
switch ($aFields['APP_STATUS']) {
case 'DRAFT':
case 'TO_DO':

View File

@@ -115,25 +115,41 @@ $objProc = new Process();
$aProc = $objProc->load( $Fields['PRO_UID'] );
$Fields['PRO_TITLE'] = $aProc['PRO_TITLE'];
$objTask = new Task();
//$aTask = $objTask->load( $Fields['TAS_UID'] );
//$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
if (isset($_SESSION['ACTION']) && ($_SESSION['ACTION'] == 'jump')) {
$task = explode('-', $Fields['TAS_UID']);
$Fields['TAS_TITLE'] = '';
for( $i = 0; $i < sizeof($task)-1; $i ++ ) {
$aTask = $objTask->load( $task[$i] );
$Fields['TAS_TITLE'][] = $aTask['TAS_TITLE'];
}
$Fields['TAS_TITLE'] = implode(" - ", array_values($Fields['TAS_TITLE']));
} else {
$aTask = $objTask->load( $Fields['TAS_UID'] );
$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
}
$objTask = new Task();
$aTask = $objTask->load( $Fields['TAS_UID'] );
$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
$objUser = new Users();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume.xml', '', $Fields, '' );
if($Fields['APP_STATUS'] != 'COMPLETED'){
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume_Current_Task_Title.xml', '', $Fields, '' );
$objDel = new AppDelegation();
$parallel = $objDel->LoadParallel ($Fields['APP_UID']);
$FieldsPar = $Fields;
if(empty($parallel)){
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume_Current_Task.xml', '', $Fields, '' );
}else{
foreach($parallel as $row){
$FieldsPar['TAS_UID'] = $row['TAS_UID'];
$aTask = $objTask->load( $row['TAS_UID'] );
$FieldsPar['TAS_TITLE'] = $aTask['TAS_TITLE'];
$FieldsPar['USR_UID'] = $row['USR_UID'];
$aUser = $objUser->loadDetails ($row['USR_UID']);
$FieldsPar['CURRENT_USER'] = $aUser['USR_FULLNAME'];
$FieldsPar['DEL_DELEGATE_DATE'] = $row['DEL_DELEGATE_DATE'];
$FieldsPar['DEL_INIT_DATE'] = $row['DEL_INIT_DATE'];
$FieldsPar['DEL_TASK_DUE_DATE'] = $row['DEL_TASK_DUE_DATE'];
$FieldsPar['DEL_FINISH_DATE'] = $row['DEL_FINISH_DATE'];
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume_Current_Task.xml', '', $FieldsPar, '' );
}
}
}
G::RenderPage( 'publish', 'blank' );

View File

@@ -1,10 +1,10 @@
<?php
require_once 'classes/model/AppDelegation.php';
$delegation = new AppDelegation();
if( $delegation->alreadyRouted($_SESSION['APPLICATION'],$_SESSION['INDEX']) ) {
if( $delegation->alreadyRouted($_SESSION['APPLICATION'],$_SESSION['INDEX']) ) {
G::header('location: ../cases/casesListExtJs');
die();
}
}
if (!isset($_SESSION['USER_LOGGED'])) {
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
@@ -271,6 +271,8 @@ try {
G::LoadClass('pmDynaform');
$a = new pmDynaform($_GET['UID'], $Fields['APP_DATA']);
if ($a->isResponsive()) {
$a->app_data["PRO_SHOW_MESSAGE"] = $noShowTitle;
$a->app_data["TRIGGER_DEBUG"] = $_SESSION['TRIGGER_DEBUG']['ISSET'];
$a->printEdit((!isset($_SESSION["PM_RUN_OUTSIDE_MAIN_APP"])) ? "true" : "false", $_SESSION['APPLICATION'], $array, $oStep->getStepMode());
} else {
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['UID'], '', $Fields['APP_DATA'], 'cases_SaveData?UID=' . $_GET['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'], '', (strtolower($oStep->getStepMode()) != 'edit' ? strtolower($oStep->getStepMode()) : ''));
@@ -959,6 +961,12 @@ try {
$title = htmlentities($aFields['TASK'][$sKey]['NEXT_TASK']['TAS_TITLE'], ENT_QUOTES, 'UTF-8');
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_TITLE'] = $title;
if (!preg_match("/\-1$/", $aFields["TASK"][$sKey]["NEXT_TASK"]["TAS_UID"]) &&
$aFields["TASK"][$sKey]["NEXT_TASK"]["TAS_TYPE"] == "INTERMEDIATE-CATCH-MESSAGE-EVENT"
) {
$aFields["TASK"][$sKey]["NEXT_TASK"]["TAS_TITLE"] = G::LoadTranslation("ID_ROUTE_TO_TASK_INTERMEDIATE_CATCH_MESSAGE_EVENT");
}
$G_PUBLISH->AddContent( 'smarty', $tplFile, '', '', $aFields );
/*
if (isset( $aFields['TASK'][1]['NEXT_TASK']['USER_ASSIGNED'])){
@@ -1026,7 +1034,13 @@ try {
}
//Add content content step - End
} catch (Exception $e) {
G::SendTemporalMessage( G::LoadTranslation( 'ID_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
//Check if the process is BPMN
if(isset($oProcessFieds['PRO_BPMN']) && $oProcessFieds['PRO_BPMN'] == 1){
G::SendTemporalMessage( G::LoadTranslation( 'ID_BPMN_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
}else{
G::SendTemporalMessage( G::LoadTranslation( 'ID_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
}
$aMessage = array ();
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH = new Publisher();

View File

@@ -62,6 +62,7 @@ foreach ($DEBUG_ERRORS as $error) {
]}';
*/
$triggersRet = new StdClass();
$triggersRet->total = count( $triggersList );
$triggersRet->data = $triggersList;
echo G::json_encode( $triggersRet );

View File

@@ -91,10 +91,8 @@ while ($ds->next()) {
$row = $ds->getRow();
$bpmnProjects[] = $row['PRJ_UID'];
}
$oStep = new Step();
$oStep = $oStep->loadByProcessTaskPosition( $case['PRO_UID'], $case['TAS_UID'], 1 );
$oHeadPublisher->assign( 'uri', $script . $uri );
$oHeadPublisher->assign( '_APP_NUM', '#: ' . $case['APP_NUMBER'] );
$oHeadPublisher->assign( '_PROJECT_TYPE', in_array($case['PRO_UID'], $bpmnProjects) ? 'bpmn' : 'classic' );

Some files were not shown because too many files have changed in this diff Show More