<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 6  文章 - 129  trackbacks - 0
    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(14)

    隨筆檔案(6)

    文章分類(467)

    文章檔案(423)

    相冊

    收藏夾(18)

    JAVA

    搜索

    •  

    積分與排名

    • 積分 - 825404
    • 排名 - 49

    最新評論

    閱讀排行榜

    評論排行榜

    How to create a Table

    http://wiki.openbravo.com/wiki/How_to_create_a_Table

    The new table must include the AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated and UpdatedBy fields that are mandatory and required for security and auditory purposes of the application. 

    Each table must have at least one column marked as an identifier. The actual values of identifier columns later get concatenated to be shown to the user as a representation of a particular record (see the link to the Sales Order within the Sales Invoice window). These identifiers will also be used to construct dropdown lists of records of that particular table. By default all columns with column name Name are set as an identifier. In case there is no column with this Name, no identifier is set and needs to be done so manually or compilation will fail. 

    NOTE: The columns that are named line or seqNo are used to contain the sequence number of a record (i.e. the number of a line in an invoice). They take a default value like:

    @SQL=SELECT COALESCE(MAX(ColumnName),0)+10 AS DefaultValue FROM TableName WHERE xxParentColumn=@xxParentColumn@

    The WHERE part of this clause needs to be replaced with the required values. The code that should appear here is the name of the column which links with the id of the parent one. For example, each record of the C_InvoiceLine belongs to a particular C_Invoice record and they are all sequenced. C_Invoice is the parent table for the lines saved in C_InvoiceLine. This table has a column named line and the default value that it takes is:

    @SQL=SELECT COALESCE(MAX(LINE),0)+10 AS DefaultValue FROM C_INVOICELINE WHERE C_INVOICE_ID=@C_INVOICE_ID@

    How to add Columns to a Table

    http://wiki.openbravo.com/wiki/How_to_add_Columns_to_a_Table


    These changes can be done in two different locations:

    1. Add columns to the original module (dbprefix HT)
    2. Create a second module (dbprefix HT2) which adds the columns to the first module

    The first option can be chosen if the original module author wants to add more columns to his/her module. The second option is possible for anyone as the columns are added by a new module to the existing one which is not changed directly.

    The main difference between these two methods is the names which need to be chosen for the columns to comply with the modularity naming rules.

    1. Adding column to same module: Any valid column name can be picked
    2. Via second module: New column name must comply to the pattern EM_<DBPREFIX>_ where <DBPREFIX> must be the dbprefix if the new module contaning the column to be added. In this example: EM_HT2_

    How to add a Constraint

    http://wiki.openbravo.com/wiki/How_to_add_a_Constraint

    In the Application Dictionary || Message window create a new record using the following details:

    • Module Openbravo Howtos 2 as this is the module containing the constraint also.
    • Search key: The search key must be exactly the same as the constraint's one, in this case em_ht2_ht_salary_dates_chk as this is the link between the constraint and the message.
    • Message type: Depending on the type the UI for the message box will be different (green for success, yellow for warning...), in our case we want a red error message box, so we select Error.
    • Message text: It is the user friendly message that will be displayed inside the message box. So let's enter: The Valid To date may not be before the Valid From date

     

     Creating a new instance of a Business Object

    http://wiki.openbravo.com/wiki/How_to_work_with_the_Data_Access_Layer#A_.27Hello_World.27_Example

    A business object may never be created using the Java new operator. All business objects should be created using the OBProvider factory class:

       // create the object through the factory   final Category bpg = OBProvider.getInstance().get(Category.class);

    Hibernate will detect that a business object is new when:

    • the id of the business object is not set
    • when the flag newOBObject is set to true explicitly

    So if you want to create a new business object with a specific id (by calling setId(...)) then you explicitly need to call businessObject.setNewOBObject(true). Otherwise, Hibernate will throw an exception ('count of batch update operation....'). 




    posted on 2013-05-03 09:23 Ke 閱讀(812) 評論(0)  編輯  收藏 所屬分類: Openbravo
    主站蜘蛛池模板: 国产精品免费精品自在线观看| 亚洲裸男gv网站| 日韩免费无码一区二区三区| 看成年女人免费午夜视频| 亚洲最大的黄色网| 久久久久亚洲精品美女| 久久亚洲国产精品五月天婷| 国产精品免费一级在线观看| 国产人成免费视频网站| 免费无码中文字幕A级毛片| 国产精品免费久久久久影院| 99亚洲男女激情在线观看| 亚洲乱码在线卡一卡二卡新区| 久久亚洲AV无码精品色午夜 | 91亚洲va在线天线va天堂va国产 | 最新久久免费视频| 夜夜爽妓女8888视频免费观看| 亚洲av无码专区在线观看下载| 久久亚洲最大成人网4438| 亚洲精品第五页中文字幕| 久久久久久久亚洲Av无码| 亚洲av日韩av不卡在线观看| 亚洲精品无码不卡在线播放HE | xxxxx做受大片视频免费| 国产亚洲午夜精品| 亚洲GV天堂GV无码男同| 亚洲av中文无码字幕色不卡| 亚洲中文字幕无码av永久| 在线综合亚洲欧洲综合网站| 亚洲综合久久精品无码色欲| 日韩亚洲国产高清免费视频| jiz zz在亚洲| 自拍偷自拍亚洲精品播放| 国产成人亚洲精品电影| 特级毛片全部免费播放| 国产裸体美女永久免费无遮挡| 精品熟女少妇aⅴ免费久久| 三上悠亚在线观看免费| 99精品视频在线视频免费观看| 67pao强力打造国产免费| A在线观看免费网站大全|