src/org/openbravo/erpCommon/modules/ApplyModule_data.xsql
author Antonio Moreno <antonio.moreno@openbravo.com>
Thu, 16 Feb 2012 12:11:22 +0100
changeset 15522 459c8c6700f5
parent 13016 4f22d41ef45d
permissions -rw-r--r--
Fixed issue 13438. Now the import of reference data and translations can be forced with -DforceRefData=true
<?xml version="1.0" encoding="UTF-8" ?>
<!--
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html 
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License. 
 * The Original Code is Openbravo ERP. 
 * The Initial Developer of the Original Code is Openbravo SLU 
 * All portions are Copyright (C) 2008-2010 Openbravo SLU 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
-->

<SqlClass name="ApplyModuleData" package="org.openbravo.erpCommon.modules">
  <SqlClassComment></SqlClassComment>
  <SqlMethod name="selectTranslationModules" type="preparedStatement" return="multiple">
    <SqlMethodComment></SqlMethodComment>
    <Sql>
    <![CDATA[
      SELECT M.JAVAPACKAGE, M.NAME, M.AD_LANGUAGE, L.ISSYSTEMLANGUAGE, '' as DS_NAME, '' AS AD_MODULE_ID
        FROM AD_MODULE M LEFT JOIN AD_LANGUAGE L
                           ON L.AD_LANGUAGE = M.AD_LANGUAGE
       WHERE (STATUS = 'I' OR STATUS = 'P')
         AND ISTRANSLATIONMODULE = 'Y'
    ]]></Sql>
  </SqlMethod>
  <SqlMethod name="selectAllTranslationModules" type="preparedStatement" return="multiple">
    <SqlMethodComment></SqlMethodComment>
    <Sql>
    <![CDATA[
      SELECT M.JAVAPACKAGE, M.NAME, M.AD_LANGUAGE, L.ISSYSTEMLANGUAGE, '' as DS_NAME, '' AS AD_MODULE_ID
        FROM AD_MODULE M LEFT JOIN AD_LANGUAGE L
                           ON L.AD_LANGUAGE = M.AD_LANGUAGE
       WHERE ISTRANSLATIONMODULE = 'Y'
    ]]></Sql>
  </SqlMethod>
  
  <SqlMethod name="selectClientReferenceModules" type="preparedStatement" return="multiple">
    <SqlMethodComment></SqlMethodComment>
    <Sql>
    <![CDATA[
      SELECT M.JAVAPACKAGE, M.NAME, M.AD_MODULE_ID, D.NAME as DS_NAME
        FROM AD_MODULE M, AD_DATASET D
       WHERE (M.STATUS = 'I' OR M.STATUS = 'P')
         AND M.HASREFERENCEDATA = 'Y'
         AND D.AD_MODULE_ID = M.AD_MODULE_ID
         AND D.ACCESSLEVEL = '4'
    ]]></Sql>
  </SqlMethod>
  
  <SqlMethod name="selectAllClientReferenceModules" type="preparedStatement" return="multiple">
    <SqlMethodComment></SqlMethodComment>
    <Sql>
    <![CDATA[
      SELECT M.JAVAPACKAGE, M.NAME, M.AD_MODULE_ID, D.NAME as DS_NAME
        FROM AD_MODULE M, AD_DATASET D
       WHERE M.HASREFERENCEDATA = 'Y'
         AND D.AD_MODULE_ID = M.AD_MODULE_ID
         AND D.ACCESSLEVEL = '4'
    ]]></Sql>
  </SqlMethod>
  
  <SqlMethod name="setSystemLanguage" type="preparedStatement" return="rowcount">
    <Sql>
      <![CDATA[
         UPDATE AD_LANGUAGE
            SET ISSYSTEMLANGUAGE='Y'
          WHERE AD_LANGUAGE = ?
      ]]></Sql>
    <Parameter name="lang"/>
  </SqlMethod>

  <SqlMethod name="process179" type="callableStatement" return="object" object="ApplyModuleData">
      <SqlMethodComment>procedure AD_Language_Create</SqlMethodComment>
      <Sql><![CDATA[
        CALL AD_Language_Create(?)
      ]]></Sql>
      <Parameter name="adPinstanceId"></Parameter>
   </SqlMethod>

</SqlClass>