setFromRow($rs); return $t;'),$params ) ); } //-------------------------------------------------------------------- /** * returns array of StoreValue */ function getAllStoreValue( $orderBy ) { $params = array(); $sql = StoreSelectStoreValue ; if(!empty($orderBy)){ $sql = $sql . " order by " . $orderBy; } return pgdb_runSqlP($sql, create_function('$rs', '$t = new StoreValue(); $t->setFromRow($rs); return $t;'),$params ); } //-------------------------------------------------------------------- function add( $value ) { $sql = "insert into Store ( " . "storeId " . ",name " . " ) values ( " . "nextval('Store_storeId_seq') " . ",? " . ")"; $params = array(); $params[] = $value->getName(); pgdb_runSqlP($sql,null,$params); } //-------------------------------------------------------------------- function update( $value ) { $sql = "update Store set " . "name = ? " . " where " . "storeId = ? " . ""; $params = array(); $params[] = $value->getName(); $params[] = $value->getStoreId(); pgdb_runSqlP($sql,null,$params); } //-------------------------------------------------------------------- function delete( $storeId ) { $sql = "delete from Store where " . "storeId = ? " . ""; $params = array(); $params[] = $storeId; pgdb_runSqlP($sql,null,$params); } } // // ================================================================== // // WARNING : Do not edit this file by hand. This file was created // by SoProMach. Edit the definition files and re-generate to make // modifications. Making modifications to this file directly will // result in loss of work when the file is re-generated. // // ================================================================== ?>