• OAF_OAF Framework常用函数汇总(概念)


    2014-12-31 Created By BaoXinjian

    OAPageContext


    提供了应用程式上下文信息和客户端请求信息,当服务端接受到一个客户端请求后,OAF就实例化一个OAPageContext对象

    方法一:关于请求参数

    getParameterNames

    getParameter

    getParameterValues

    putParameter

    removeParameter

    getHttpAgent

    方法二:关于Form

    isFormSubmission

    getFormName

    方法三:关于重定向

    getCurrentUrl

    getForwardURL

    setForwardURL

    方法四:关于中间层

    getRootApplicationModule

    getApplicationModule

    方法五:关于数据对象

    getNamedDataObject

    方法六:关于ERP

    getEmployeeId

    getLoginId

    getOrgId

    getUserId

    方法七: 其他

    findChildIndex

    getLovCriteriaItem

    PutDialogMessage

    putTransactionValue

    getTransactionValue

     

    OAWebBean


    在处理Get请求时,OAF会便利页面上的所有webbean,调用每个webbeans的processRequest

    在处理Post请求时,分为两步

    Step1. Process Form Data

    根据关联的VO设置相应的Attribute,并执行属相校验

    调用VO的setAttribue方法初始化,并自动执行相关EO中的Set方法

    调用VO的validAttribue方法校验,并自动执行相关EO中的Valid方法

    任何校验的异常都会被捕获,并保存到页面的cache中,随页面显示,异常捕获后,OA不在往下执行processFormRequest

    Step2. Process Form Request

    ProcessFormData中没有产生异常的,OAF就会继续执行CO中的processFormRequest

    方法一、增加子元素
    addIndexedChild

    方法二、找取子元素

    findChildRecursive

    方法三、控制可视化

    setRendered

    isRendered

    方法四、设置HTML事件

    setOnClick

    setOnDoubleClick

    SetOnKeyPress

     

    OAViewObject


    用法语访问SQL执行后的结果集

    VO可以基于EO,可以基于手写的SQL

    一个EO可以定义多个VO,可以由多个EO定义一个VO

    数据缓存在EO中,相同事务的VO共享相同的缓存,一个VO的改变,其他VO也会马上得到信息,如果VO不是基于EO,底层数据库事务提交时,VO的数据也不会被更新

    方法一

    setMaxFetchSize

    executeQuery

    isExecuted

    CreateRow

    getCurrentRow

    getFetchedRowCount

    方法二

    getFilteredRows

    getFirstFilteredRow

    first

    last

    next

    previous

    方法三

    isPassivationEnabled

    isPreparedForExecution

    setPassivationEabled

    setPreparedForExecution

     

    OAViewObjectImpl


    方法一

    void afterCommit

    void afterRollback

    clearCache

    createRowSet

    getRowCount

    getFetchedRowCount

    fetchSize

    getAllRowsInRange

    方法二

    putTransientValue

    putValue

    getTransientValue

    getValue

    removeTransientValue

    removeValue

    方法三

    isLoggingEnabled

    remove

    setWhereClause

    setWhereClauseParam

    isDirty

    invokeMethod

    writerDiagnostics

     

    OAViewRowImpl


    是OAViewRow的实现类,用于访问VO的Row,Row代表从数据库中取出的一天记录

    getAttribute

    void validate

     

    OAEntiyImp


    真正的数据库持久对象,每个EO对象对于数据库表中的一条记录

    void create

    void validadateEntity

    void doDML

    getOADBTransaction

    getEntityState

    getPostState

     

    OADBTransaction


    方法一、常用操作

    getSequenceValue

    getCurrentD

    commit

    rollback

    方法二、与putValue相关,与OAViewObjectImpl的同名一样的功能

    putTransientValue

    putValue

    getTransientValue

    getValue

    方法三、与ERP相关

    getApplicationName

    getApplicationShortName

    getResponsibleId,ResonsiblityName等等

    getLoginId,UserId,UserName等等

    方法四、获取JDBC对象

    createCallableStatement

    createPreparedStatement

    createStatement

    方法五、其他

    checkCookie

    clearWorkflowInfo

     

    Thanks and Regards

  • 相关阅读:
    nodejs async waterfull 小白向
    nodejs async series 小白向
    MySQL 分区介绍总结
    cocos2d-x 一些实用的函数
    LeetCode(61)-Valid Palindrome
    ganglia错误解决
    (6)uboot具体解释——关闭缓存和mmu
    Linux下设置MySQL不区分大写和小写
    火狐与IE的7个JavaScript差异
    商业研究(8):汽车交通
  • 原文地址:https://www.cnblogs.com/eastsea/p/4195877.html
Copyright © 2020-2023  润新知