DBA Data[Home] [Help]

APPS.WF_ITEM_ATTRIBUTES_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 3

procedure INSERT_ROW (
  X_ROWID in out nocopy VARCHAR2,
  X_ITEM_TYPE in VARCHAR2,
  X_NAME in VARCHAR2,
  X_SEQUENCE in NUMBER,
  X_TYPE in VARCHAR2,
  X_PROTECT_LEVEL in NUMBER,
  X_CUSTOM_LEVEL in NUMBER,
  X_SUBTYPE in VARCHAR2,
  X_FORMAT in VARCHAR2,
  X_TEXT_DEFAULT in VARCHAR2,
  X_NUMBER_DEFAULT in NUMBER,
  X_DATE_DEFAULT in DATE,
  X_DISPLAY_NAME in VARCHAR2,
  X_DESCRIPTION in VARCHAR2
) is
  cursor C is select ROWID from WF_ITEM_ATTRIBUTES
    where ITEM_TYPE = X_ITEM_TYPE
    and NAME = X_NAME
    ;
Line: 24

  insert into WF_ITEM_ATTRIBUTES (
    ITEM_TYPE,
    NAME,
    SEQUENCE,
    TYPE,
    PROTECT_LEVEL,
    CUSTOM_LEVEL,
    SUBTYPE,
    FORMAT,
    TEXT_DEFAULT,
    NUMBER_DEFAULT,
    DATE_DEFAULT
  ) values (
    X_ITEM_TYPE,
    X_NAME,
    X_SEQUENCE,
    X_TYPE,
    X_PROTECT_LEVEL,
    X_CUSTOM_LEVEL,
    X_SUBTYPE,
    X_FORMAT,
    X_TEXT_DEFAULT,
    X_NUMBER_DEFAULT,
    X_DATE_DEFAULT
  );
Line: 50

  insert into WF_ITEM_ATTRIBUTES_TL (
    ITEM_TYPE,
    NAME,
    DISPLAY_NAME,
    PROTECT_LEVEL,
    CUSTOM_LEVEL,
    DESCRIPTION,
    LANGUAGE,
    SOURCE_LANG
  ) select
    X_ITEM_TYPE,
    X_NAME,
    X_DISPLAY_NAME,
    X_PROTECT_LEVEL,
    X_CUSTOM_LEVEL,
    X_DESCRIPTION,
    L.CODE,
    userenv('LANG')
  from WF_LANGUAGES L
  where L.INSTALLED_FLAG = 'Y'
  and not exists
    (select NULL
    from WF_ITEM_ATTRIBUTES_TL T
    where T.ITEM_TYPE = X_ITEM_TYPE
    and T.NAME = X_NAME
    and T.LANGUAGE = L.CODE);
Line: 87

    wf_core.context('Wf_Item_Attributes_Pkg', 'Insert_Row',
        x_item_type, x_name);
Line: 90

end INSERT_ROW;
Line: 107

  cursor c is select
      SEQUENCE,
      TYPE,
      PROTECT_LEVEL,
      CUSTOM_LEVEL,
      SUBTYPE,
      FORMAT,
      TEXT_DEFAULT,
      NUMBER_DEFAULT,
      DATE_DEFAULT
    from WF_ITEM_ATTRIBUTES
    where ITEM_TYPE = X_ITEM_TYPE
    and NAME = X_NAME
    for update of ITEM_TYPE nowait;
Line: 123

  cursor c1 is select
      DISPLAY_NAME,
      DESCRIPTION
    from WF_ITEM_ATTRIBUTES_TL
    where ITEM_TYPE = X_ITEM_TYPE
    and NAME = X_NAME
    and LANGUAGE = userenv('LANG')
    for update of ITEM_TYPE nowait;
Line: 138

    wf_core.raise('WF_RECORD_DELETED');
Line: 186

procedure UPDATE_ROW (
  X_ITEM_TYPE in VARCHAR2,
  X_NAME in VARCHAR2,
  X_SEQUENCE in NUMBER,
  X_TYPE in VARCHAR2,
  X_PROTECT_LEVEL in NUMBER,
  X_CUSTOM_LEVEL in NUMBER,
  X_SUBTYPE in VARCHAR2,
  X_FORMAT in VARCHAR2,
  X_TEXT_DEFAULT in VARCHAR2,
  X_NUMBER_DEFAULT in NUMBER,
  X_DATE_DEFAULT in DATE,
  X_DISPLAY_NAME in VARCHAR2,
  X_DESCRIPTION in VARCHAR2
) is
begin
  update WF_ITEM_ATTRIBUTES set
    SEQUENCE = X_SEQUENCE,
    TYPE = X_TYPE,
    PROTECT_LEVEL = X_PROTECT_LEVEL,
    CUSTOM_LEVEL = X_CUSTOM_LEVEL,
    SUBTYPE = X_SUBTYPE,
    FORMAT = X_FORMAT,
    TEXT_DEFAULT = X_TEXT_DEFAULT,
    NUMBER_DEFAULT = X_NUMBER_DEFAULT,
    DATE_DEFAULT = X_DATE_DEFAULT
  where ITEM_TYPE = X_ITEM_TYPE
  and NAME = X_NAME;
