src/org/openbravo/erpCommon/ad_actionButton/ActionButtonDefault_data.xsql
author Juan Pablo Aroztegi <juanpablo.aroztegi@openbravo.com>
Wed, 03 Sep 2008 17:55:37 +0000
changeset 1605 8a0fe0193bef
parent 423 ecf368072c48
child 3932 c979fa657fce
permissions -rw-r--r--
Merge r2.5x intro trunk
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. 
carlos@0
    14
 * The Initial Developer of the Original Code is Openbravo SL 
carlos@0
    15
 * All portions are Copyright (C) 2001-2006 Openbravo SL 
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
carlos@0
    25
<SqlClass name="ActionButtonDefaultData" package="org.openbravo.erpCommon.ad_actionButton">
carlos@0
    26
  <SqlMethod name="select" type="preparedStatement" return="multiple">
carlos@0
    27
    <SqlMethodComment></SqlMethodComment>
carlos@0
    28
    <Sql>
carlos@0
    29
      <![CDATA[
juanpablo@1605
    30
        SELECT NAME, DESCRIPTION, HELP FROM AD_PROCESS WHERE AD_PROCESS_ID = ?
carlos@0
    31
      ]]>
carlos@0
    32
    </Sql>
carlos@0
    33
    <Parameter name="adProcessId"/>
carlos@0
    34
  </SqlMethod>
carlos@0
    35
  <SqlMethod name="selectLanguage" type="preparedStatement" return="multiple">
carlos@0
    36
    <SqlMethodComment></SqlMethodComment>
carlos@0
    37
    <Sql>
carlos@0
    38
      <![CDATA[
carlos@0
    39
        SELECT COALESCE(PT.NAME, P.NAME) AS NAME, 
carlos@0
    40
        COALESCE(PT.DESCRIPTION, P.DESCRIPTION) AS DESCRIPTION, 
carlos@0
    41
        COALESCE(PT.HELP, P.HELP) AS HELP 
carlos@0
    42
        FROM AD_PROCESS P left join AD_PROCESS_TRL PT on P.AD_PROCESS_ID = PT.AD_PROCESS_ID
carlos@0
    43
                                      AND PT.AD_LANGUAGE = ?
juanpablo@1605
    44
        WHERE P.AD_PROCESS_ID = ? 
carlos@0
    45
      ]]>
carlos@0
    46
    </Sql>
carlos@0
    47
    <Parameter name="adLanguage"/>
carlos@0
    48
    <Parameter name="adProcessId"/>    
carlos@0
    49
  </SqlMethod>
carlos@0
    50
  <SqlMethod name="windowName" type="preparedStatement" return="multiple">
carlos@0
    51
    <SqlMethodComment></SqlMethodComment>
carlos@0
    52
    <Sql>
carlos@0
    53
      <![CDATA[
carlos@0
    54
        SELECT T.HASTREE AS HELP, W.NAME AS DESCRIPTION, T.NAME AS NAME 
carlos@0
    55
        FROM AD_WINDOW W, AD_TAB T 
juanpablo@1605
    56
        WHERE T.AD_TAB_ID = ? 
carlos@0
    57
        AND W.AD_WINDOW_ID = T.AD_WINDOW_ID 
carlos@0
    58
      ]]>
carlos@0
    59
    </Sql>
carlos@0
    60
    <Parameter name="adTabId"/>
carlos@0
    61
  </SqlMethod>
carlos@0
    62
  <SqlMethod name="getText" type="preparedStatement" return="String" default="">
carlos@0
    63
    <SqlMethodComment></SqlMethodComment>
carlos@0
    64
    <Sql>
carlos@0
    65
      <![CDATA[
carlos@0
    66
        select coalesce(tt.name, t.name) as name 
carlos@0
    67
        from ad_ref_list t left join ad_ref_list_trl tt on t.ad_ref_list_id = tt.ad_ref_list_id 
carlos@0
    68
                                                        and tt.ad_language = ?
juanpablo@1605
    69
        where ad_reference_id = ?
carlos@0
    70
        and value = (CASE TO_CHAR(?) WHEN '--' THEN 'CL' ELSE TO_CHAR(?) END)
carlos@0
    71
      ]]>
carlos@0
    72
    </Sql>
carlos@0
    73
    <Parameter name="adLanguage"/>
carlos@0
    74
    <Parameter name="adReferenceId"/>
carlos@0
    75
    <Parameter name="value"/>
carlos@0
    76
    <Parameter name="value"/>
carlos@0
    77
  </SqlMethod>
carlos@0
    78
  </SqlClass>