public function __construct(Database $dbObj, $campaignId)
 {
     $this->dbObj = $dbObj;
     parent::__construct($this->dbObj, self::tableName, self::seqName, self::pkeyField);
     if (is_numeric($campaignId) && $campaignId > 0) {
         $this->campaignId = $campaignId;
     } else {
         throw new exception(__METHOD__ . ": missing or invalid campaignId (" . $campaignId . ")");
     }
 }
 public function delete(Database $db)
 {
     if (is_array($this->_data) && count($this->_data) > 0 && is_numeric($this->id)) {
         $x = new Record($db, $this->_dbTable, $this->_dbSeq, $this->_dbPkey);
         $x->booleanFields = $this->booleanFields;
         $x->id = $this->id;
         $retval = $x->delete();
     } else {
         throw new ErrorException(__METHOD__ . ": missing required ID");
     }
     return $retval;
 }