Line: 219

  update WF_ITEM_ATTRIBUTES_TL set
    DISPLAY_NAME = X_DISPLAY_NAME,
    DESCRIPTION = X_DESCRIPTION,
    SOURCE_LANG = userenv('LANG')
  where ITEM_TYPE = X_ITEM_TYPE
  and NAME = X_NAME
  and userenv('LANG') in (LANGUAGE, SOURCE_LANG);
Line: 233

    wf_core.context('Wf_Item_Attributes_Pkg', 'Update_Row',
        x_item_type, x_name);
Line: 236

end UPDATE_ROW;
Line: 238

procedure DELETE_ROW (
  X_ITEM_TYPE in VARCHAR2,
  X_NAME in VARCHAR2
) is
begin
  delete from WF_ITEM_ATTRIBUTES_TL
  where ITEM_TYPE = X_ITEM_TYPE
  and NAME = X_NAME;
Line: 251

  delete from WF_ITEM_ATTRIBUTES
  where ITEM_TYPE = X_ITEM_TYPE
  and NAME = X_NAME;
Line: 261

    wf_core.context('Wf_Item_Attributes_Pkg', 'Delete_Row',
        x_item_type, x_name);
Line: 264

end DELETE_ROW;
Line: 270

/* The following delete and update statements are commented out */
/* as a quick workaround to fix the time-consuming table handler issue */
/* Eventually we'll need to turn them into a separate fix_language procedure */
/*

  delete from WF_ITEM_ATTRIBUTES_TL T
  where not exists
    (select NULL
    from WF_ITEM_ATTRIBUTES B
    where B.ITEM_TYPE = T.ITEM_TYPE
    and B.NAME = T.NAME
    );
Line: 283

  update WF_ITEM_ATTRIBUTES_TL T set (
      DISPLAY_NAME,
      DESCRIPTION
    ) = (select
      B.DISPLAY_NAME,
      B.DESCRIPTION
    from WF_ITEM_ATTRIBUTES_TL B
    where B.ITEM_TYPE = T.ITEM_TYPE
    and B.NAME = T.NAME
    and B.LANGUAGE = T.SOURCE_LANG)
  where (
      T.ITEM_TYPE,
      T.NAME,
      T.LANGUAGE
  ) in (select
      SUBT.ITEM_TYPE,
      SUBT.NAME,
      SUBT.LANGUAGE
    from WF_ITEM_ATTRIBUTES_TL SUBB, WF_ITEM_ATTRIBUTES_TL SUBT
    where SUBB.ITEM_TYPE = SUBT.ITEM_TYPE
    and SUBB.NAME = SUBT.NAME
    and SUBB.LANGUAGE = SUBT.SOURCE_LANG
    and (SUBB.DISPLAY_NAME <> SUBT.DISPLAY_NAME
      or SUBB.DESCRIPTION <> SUBT.DESCRIPTION
      or (SUBB.DESCRIPTION is null and SUBT.DESCRIPTION is not null)
      or (SUBB.DESCRIPTION is not null and SUBT.DESCRIPTION is null)
  ));
Line: 311

  insert into WF_ITEM_ATTRIBUTES_TL (
    ITEM_TYPE,
    NAME,
    DISPLAY_NAME,
    PROTECT_LEVEL,
    CUSTOM_LEVEL,
    DESCRIPTION,
    LANGUAGE,
    SOURCE_LANG
  ) select
    B.ITEM_TYPE,
    B.NAME,
    B.DISPLAY_NAME,
    B.PROTECT_LEVEL,
    B.CUSTOM_LEVEL,
    B.DESCRIPTION,
    L.CODE,
    B.SOURCE_LANG
  from WF_ITEM_ATTRIBUTES_TL B, WF_LANGUAGES L
  where L.INSTALLED_FLAG = 'Y'
  and B.LANGUAGE = userenv('LANG')
  and (B.ITEM_TYPE ,B.NAME ,L.CODE) NOT IN
   (select /*+ hash_aj index_ffs(T,WF_ITEM_ATTRIBUTES_TL_PK) */
      T.ITEM_TYPE  , T.NAME,T.LANGUAGE
   from WF_ITEM_ATTRIBUTES_TL T) ;