Sunday 29 May 2016

ADF Business Components Part 2 (Enity Object , View Objects , ApplicationModule )

Hi Every one This is the second Part  about ADF Business Components , if you don't have seen first one , here is the URL
http://adfindepth.blogspot.com/2016/05/adf-business-components-part-1-enity.html   


So in the part 1 we create Application Now in this post i'll show you how to create
Entity Object
Entity base View object
Association (relationship / link between two Entity Objects)
ViewLink (relationship / link between two View Objects)

Last time we end on this point


So Again Right click on Model and select new
Then select ADF Business Component from left side (categories) and Business Component form Tables from right side (Items) and click OK




In the next window just click on green color + icon and create connection


After  creating connection successfully just click on ok and ok from both the windows

then a new window will appear from where your can select Entity objects 
just click on Query and and move tables from right to left and then click Next


Then from the next window you can create View objects base on Entity object 
just select and move Entity object from left to right 



From the next Window you can create Query base View object (non update able) just click on Query and move tables from left to right and click Next



after that simply click on Next Next and Finish  

and you will create this view

-



So in the last pic i will assign a specific number of each component now i will explain one by one

1 = AppModule 
It control the navigation of data and sources
2 =
It is Query base non update able view object 
3= It is the Entity object of Employees table
4= This number 4 item is an Association , it means the link or relationship between two entity objects 
5 =  and number 5 show the view link , means link or relationship between two view objects

So at the end ADF frame work automatically create Associations and view links if you have created in data base level 
for example Employees and Departments tables has a relationship or master detail (The dept_id is used as a Foreign key in Employees table ) So For these two table Jdeveloper automatically create Association and view link 


On the other hand you can create Application level view links 


Please Feel Free To Ask if you Face any Difficulty 
Like and share to help others
Thanks
Date 29-5-2016

ADF Business Components Part 1 (Enity Object , View Objects , ApplicationModule )

Hi everyone This is my Second Post part 1, In my First post I simply describe  how you can create your first application by using JDeveloper 11.1.2.3.0, here is the link

http://adfindepth.blogspot.com/2016/05/how-to-start-with-adf.html


Today I'll describe the ADF Business Components (i just give you a basic overview )
ADF Frame Work bases on MVC (Model View Controller ) Model, So
 whenever we start a new Application the ADF Frame Work divide it into two projects
1) Model
2)View + Controller  = View Controller
Here I am just giving you an idea about the Model layer
Model Layer is Simply used to access the data from Database or other sources
Here in the model layer, we can apply simple Validations,  Constraints, and other business logic
We can perform customization (change view objects name, data types, and  so on.....)
Now the question is in ADF in what form we can access data
There is two simple things
1)  Entity Object
2) View Object

Basically, there are three main Main Business Components
1) Entity Object
2) View Object
3) AppModule
And further is
Associations
and View Links

Entity Object  is just the copy of the complete structure of the Database table in ADF 
(Complete Structure means all the attributes, data types, constraints )

For example, you have a table( Table name = Std_tbl) in the database with three attributes
id with data type number and primary key constraints apply on it
second one is name with data type String
and 3rd one is age with data type number
Now when you create an Entity object base on Std_tbl  table , it copies all the attributes with  all its constraints









And in Model Layer you can add more constraints with the help of tool


Secondly ViewObject
There are 4 types of View Objects
1) Entity Base
2) SQL Query base
3) Programmatic base
4) Static List

 View Object that are base on Enity Object are Update able
Means you can perform all type of DML operations on it (insert , delete ,update modify )
And View Object is used to display the data to end user

--> ApplicationModule
It control the data navigation and all connections

Now we create and Application and try to understand about these things
Please Run your jdeveloper click on File Menu and select new
Select Application from left side and Fusion Web Application From right side



Then Click your Application Name and Click next


Now the Next Window is to specify the name of Model Layer and press two time Next 

In Next Window specify the name of ViewController or leave it as default  and press Next , Next and Finsh

So you finally build Application 

Continue..........

url of  Second Part 




Please Feel Free To Ask if you Face any Difficulty 
Like and share to help others
Thanks
Date 29-05-2016







Wednesday 25 May 2016

How to Start with ADF

Hi every one today i am gonna show you how to Start working with  ADF (Application Development Frame work)

For this post i am using jdeveloper 11.1.2.3.0
To download jdeveloper visit the following URL.
http://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.html

To create your First Application in ADF just Run your Jdeveloper and follow these Steps

Run your jdeveloper



1) Click on File menu and Select new , A new Window will be appears in front of you



2) In this window select "Applications" from left side under Categories and "Fusion Web Application" from right side under Items and click on OK





3) In next window write your Application Name and select Directory Path (Directory Path means set path where you want to save your Application)
you can also set "Application Package prefix"  means create a new Folder or package under which your Apllication will be save (For detail about Packages i have a complete post please visit that )
For Now just Click on Next



4) Each Application in ADF has two projects (divide and conquer rule)
one is Model layer and other one is ViewController layer
The Next window is to set Name and Directory Path for Model layer , For now just fine with default setting , simply  click on Next



5) In next window you can set the package for Model project , just leave it as Default and click on Next



6)The next window is for to set ViewController name and directory (its second layer of Application)
simple leave it as default and click on Next


7) Next window will set the place for jave classes and beens in View Controller Layer you can change the "Default package name" or java source path but just leave it as default and Click on Finish


So finally you have set the place to work with ADF Business Components, After click on Finish in previous window your Application would be look like this



8)Now to Create ADF  Business Components ,Again Right Click on Model Layer and Select New


9) In next window select "ADF Business Components" from Categories and "Business Components Form Table " from items



10) In next Window to establish Connection with database Click on + icon , a new window will appear in front of you to configure a new database connection , after filling the required fields must click on "Test Connection" and if there is no error it shows success
then just click on OK , and again OK




11) From the new window you can select database tables as Entity Objects for that  Firstly click on "Query" Then select Departments and Employees table and move form left to right and click on Next


12)In next window you can select View Object that will base on Entity Objects
To create Entity Object base view objects just select and move Entity objects from left to right



13) In next window you can create Query base View objects , for that agin click on Qurery , select and move table from left to right (i just create Countries as a Query base View Object) , click Next



14) In next window shows the creation of Application Module , it helps to navigate between View objects , in this window just click on Next



15) In next window you can generate the diagram , if you want , but for now just click on Next


16) Next window shows the summary about your ADF Bussiness Components , just click Finish


17 ) Now just Right click on AppModule and select Run Then double click on EmpDeptFKLink
it will show Master Detail Relationship





Congratulation You have done ...!
In the next post I'll explain what is
Entity object
Entity base View object
Query Base view object



Please Feel Free To Ask if you Face any Difficulty 
Like and share to help others
Thanks
Date 25-05-2016


Query to get Business unit (ORGANIZATION_ID) Detail in oracle Fusion

  SELECT HAO.ORGANIZATION_ID AS BUSINESS_UNIT_ID,         HAOT.NAME,         HAO.BUSINESS_GROUP_ID,         HAO.EFFECTIVE_START_DATE,       ...