2010-12-02 23:34:41 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
require_once 'classes/model/om/BaseProcessCategory.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Skeleton subclass for representing a row from the 'PROCESS_CATEGORY' 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.
|
|
|
|
|
*
|
2011-01-22 12:20:08 +00:00
|
|
|
* @package workflow.classes.model
|
2010-12-02 23:34:41 +00:00
|
|
|
*/
|
|
|
|
|
class ProcessCategory extends BaseProcessCategory {
|
|
|
|
|
function getAll($type='criteria'){
|
|
|
|
|
$c = new Criteria('workflow');
|
|
|
|
|
$c->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
|
|
|
|
|
$c->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME);
|
|
|
|
|
$dataset = ProcessCategoryPeer::doSelectRS($c);
|
|
|
|
|
$dataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
|
|
|
|
|
|
|
|
|
if( $type == 'array' ){
|
|
|
|
|
$result = Array();
|
|
|
|
|
while ( $dataset->next() ) {
|
|
|
|
|
$result[] = $dataset->getRow();
|
|
|
|
|
}
|
|
|
|
|
return $result;
|
|
|
|
|
} else {
|
|
|
|
|
return $c;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function loadByCategoryName($sCategoryName)
|
|
|
|
|
{
|
|
|
|
|
$c = new Criteria('workflow');
|
|
|
|
|
$del = DBAdapter::getStringDelimiter();
|
|
|
|
|
|
|
|
|
|
$c->clearSelectColumns();
|
|
|
|
|
$c->addSelectColumn( ProcessCategoryPeer::CATEGORY_UID );
|
|
|
|
|
$c->addSelectColumn( ProcessCategoryPeer::CATEGORY_NAME);
|
|
|
|
|
|
|
|
|
|
$c->add(ProcessCategoryPeer::CATEGORY_NAME, $sCategoryName);
|
|
|
|
|
$dataset = ProcessCategoryPeer::doSelectRS($c);
|
|
|
|
|
$dataset->next();
|
|
|
|
|
$aRow = $dataset->getRow();
|
|
|
|
|
return $aRow;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // ProcessCategory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|