src/org/openbravo/erpCommon/ad_process/ApplyModules_data.xsql
author Asier Lostalé <asier.lostale@openbravo.com>
Thu, 11 Jun 2009 15:02:20 +0200
changeset 3995 88e93b5b7c41
parent 3721 395c64aeef09
child 4271 bc808429aa25
permissions -rw-r--r--
fixed bug 9403, fixed bug 9390: Execute compile.complte when applying modules depending on the case.

It is executed when:
-There's at least one module to uninstall
-There's at least one template to install
asier@1929
     1
<?xml version="1.0" encoding="UTF-8" ?>
asier@1929
     2
<!--
asier@1929
     3
 *************************************************************************
asier@1929
     4
 * The contents of this file are subject to the Openbravo  Public  License
asier@1929
     5
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
asier@1929
     6
 * Version 1.1  with a permitted attribution clause; you may not  use this
asier@1929
     7
 * file except in compliance with the License. You  may  obtain  a copy of
asier@1929
     8
 * the License at http://www.openbravo.com/legal/license.html 
asier@1929
     9
 * Software distributed under the License  is  distributed  on  an "AS IS"
asier@1929
    10
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
asier@1929
    11
 * License for the specific  language  governing  rights  and  limitations
asier@1929
    12
 * under the License. 
asier@1929
    13
 * The Original Code is Openbravo ERP. 
asier@1929
    14
 * The Initial Developer of the Original Code is Openbravo SL 
asier@3721
    15
 * All portions are Copyright (C) 2008-2009 Openbravo SL 
asier@1929
    16
 * All Rights Reserved. 
asier@1929
    17
 * Contributor(s):  ______________________________________.
asier@1929
    18
 ************************************************************************
asier@1929
    19
-->
asier@1929
    20
asier@1929
    21
asier@1929
    22
<SqlClass name="ApplyModulesData" package="org.openbravo.erpCommon.ad_process">
asier@1929
    23
  <SqlMethod name="selectUnappliedModules" type="preparedStatement" return="multiple">
asier@1929
    24
      <SqlMethodComment></SqlMethodComment>
asier@1929
    25
      <Sql><![CDATA[
asier@2153
    26
         SELECT JAVAPACKAGE AS NAME
asier@1929
    27
           FROM AD_MODULE
asier@1929
    28
          WHERE ISACTIVE='Y'
asier@3721
    29
            AND (STATUS='I' OR STATUS='U')  
asier@3721
    30
          UNION
asier@3721
    31
          SELECT JAVAPACKAGE AS NAME
asier@3721
    32
           FROM AD_MODULE_INSTALL         
asier@1929
    33
          ]]>
asier@1929
    34
      </Sql>
asier@1929
    35
  </SqlMethod>
asier@1929
    36
  
asier@2115
    37
  <SqlMethod name="isUpdatingCore" type="preparedStatement" return="boolean">
asier@2115
    38
      <SqlMethodComment></SqlMethodComment>
asier@2115
    39
      <Sql><![CDATA[
asier@2115
    40
         SELECT count(*) as NAME
asier@2115
    41
           FROM AD_MODULE
asier@2115
    42
          WHERE STATUS='I'      
asier@2115
    43
            AND AD_MODULE_ID = '0'
asier@2115
    44
          ]]>
asier@2115
    45
      </Sql>
asier@2115
    46
  </SqlMethod>
asier@2115
    47
  
asier@3995
    48
  <SqlMethod name="compileCompleteNeeded" type="preparedStatement" return="boolean">
asier@3995
    49
      <SqlMethodComment></SqlMethodComment>
asier@3995
    50
      <Sql><![CDATA[
asier@3995
    51
         SELECT count(*) as NAME
asier@3995
    52
           FROM AD_MODULE
asier@3995
    53
          WHERE (STATUS='I'      
asier@3995
    54
                 AND TYPE = 'T')
asier@3995
    55
             OR (STATUS='U')
asier@3995
    56
          ]]>
asier@3995
    57
      </Sql>
asier@3995
    58
  </SqlMethod>
asier@3995
    59
  
asier@1929
    60
  <SqlMethod name="selectUninstalledModules" type="preparedStatement" return="boolean">
asier@1929
    61
      <SqlMethodComment></SqlMethodComment>
asier@1929
    62
      <Sql><![CDATA[
asier@1929
    63
         SELECT count(*) as NAME
asier@1929
    64
           FROM AD_MODULE
asier@1929
    65
          WHERE STATUS='U'           
asier@1929
    66
          ]]>
asier@1929
    67
      </Sql>
asier@1929
    68
  </SqlMethod>
asier@1929
    69
  
asier@1929
    70
  <SqlMethod name="getHelp" type="preparedStatement" return="string">
asier@1929
    71
      <SqlMethodComment></SqlMethodComment>
asier@1929
    72
      <Sql><![CDATA[
asier@1929
    73
         SELECT COALESCE(T.HELP, P.HELP) AS NAME
asier@1929
    74
           FROM AD_PROCESS P LEFT JOIN AD_PROCESS_TRL T 
asier@1929
    75
                                       ON T.AD_PROCESS_ID = P.AD_PROCESS_ID
asier@1929
    76
                                      AND AD_LANGUAGE = ?
asier@1929
    77
          WHERE P.AD_PROCESS_ID = 'BDB3B6FCA0AB453DB4E83503BAB82470'
asier@1929
    78
           
asier@1929
    79
          ]]>
asier@1929
    80
      </Sql>
asier@1929
    81
      <Parameter name="adLanguage"/>
asier@1929
    82
  </SqlMethod>
asier@1929
    83
</SqlClass>