/**
  * Insert a new Record - static method: insertUserPopularity()
  *
  *
  * Generated with the DalClassGenerator created by: 
  * Zoran Hron <*****@*****.**> 
  *
  * @param params = array()
  * @result id
  **/
 public static function insertUserPopularity($params = array())
 {
     // object self instance
     $instance = new self();
     // required fields names
     $db_fields = array("popularity", "time");
     // build argument list
     foreach ($db_fields as $param_name) {
         if (!array_key_exists($param_name, $params)) {
             throw new Exception("UserPopularity::insertUserPopularity() - Missing parameter {$param_name}.");
         }
         ${$param_name} = $params[$param_name];
     }
     // call dynamic method
     return $instance->insert_UserPopularity($popularity, $time);
 }