To learn the basics of date-effectivity in ADF, please go through my post Learning basics of Date Effectivity in ADF. To learn how to create date-effective EO, please go through my post Creating Date Effective EO.
Creating Date Effective Association:
To have the basic idea of association between EOs, please go through my post ADF Model: Creating Entity Association. But, by default the association created is not date-effective. But, if you're creating association between two EOs in which at least on of them is effective-dated, then you should mark the association as 'Effective Dated'. To make the association date-effective,
1. Open Association -> Goto 'Relationship' tab -> Behavior -> Check 'Effective Dated Association' checkbox.
Marking the association 'Effective Dated Association' will take effective date into consideration while searching, inserting and updating the records.
Creating Date Effective VO:
Creating date effective VO is same as creating normal VO. In addition, we need to
1. Mark the VO as date-effective by setting EffectiveDated='true' for the VO. You can find this property in 'General' tab property inspector.
Specifying the above property for the VO will generate a new transient attribute called SysEffectiveDate in the VO.
2.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.
Marking the VO effective dated, will support date-effective updates for a single record.
Showing posts with label Association. Show all posts
Showing posts with label Association. Show all posts
Sunday, December 26, 2010
Thursday, September 9, 2010
ADF Model: Creating Entity Association
An Entity Association defines the relationship between two entities or EOs. Follow the below steps to create an entity association.
1. In Model project, right click on any package, select 'New Association'.
2. Now, 'Create Association' wizard appears -> In the 'Name' stop, Give Name for the Association, select/give package for the Association. The Association Name is generally follows the convention <SourceEO>To<DestinationEO>. E.g., DeptEOToEmpEO.
3. Click 'Next' -> In the 'Entity Objects' section, select the Source and Destination EOs and the attributes in Source and Destination EOs on which you want define the association.
4. Click 'Next' -> In the 'Assocation Properties' section, specify the properties if applies. For e.g., if the assocation is composite, check the box 'Composite Association'.
5. Click 'Next' -> In the 'Edit Assocation Query' section, verify if the where clause for the association generated is right. You can modify the query where clause if needed.
6. Click 'Next' -> 'Summary' displays the summary of the created association -> Click 'Finish'.
7. Now, you'll find the newly created Association in model project under the specified package.
8. Once, you create the association between EmpEO and DeptEO, Jdeveloper will add the association accessors in each of the EOs.
1. In Model project, right click on any package, select 'New Association'.
2. Now, 'Create Association' wizard appears -> In the 'Name' stop, Give Name for the Association, select/give package for the Association. The Association Name is generally follows the convention <SourceEO>To<DestinationEO>. E.g., DeptEOToEmpEO.
3. Click 'Next' -> In the 'Entity Objects' section, select the Source and Destination EOs and the attributes in Source and Destination EOs on which you want define the association.
4. Click 'Next' -> In the 'Assocation Properties' section, specify the properties if applies. For e.g., if the assocation is composite, check the box 'Composite Association'.
5. Click 'Next' -> In the 'Edit Assocation Query' section, verify if the where clause for the association generated is right. You can modify the query where clause if needed.
6. Click 'Next' -> 'Summary' displays the summary of the created association -> Click 'Finish'.
7. Now, you'll find the newly created Association in model project under the specified package.
8. Once, you create the association between EmpEO and DeptEO, Jdeveloper will add the association accessors in each of the EOs.
Subscribe to:
Posts (Atom)


