public function buildDeleteSQL($dataObj)
    {
        $sql = "DELETE FROM `" . $dataObj->mainTableName . "`";
        $whereStr = $dataObj->bizRecord->getKeySearchRule(false, true);  // use cur value and column name
        $sql .= " WHERE " . $whereStr;
        // append DataPerm in the WHERE clause
        if ($dataObj->dataPermControl == 'Y') {
            $svcObj = Openbizx::getService(OPENBIZ_DATAPERM_SERVICE);
            $hasOwnerField = $this->_hasOwnerField($dataObj);
            $dataPermSQLRule = $svcObj->buildSqlRule($dataObj, 'delete', $hasOwnerField);
            $sqlSearchRule = $this->_convertSqlExpressionWithoutPrefix($dataObj, $dataPermSQLRule);
            if ($whereStr != '') {
                $sql .= ' AND ' . $sqlSearchRule;
            } else {
                $sql .= $sqlSearchRule;
            }
        }
        return $sql;
    }