src/org/openbravo/erpCommon/ad_process/ApplyModules_data.xsql
author Antonio Moreno <antonio.moreno@openbravo.com>
Wed, 23 Sep 2009 13:06:51 +0200
changeset 5074 bdfd1c945653
parent 4271 bc808429aa25
child 5075 c1b84d47d082
permissions -rw-r--r--
Fixed issue 10128. When applying industry templates, a full compile.complete will be done to make sure all modified windows are updated.
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@4271
    27
           FROM AD_MODULE M
asier@1929
    28
          WHERE ISACTIVE='Y'
asier@3721
    29
            AND (STATUS='I' OR STATUS='U')  
asier@4271
    30
            AND NOT EXISTS (SELECT 1 
asier@4271
    31
                              FROM AD_MODULE_INSTALL
asier@4271
    32
                             WHERE AD_MODULE_ID = M.AD_MODULE_ID)
asier@3721
    33
          UNION
asier@3721
    34
          SELECT JAVAPACKAGE AS NAME
asier@3721
    35
           FROM AD_MODULE_INSTALL         
asier@1929
    36
          ]]>
asier@1929
    37
      </Sql>
asier@1929
    38
  </SqlMethod>
asier@1929
    39
  
antonio@5074
    40
  <SqlMethod name="isUpdatingCoreOrTemplate" type="preparedStatement" return="boolean">
asier@2115
    41
      <SqlMethodComment></SqlMethodComment>
asier@2115
    42
      <Sql><![CDATA[
antonio@5074
    43
         SELECT count(*) as NAME FROM
antonio@5074
    44
            ((SELECT 1  
antonio@5074
    45
                FROM AD_MODULE
antonio@5074
    46
                WHERE STATUS='I'      
antonio@5074
    47
               AND (AD_MODULE_ID = '0' OR TYPE='T'))
antonio@5074
    48
            UNION
antonio@5074
    49
            (SELECT 1
antonio@5074
    50
                FROM AD_MODULE_INSTALL
antonio@5074
    51
                WHERE STATUS='I'      
antonio@5074
    52
               AND (AD_MODULE_ID = '0' OR TYPE='T'))) as q
asier@2115
    53
          ]]>
asier@2115
    54
      </Sql>
asier@2115
    55
  </SqlMethod>
asier@2115
    56
  
asier@3995
    57
  <SqlMethod name="compileCompleteNeeded" type="preparedStatement" return="boolean">
asier@3995
    58
      <SqlMethodComment></SqlMethodComment>
asier@3995
    59
      <Sql><![CDATA[
asier@3995
    60
         SELECT count(*) as NAME
asier@3995
    61
           FROM AD_MODULE
asier@3995
    62
          WHERE (STATUS='I'      
asier@3995
    63
                 AND TYPE = 'T')
asier@3995
    64
             OR (STATUS='U')
asier@3995
    65
          ]]>
asier@3995
    66
      </Sql>
asier@3995
    67
  </SqlMethod>
asier@3995
    68
  
asier@1929
    69
  <SqlMethod name="selectUninstalledModules" type="preparedStatement" return="boolean">
asier@1929
    70
      <SqlMethodComment></SqlMethodComment>
asier@1929
    71
      <Sql><![CDATA[
asier@1929
    72
         SELECT count(*) as NAME
asier@1929
    73
           FROM AD_MODULE
asier@1929
    74
          WHERE STATUS='U'           
asier@1929
    75
          ]]>
asier@1929
    76
      </Sql>
asier@1929
    77
  </SqlMethod>
asier@1929
    78
  
asier@1929
    79
  <SqlMethod name="getHelp" type="preparedStatement" return="string">
asier@1929
    80
      <SqlMethodComment></SqlMethodComment>
asier@1929
    81
      <Sql><![CDATA[
asier@1929
    82
         SELECT COALESCE(T.HELP, P.HELP) AS NAME
asier@1929
    83
           FROM AD_PROCESS P LEFT JOIN AD_PROCESS_TRL T 
asier@1929
    84
                                       ON T.AD_PROCESS_ID = P.AD_PROCESS_ID
asier@1929
    85
                                      AND AD_LANGUAGE = ?
asier@1929
    86
          WHERE P.AD_PROCESS_ID = 'BDB3B6FCA0AB453DB4E83503BAB82470'
asier@1929
    87
           
asier@1929
    88
          ]]>
asier@1929
    89
      </Sql>
asier@1929
    90
      <Parameter name="adLanguage"/>
asier@1929
    91
  </SqlMethod>
asier@1929
    92
</SqlClass>