Code Duplication    Length = 5-5 lines in 3 locations

class/PersistableObjectHandler.php 3 locations

@@ 345-349 (lines=5) @@
342
            $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName);
343
        }
344
        $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause;
345
        if (false != $force) {
346
            $result = $this->db->queryF($sql);
347
        } else {
348
            $result = $this->db->query($sql);
349
        }
350
        if (!$result) {
351
            return false;
352
        }
@@ 461-465 (lines=5) @@
458
            $sql .= ' WHERE ' . $whereclause;
459
        }
460
461
        if (false != $force) {
462
            $result = $this->db->queryF($sql);
463
        } else {
464
            $result = $this->db->query($sql);
465
        }
466
        if (!$result) {
467
            return false;
468
        }
@@ 501-505 (lines=5) @@
498
        if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
499
            $sql .= ' ' . $criteria->renderWhere();
500
        }
501
        if (false != $force) {
502
            $result = $this->db->queryF($sql);
503
        } else {
504
            $result = $this->db->query($sql);
505
        }
506
        if (!$result) {
507
            return false;
508
        }