src/org/openbravo/erpCommon/ad_forms/ShowSessionVariables_data.xsql
author David Miguelez <david.miguelez@openbravo.com>
Mon, 20 Jan 2020 18:22:55 +0100
changeset 36977 05eb9a97dc3b
parent 22050 c3bb94a4b13f
permissions -rw-r--r--
Related to ISSUE-42878: Code Review changes:
* Do not use Boolean.TRUE, keep old comparison as the code
is more redable
* Select word in query must be lowercase
<?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) 2001-2010 Openbravo S.L.U.
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
-->





<SqlClass id="class" name="ShowSessionVariablesData" package="org.openbravo.erpCommon.ad_forms">
  <SqlClassComment></SqlClassComment>
  <SqlMethod name="select" type="preparedStatement" return="multiple">
    <SqlMethodComment></SqlMethodComment>
    <Sql><![CDATA[
      SELECT AD_WINDOW_ID AS ID, NAME FROM AD_WINDOW WHERE ISACTIVE='Y' 
      ORDER BY NAME
    ]]></Sql>
    <Parameter name="windows" optional="true" type="argument" after="WHERE ISACTIVE='Y' " text="AND AD_WINDOW.AD_WINDOW_ID IN "/>
  </SqlMethod>
  <SqlMethod name="selectTrl" type="preparedStatement" return="multiple">
    <SqlMethodComment></SqlMethodComment>
    <Sql><![CDATA[
      SELECT AD_WINDOW.AD_WINDOW_ID AS ID, (CASE WHEN AD_WINDOW_TRL.NAME IS NULL THEN AD_WINDOW.NAME ELSE AD_WINDOW_TRL.NAME END) AS NAME 
      FROM AD_WINDOW, AD_WINDOW_TRL 
      WHERE AD_WINDOW.ISACTIVE='Y' 
      AND AD_WINDOW.AD_WINDOW_ID = AD_WINDOW_TRL.AD_WINDOW_ID
      AND AD_WINDOW_TRL.AD_LANGUAGE = ? 
      ORDER BY 2
    ]]></Sql>
    <Parameter name="windows" optional="true" type="argument" after="WHERE AD_WINDOW.ISACTIVE='Y' " text="AND AD_WINDOW.AD_WINDOW_ID IN "/>
    <Parameter name="adLanguage"/>
  </SqlMethod>
</SqlClass>