Thursday, December 23, 2010

ADF Model: Creating Date Effective EO

Date-effectivity is an excellent feature available in Jdeveloper 11g. To learn the basics of date-effectivity in ADF, please go through my post Learning basic of Date Effectivity in ADF. With Jdev 11g, we can create date-effective objects and do date-effective operations using simple API calls. Before going into all those details, the first requirement would be creating Date-Effective EO.

The first requirement to create a DE-EO based on a table, the table should have two date columns to represent Effective Start Date(ESD) and Effecitve End Date(EED) of the record and these columns should be marked as primary keys along with id column. In other words, we need to define a composite key based on the id column and ESD and EED columns.

Creating Date Effective EO is same as creating normal EO. In addition, we need to do the following steps to make it date-effective.
1. Mark the EO as Date Effective by specifying the attribute Effective Date Type = 'EffectiveDated'. You can find this property in 'General' tab property inspector.

This will generate a new transient attributte called 'SysEffectiveDate' in the EO. Please find the screenshot below:

2. We need to specify which columns represent effective-date columns by checking the Check 'Effective Date' check box and selecting 'Start' and 'End' radio buttons for the effective-date columns which represent Effective Start Date and Effective End Date. Find the screen shots below:


3. Optional: Change the data type of SysEffectiveDate attribute to 'java.sql.Date' from 'oracle.jbo.domain.Number'. We'll often find it easier with native Java sql data types instead of using Oracle's jbo datatypes. It is recommended to use java native sql type(java.sql.Date) for all date type attributes in the EO.

That's it. Now, your EO is date-effective and supports date-effective operations on it's rows.

29 comments:

  1. Hi there, thanks for article. Could you provide any insight into why when I try this, the efffective date radio box (in the property inspector of the attribute) is greyed and not selectable?

    ReplyDelete
    Replies
    1. Great Article. Looking great work dear, I really appreciated to you on this quality work. I would like say thanks for this post. Here are some useful links for stdudents all across the globe. These tips may help me in the future. A high-standard post with all imperative information.
      Final Year Project Domains for CSE
      IEEE Project Centers in Chennai





      JavaScript Training in Chennai
      JavaScript Training in Chennai

      Delete
  2. Ok just worked out this is because I am doing it with a view object rather than an Entity Objects. This raises the next question (and it might sound very stupid) why do you need entity objects?

    ReplyDelete
  3. @Simon: Entity Objects represent to tables in database. And, the core of ADF is based on EOs and VOs. Whatever the operations(create, update, etc.,) you perform will finally commit to DB via entity objects. You can go through http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcentities.htm#sm0124 for more info in Entity Objects.

    ReplyDelete
  4. Hi Murali,

    I have a simple query.
    When a new row is created, I understand framework is creating new duplicate row with updated fields. My requirement is to create the new row with just updated attribute values & not every value from base row.
    Is there a way to customize this ?
    Please let me know.

    Thanks.

    ReplyDelete
  5. Sapiens IAS offers flexible and results-oriented Best Anthropology Coaching Coaching for UPSC and IAS students through an online and offline training program by well known IAS trainer Mr. Pradip Sarkar.

    Call: 8700922126 || 011-2875 6962 || 9718354962
    Email: sapiensias@gmail.com
    Address: 17A/44, W.E.A. 3rd Floor, Near Karol Bagh Metro Station (Pillar No. 99), New Delhi- 110005.

    Read More at: https://www.sapiensias.in/course/anthropology-online-classes-upsc/

    ReplyDelete
  6. Wethecoders is one of the leading online assignment help services. wethecoders.com always take step towards your satisfaction. We work hard so that you can get good grades. Our prime motto is to help you to get good grades in your assignment, project and homework. Our team is professional and knowledgeable. We are here to help you 24/7. Try once to take the advantage of our services and we assure you that you will get surely the best result.

    Read More: http://www.wethecoders.com/java-project-help/

    ReplyDelete
  7. We are a global digital marketing company and IT solutions provider. We adept in digital marketing, including social media marketing and search engine optimization, as well as business consultancy services. We focus on our client’s business to help them escalate sales with the perfect mix of digital media.

    ReplyDelete
  8. We offer a large variety of high quality used and new tires. We have tires as per your need. Contact our Resource Centre, where we have expert teams that understand your vehicle needs and will guide you on what your vehicle wants.

    ReplyDelete
  9. Dr. R greatest accomplishment in his eyes is having passed down to his children what matters most in life in business: to always do the right thing and stand by what you do. Dr. R motto is, “customer service first”. Our difference… (family owned… family operated)… makes a difference.

    ReplyDelete
  10. Dr sees both men and women in her practice to help them regain their balance and bring back their vitality. Whether it is chronic fatigue, premenstrual syndrome, peri-menopausal or menopausal transition, weight gain, or overall hormonal imbalance, Dr. will treat you through a full range of healing options that works best for you.

    ReplyDelete
  11. The goal of Williamson Caterers is to meet and exceed our clients’ expectations and make certain that our clients’ enjoy their event as much as their guests.

    ReplyDelete
  12. With prices starting at just £3.99 - our starters are the perfect start to a meal at Khyber Pass. The distinctive flavour of our food cannot be described by words alone!

    ReplyDelete
  13. Stones and Cabinets City has swiftly become a market leader in kitchen and bath refurbishment because of our ethos. Our mission is to produce kitchen and bath cabinets of the highest quality and care, handmade by dedicated Stones and Cabinets City's staff.

    ReplyDelete
  14. We are a full-service trucking company established worldwide to add convenience and pace in freight transportation for commercial purposes.

    ReplyDelete
  15. Fame Jackets have so far served many of customers and thus we can claim to have customers wearing our jackets throughout the world. To make sure smooth and efficient shipping and delivery solutions Fame Jackets collaborate with the premium courier services working internationally.

    ReplyDelete
  16. World's Smartest email List Cleaning Service, Quick, simple and accurate. Bulk Mail Verifier will not only save you time but tons of money too!

    ReplyDelete
  17. 1xbet korean vn poker live odds, free to play
    1xbet korean vn poker live odds, free to play, 1xbet korean 2021-11-08, 1xbet korean vn poker live odds, free to play, 2021-11-08, 1xbet korean vn poker live odds, free to play, 제왕카지노 2021-11-04, 1xbet korean vn poker live odds, free to play, 2021-11-02, 1xbet korean vn poker live odds, free to play, 2021-11-02, 1xbet korean vn 바카라사이트 poker live odds, free to play, 2021-11-03

    ReplyDelete
  18. We import, manufacture & supply Tube Axial Fan for commercial/industrial ventilation & air conditioning systems. We are authorized dealers of HVAC equipment.

    ReplyDelete

Related Posts with Thumbnails