src/org/openbravo/erpCommon/ad_forms/ShowSessionVariables_data.xsql
changeset 683 8cc2b7ffa4f4
child 1605 8a0fe0193bef
equal deleted inserted replaced
682:d74ff31735ac 683:8cc2b7ffa4f4
       
     1 <?xml version="1.0" encoding="UTF-8" ?>
       
     2 <!--
       
     3  *************************************************************************
       
     4  * The contents of this file are subject to the Openbravo  Public  License
       
     5  * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
       
     6  * Version 1.1  with a permitted attribution clause; you may not  use this
       
     7  * file except in compliance with the License. You  may  obtain  a copy of
       
     8  * the License at http://www.openbravo.com/legal/license.html 
       
     9  * Software distributed under the License  is  distributed  on  an "AS IS"
       
    10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
       
    11  * License for the specific  language  governing  rights  and  limitations
       
    12  * under the License. 
       
    13  * The Original Code is Openbravo ERP. 
       
    14  * The Initial Developer of the Original Code is Openbravo SL 
       
    15  * All portions are Copyright (C) 2001-2008 Openbravo S.L.
       
    16  * All Rights Reserved. 
       
    17  * Contributor(s):  ______________________________________.
       
    18  ************************************************************************
       
    19 -->
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 <SqlClass id="class" name="ShowSessionVariablesData" package="org.openbravo.erpCommon.ad_forms">
       
    26   <SqlClassComment></SqlClassComment>
       
    27   <SqlMethod name="select" type="preparedStatement" return="multiple">
       
    28     <SqlMethodComment></SqlMethodComment>
       
    29     <Sql><![CDATA[
       
    30       SELECT AD_WINDOW_ID AS ID, NAME FROM AD_WINDOW WHERE ISACTIVE='Y' 
       
    31       ORDER BY NAME
       
    32     ]]></Sql>
       
    33     <Parameter name="windows" optional="true" type="argument" after="WHERE ISACTIVE='Y' " text="AND AD_WINDOW.AD_WINDOW_ID IN "/>
       
    34   </SqlMethod>
       
    35   <SqlMethod name="selectTrl" type="preparedStatement" return="multiple">
       
    36     <SqlMethodComment></SqlMethodComment>
       
    37     <Sql><![CDATA[
       
    38       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 
       
    39       FROM AD_WINDOW, AD_WINDOW_TRL 
       
    40       WHERE AD_WINDOW.ISACTIVE='Y' 
       
    41       AND AD_WINDOW.AD_WINDOW_ID = AD_WINDOW_TRL.AD_WINDOW_ID
       
    42       AND AD_WINDOW_TRL.AD_LANGUAGE = ? 
       
    43       ORDER BY 2
       
    44     ]]></Sql>
       
    45     <Parameter name="windows" optional="true" type="argument" after="WHERE AD_WINDOW.ISACTIVE='Y' " text="AND AD_WINDOW.AD_WINDOW_ID IN "/>
       
    46     <Parameter name="adLanguage"/>
       
    47   </SqlMethod>
       
    48   <SqlMethod name="usuario" type="preparedStatement" return="String" default="">
       
    49     <SqlMethodComment></SqlMethodComment>
       
    50     <Sql><![CDATA[
       
    51       SELECT USERNAME FROM AD_USER WHERE AD_USER_ID = TO_NUMBER(?)
       
    52     ]]></Sql>
       
    53     <Parameter name="adUserId"/>
       
    54   </SqlMethod>
       
    55   <SqlMethod name="rol" type="preparedStatement" return="String" default="">
       
    56     <SqlMethodComment></SqlMethodComment>
       
    57     <Sql><![CDATA[
       
    58       SELECT NAME FROM AD_ROLE WHERE AD_ROLE_ID = TO_NUMBER(?)
       
    59     ]]></Sql>
       
    60     <Parameter name="adRoleId"/>
       
    61   </SqlMethod>
       
    62   <SqlMethod name="cliente" type="preparedStatement" return="String" default="">
       
    63     <SqlMethodComment></SqlMethodComment>
       
    64     <Sql><![CDATA[
       
    65       SELECT NAME FROM AD_CLIENT WHERE AD_CLIENT_ID = TO_NUMBER(?)
       
    66     ]]></Sql>
       
    67     <Parameter name="adClientId"/>
       
    68   </SqlMethod>
       
    69   <SqlMethod name="organizacion" type="preparedStatement" return="String" default="">
       
    70     <SqlMethodComment></SqlMethodComment>
       
    71     <Sql><![CDATA[
       
    72       SELECT NAME FROM AD_ORG WHERE AD_ORG_ID = TO_NUMBER(?)
       
    73     ]]></Sql>
       
    74     <Parameter name="adOrgId"/>
       
    75   </SqlMethod>
       
    76   <SqlMethod name="versionBBDD" type="preparedStatement" return="String" default="">
       
    77     <SqlMethodComment></SqlMethodComment>
       
    78     <Sql><![CDATA[
       
    79       SELECT TAD_VERSION FROM AD_SYSTEM WHERE AD_SYSTEM_ID = 0
       
    80     ]]></Sql>
       
    81   </SqlMethod>
       
    82   <SqlMethod name="versionVerticalBBDD" type="preparedStatement" return="String" default="">
       
    83     <SqlMethodComment></SqlMethodComment>
       
    84     <Sql><![CDATA[
       
    85       SELECT TAD_PARENT_VERSION FROM AD_SYSTEM WHERE AD_SYSTEM_ID = 0
       
    86     ]]></Sql>
       
    87   </SqlMethod>
       
    88   <SqlMethod name="selectPreference" type="preparedStatement" return="String" default="">
       
    89     <SqlMethodComment></SqlMethodComment>
       
    90     <Sql><![CDATA[
       
    91       SELECT AD_Preference_ID 
       
    92       FROM AD_Preference 
       
    93       WHERE AD_Client_ID IN ('1') 
       
    94       AND AD_Org_ID IN ('2') 
       
    95       AND (AD_User_ID IS NULL OR AD_User_ID=0 OR AD_User_ID = TO_NUMBER(?)) 
       
    96       AND IsActive='Y' 
       
    97       AND UPPER(Attribute) = UPPER(?)
       
    98       ORDER BY AD_Client_ID, AD_Org_ID, AD_User_ID
       
    99     ]]></Sql>
       
   100     <Parameter name="adClientId" type="replace" optional="true" after="AD_Client_ID IN (" text="'1'"/>
       
   101     <Parameter name="adOrgId" type="replace" optional="true" after="AD_Org_ID IN (" text="'2'"/>
       
   102     <Parameter name="adUserId"/>
       
   103     <Parameter name="columnname"/>
       
   104   </SqlMethod>
       
   105   <SqlMethod name="update" type="preparedStatement" return="rowCount">
       
   106     <SqlMethodComment></SqlMethodComment>
       
   107     <Sql><![CDATA[
       
   108       UPDATE AD_PREFERENCE SET UPDATED=now(), UPDATEDBY=TO_NUMBER(?), VALUE=?
       
   109       WHERE AD_Preference_ID = TO_NUMBER(?)
       
   110     ]]></Sql>
       
   111       <Parameter name="adUserId"/>
       
   112       <Parameter name="value"/>
       
   113       <Parameter name="adPreferenceId"/>
       
   114   </SqlMethod>
       
   115   <SqlMethod name="updateRange" type="preparedStatement" return="rowCount">
       
   116     <SqlMethodComment></SqlMethodComment>
       
   117     <Sql><![CDATA[
       
   118       UPDATE AD_SYSTEM SET UPDATED=now(), UPDATEDBY=TO_NUMBER(?), TAD_RECORDRANGE=TO_NUMBER(?), TAD_RECORDRANGE_INFO=TO_NUMBER(?), TAD_TRANSACTIONALRANGE=TO_NUMBER(?), TAD_THEME=?
       
   119       WHERE AD_System_ID = 0
       
   120     ]]></Sql>
       
   121       <Parameter name="adUserId"/>
       
   122       <Parameter name="tadRecordrange"/>
       
   123       <Parameter name="tadRecordrangeInfo"/>
       
   124       <Parameter name="tadTransactionalrange"/>
       
   125       <Parameter name="tadTheme"/>
       
   126   </SqlMethod>
       
   127   <SqlMethod name="insert" type="preparedStatement" return="rowCount">
       
   128     <SqlMethodComment></SqlMethodComment>
       
   129     <Sql><![CDATA[
       
   130       INSERT INTO AD_PREFERENCE (AD_PREFERENCE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, 
       
   131       CREATED, CREATEDBY, UPDATED, UPDATEDBY, AD_USER_ID, ATTRIBUTE, VALUE)
       
   132       VALUES (TO_NUMBER(?),TO_NUMBER(?),TO_NUMBER(?),'Y', 
       
   133       now(), TO_NUMBER(?), now(), TO_NUMBER(?), TO_NUMBER(?), ?, ?)
       
   134     ]]></Sql>
       
   135       <Parameter name="adPreferenceId"/>
       
   136       <Parameter name="adClientId"/>
       
   137       <Parameter name="adOrgId"/>
       
   138       <Parameter name="adUserId"/>
       
   139       <Parameter name="adUserId"/>
       
   140       <Parameter name="adUserId"/>
       
   141       <Parameter name="attribute"/>
       
   142       <Parameter name="value"/>
       
   143   </SqlMethod>
       
   144 </SqlClass>