public static function buildFieldFromRecord($rec)
 {
     $fields_cache =& self::$fields_cache;
     if (isset($fields_cache[$rec["id"]])) {
         return $fields_cache[$rec["id"]];
     }
     $field = new ilDataCollectionField();
     $field->setId($rec["id"]);
     $field->setTableId($rec["table_id"]);
     $field->setTitle($rec["title"]);
     $field->setDescription($rec["description"]);
     $field->setDatatypeId($rec["datatype_id"]);
     $field->setRequired($rec["required"]);
     $field->setUnique($rec["is_unique"]);
     $field->setLocked($rec["is_locked"]);
     $fields_cache[$rec["id"]] = $field;
     return $field;
 }