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