Example #1
0
 /**
  * The implementation method for query to the instance data Base.
  *
  * @throws None.
  *
  * @access     public
  * @static     No.
  * @see        None.
  * @since      Available from the version  1.0 01-01-2013.
  * @deprecated No.
  */
 public static function setDataOperationBusiness($instanceDataBase)
 {
     $result = null;
     $query = null;
     $aux = null;
     try {
         $query = "select pk_id_catalog, description, catalog " . "from sec_sys_catalog " . "where catalog in ('OPERATION','BUSINESS') and applies_to_table_main = 'SEC_TRANSACTION' and registration_status = 'A' ";
         $result = DataBase::getArrayListQuery($query, array(), $instanceDataBase);
         foreach ($result as $item) {
             $aux[$item['catalog']][$item['description']] = $item['pk_id_catalog'];
         }
         self::$dataOperationBusiness = $aux;
         // get data operation/business
         $aux = self::$dataOperationBusiness['OPERATION'];
         self::$insert = $aux['INSERT'];
         self::$update = $aux['UPDATE'];
         self::$delete = $aux['DELETE'];
         self::$select = $aux['SELECT'];
         self::$procedure = $aux['PROCEDURE'];
         self::$logon = $aux['LOGON'];
         self::$logoff = $aux['LOGOFF'];
         self::$other = $aux['OTHER'];
         return true;
     } catch (PDOException $e) {
         echo 'Error JF-Model-0011: ' . $e->getMessage();
         return false;
     }
 }