29        $this->db = 
$DIC->database();
 
   83        $this->foreign_id = $a_val;
 
   93        return $this->foreign_id;
 
  103        $this->import_id = $a_val;
 
  123        $this->title = $a_val;
 
  143        $nid = 
$ilDB->nextId(
"mep_item");
 
  144        $ilDB->manipulate(
"INSERT INTO mep_item " .
 
  145            "(obj_id, type, foreign_id, title, import_id) VALUES (" .
 
  146            $ilDB->quote($nid, 
"integer") . 
"," .
 
  147            $ilDB->quote($this->getType(), 
"text") . 
"," .
 
  148            $ilDB->quote($this->getForeignId(), 
"integer") . 
"," .
 
  149            $ilDB->quote($this->getTitle(), 
"text") . 
"," .
 
  150            $ilDB->quote($this->getImportId(), 
"text") .
 
  163            "SELECT * FROM mep_item WHERE " .
 
  164            "obj_id = " . 
$ilDB->quote($this->getId(), 
"integer")
 
  166        if ($rec = 
$ilDB->fetchAssoc($set)) {
 
  185            "UPDATE mep_item SET " .
 
  186            " type = " . 
$ilDB->quote($this->getType(), 
"text") . 
"," .
 
  187            " foreign_id = " . 
$ilDB->quote($this->getForeignId(), 
"integer") . 
"," .
 
  188            " title = " . 
$ilDB->quote($this->getTitle(), 
"text") . 
"," .
 
  189            " import_id = " . 
$ilDB->quote($this->getImportId(), 
"text") .
 
  190            " WHERE obj_id = " . 
$ilDB->quote($this->getId(), 
"integer")
 
  200    public function delete()
 
  205            "DELETE FROM mep_item WHERE " 
  206            . 
" obj_id = " . 
$ilDB->quote($this->getId(), 
"integer")
 
  216    private static function lookup($a_id, $a_field)
 
  222        $set = 
$ilDB->query(
"SELECT " . $a_field . 
" FROM mep_item WHERE " .
 
  223            " obj_id = " . 
$ilDB->quote($a_id, 
"integer"));
 
  224        if ($rec = 
$ilDB->fetchAssoc($set)) {
 
  225            return $rec[$a_field];
 
  275                "UPDATE mep_item SET " .
 
  276                " title = " . 
$ilDB->quote($title, 
"text") .
 
  277                " WHERE foreign_id = " . 
$ilDB->quote($a_obj, 
"integer") .
 
  278                " AND type = " . 
$ilDB->quote(
"mob", 
"text")
 
  293            "SELECT * FROM mep_tree " .
 
  294            " WHERE child = " . 
$ilDB->quote($a_id, 
"integer")
 
  297        while ($rec = 
$ilDB->fetchAssoc($set)) {
 
  298            $pool_ids[] = $rec[
"mep_id"];
 
  316            "SELECT mep_tree.child as id" .
 
  317            " FROM mep_tree JOIN mep_item ON (mep_tree.child = mep_item.obj_id) WHERE " .
 
  318            " mep_tree.mep_id = " . 
$ilDB->quote($a_id, 
"integer") . 
" AND " .
 
  323        while ($rec = 
$ilDB->fetchAssoc($set)) {
 
An exception for terminatinating execution or to throw for unit testing.
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type