Hi Everyone in this post i will describe how to create SQL Query base View Object
This is the third post about Manually Creation of ADF Business Components and Types of View Object
in the previous part i have explain how to create AppModule
if you haven't seen yet please visit the following URL
http://adfindepth.blogspot.com/2016/06/manually-creation-appmodule-manually.html
To create Query base View Object
Right click on Model and select New
In the next window Select ADF Business Components from Categories and view object from Items and click OK
From next window write the name of view object , you can also set the Display name of the view object and select SQL Query Then Next
In next window write your Query (For this your connection must be establish with database)
Then to check your query press the button "Test and Explain"
if Test show successful then close the Test Query Window and click Next
In next window you can sat Bind variables if you need any , For now we have no need to define bind variables so just click on Next
In next window you can see the Mapping of Attributes , just Click on Next
In Attributes Window , just click on Next
In Next window you can set the Attribute Name , data types , set Alias for attribute
One important thing is from the window must select any key attribute its very important because with out selecting any key attribute view object not work properly
so i select EmployeeId as a key Attribute
In Next window you can generate Java classes for this view object , For Now we have no need so just click on Next
In next window you can select the AppModule under which you want to use this view Object
To slect the AppModule
Checked the "Add to Application Module"
click on Brows button and select AppModule and then click on Next
In next window you can see the summary of this view object , just click on Finish
You have successfully created new Sql Query base view object
To test this just Right Click on AppModule and select Run
Now Double on EmpQB1 , you can see the result
Second important thing is , it is not update able view object means you will not be able to perform DML operations on it , because it is Query base View object and you can just view the data...
Continue ................
To visit the next post please click on the following Link
http://adfindepth.blogspot.com/2016/06/static-list-base-view-object-manually.html
This is the third post about Manually Creation of ADF Business Components and Types of View Object
in the previous part i have explain how to create AppModule
if you haven't seen yet please visit the following URL
http://adfindepth.blogspot.com/2016/06/manually-creation-appmodule-manually.html
To create Query base View Object
Right click on Model and select New
In the next window Select ADF Business Components from Categories and view object from Items and click OK
From next window write the name of view object , you can also set the Display name of the view object and select SQL Query Then Next
In next window write your Query (For this your connection must be establish with database)
Then to check your query press the button "Test and Explain"
if Test show successful then close the Test Query Window and click Next
In next window you can sat Bind variables if you need any , For now we have no need to define bind variables so just click on Next
In next window you can see the Mapping of Attributes , just Click on Next
In Attributes Window , just click on Next
In Next window you can set the Attribute Name , data types , set Alias for attribute
One important thing is from the window must select any key attribute its very important because with out selecting any key attribute view object not work properly
so i select EmployeeId as a key Attribute
In Next window you can generate Java classes for this view object , For Now we have no need so just click on Next
In next window you can select the AppModule under which you want to use this view Object
To slect the AppModule
Checked the "Add to Application Module"
click on Brows button and select AppModule and then click on Next
In next window you can see the summary of this view object , just click on Finish
You have successfully created new Sql Query base view object
To test this just Right Click on AppModule and select Run
Now Double on EmpQB1 , you can see the result
Second important thing is , it is not update able view object means you will not be able to perform DML operations on it , because it is Query base View object and you can just view the data...
Continue ................
To visit the next post please click on the following Link
http://adfindepth.blogspot.com/2016/06/static-list-base-view-object-manually.html
Please Feel Free To Ask if you Face any Difficulty
Like and share to help others
Thanks
Date 10-06-2016
No comments:
Post a Comment