src/org/openbravo/erpCommon/ad_forms/Role_data.xsql
author Gorka Gil <gorka.gil@openbravo.com>
Fri, 08 Oct 2010 12:51:46 +0200
changeset 7936 9910242bf439
parent 7328 7607166be4d6
child 8541 bc829f14e1c8
permissions -rw-r--r--
[demo] Customization of demo to work with 2.50MP20
carlos@0
     1
<?xml version="1.0" encoding="UTF-8" ?>
carlos@0
     2
<!--
carlos@0
     3
 *************************************************************************
carlos@0
     4
 * The contents of this file are subject to the Openbravo  Public  License
carlos@0
     5
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
carlos@0
     6
 * Version 1.1  with a permitted attribution clause; you may not  use this
carlos@0
     7
 * file except in compliance with the License. You  may  obtain  a copy of
carlos@0
     8
 * the License at http://www.openbravo.com/legal/license.html 
carlos@0
     9
 * Software distributed under the License  is  distributed  on  an "AS IS"
carlos@0
    10
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
carlos@0
    11
 * License for the specific  language  governing  rights  and  limitations
carlos@0
    12
 * under the License. 
carlos@0
    13
 * The Original Code is Openbravo ERP. 
ggi@6702
    14
 * The Initial Developer of the Original Code is Openbravo SLU 
asier@7328
    15
 * All portions are Copyright (C) 2001-2010 Openbravo SLU 
carlos@0
    16
 * All Rights Reserved. 
carlos@0
    17
 * Contributor(s):  ______________________________________.
carlos@0
    18
 ************************************************************************
carlos@0
    19
-->
carlos@0
    20
carlos@0
    21
carlos@0
    22
carlos@0
    23
carlos@0
    24
gorka@7936
    25
<SqlClass name="RoleData" package="org.openbravo.erpCommon.ad_forms" accessModifier="public">
carlos@0
    26
  <SqlClassComment></SqlClassComment>
asier@7328
    27
  
carlos@0
    28
   <SqlMethod name="nombreUsuario" type="preparedStatement" return="String" default="">
carlos@0
    29
      <SqlMethodComment></SqlMethodComment>
carlos@0
    30
      <Sql>
asier@7328
    31
        SELECT NAME, '' as  password, '' as ISRTL
asier@7328
    32
          FROM AD_USER WHERE AD_USER_ID=?
carlos@0
    33
      </Sql>
carlos@0
    34
      <Parameter name="adUserId"/>
carlos@0
    35
   </SqlMethod>
carlos@0
    36
carlos@0
    37
   <SqlMethod name="getPassword" type="preparedStatement" return="string">
carlos@0
    38
      <SqlMethodComment></SqlMethodComment>
carlos@0
    39
      <Sql>
carlos@0
    40
        SELECT PASSWORD AS password 
carlos@0
    41
        FROM AD_USER 
juanpablo@1605
    42
        WHERE   AD_USER_ID = ? 
carlos@0
    43
      </Sql>
carlos@0
    44
      <Parameter name="adUserId"/>      
carlos@0
    45
   </SqlMethod>
carlos@0
    46
   <SqlMethod name="update" type="preparedStatement" return="rowCount">
carlos@0
    47
      <SqlMethodComment></SqlMethodComment>
carlos@0
    48
      <Sql>
juanpablo@1605
    49
        UPDATE AD_USER SET PASSWORD = ?, UPDATED=now(), UPDATEDBY = ? WHERE AD_USER_ID = ? 
carlos@0
    50
      </Sql>
carlos@0
    51
      <Parameter name="password"/>
carlos@0
    52
      <Parameter name="adUserId"/>
carlos@0
    53
      <Parameter name="adUserId"/>
carlos@0
    54
   </SqlMethod>
david@1883
    55
   <SqlMethod name="getIsRTL" type="preparedStatement" return="string">
david@1883
    56
      <SqlMethodComment></SqlMethodComment>
david@1883
    57
      <Sql>
david@1883
    58
		SELECT ISRTL
david@1883
    59
		FROM AD_LANGUAGE
david@1883
    60
		WHERE AD_LANGUAGE = ?
david@1883
    61
      </Sql>
david@1883
    62
      <Parameter name="adLanguage"/>
david@1883
    63
   </SqlMethod>
stefan@4056
    64
stefan@4056
    65
   <SqlMethod name="saveDefaultOptions" type="preparedStatement" return="rowCount">
stefan@4056
    66
      <SqlMethodComment></SqlMethodComment>
stefan@4056
    67
      <Sql><![CDATA[
stefan@4056
    68
        UPDATE AD_USER SET 
stefan@4056
    69
            DEFAULT_AD_LANGUAGE = ?,
stefan@4056
    70
            DEFAULT_AD_ROLE_ID = ?,
stefan@4056
    71
            DEFAULT_AD_CLIENT_ID = ?,
stefan@4056
    72
            DEFAULT_AD_ORG_ID = ?,
stefan@4056
    73
            DEFAULT_M_WAREHOUSE_ID = ?
stefan@4056
    74
        WHERE AD_USER_ID = ?
stefan@4056
    75
      ]]></Sql>
stefan@4056
    76
      <Parameter name="adlanguage"/>
stefan@4056
    77
      <Parameter name="adroleid"/>
stefan@4056
    78
      <Parameter name="adclientid"/>
stefan@4056
    79
      <Parameter name="adorgid"/>
stefan@4056
    80
      <Parameter name="mwarehouseid"/>
stefan@4056
    81
      <Parameter name="aduserid"/>
stefan@4056
    82
   </SqlMethod>
stefan@4056
    83
gorka@7936
    84
</SqlClass>