Header Ads

How to Create Entity Object in JDeveloper

In today's- modern enterprise application consists of a frontend, user-facing part and a backend business service part. The frontend if made in web based architecture follows MVC (Model-view-Controller) pattern.Now we heard about this architecture but let me give you brief introduction about MVC.
The View layer is interacting with the user, displaying data as well as receiving updates and user actions. The Controller layer is in charge of interpreting user actions and deciding which screens are presented to the user in which order. And the Model layer is representing the backend business services to the View and Controller, hiding the complexity of storing and retrieving data.
view-->user interface..It may not be a web interface. It could be mobile,desktop application,PDA,ipad...I mean everything.
Model->logic storing business data and retriving the same.
Controller->controls the page flow.
There are several other frameworks available to work on ADF. But the Oracle Fusion Applications, arguably
the biggest enterprise application development effort ever undertaken by mankind is developed on SOA based architecture.
The ADF Architecture:
EO(Entity Object):EOs are object relational mapping.Relational tables are available in the application as java objects.We will have one EO for every database view.
EOs can cache information on Application server Which helps to balance load on database. entity objects are the middle-tier refection of database tables and database views, Associations are the refection of foreign key relationships between tables. An association represents a connection between two entity objects and allows ADF to relate data in one entity object with data in another. But if the database does not contain any foreign key , by binding feature of JDeveloper we can make association.
Entity object Java object that represents a row in a database table. It automatically handles data validation, storage and persistence.
Association Entity object associations define the relationships between two entity objects. The association can be read from defined database constraints or manually defined. Associations allow programmatic navigation between related objects to implement complex business rules as well as simplify building join queries over sets of related business data.
Now let me show you how to Create EO using JDeveloper
Step-1 Write click on your Model. You will get one pop up menu ..Select New option and click on it
Step-2 Select ADF Business Component Menu from left side menu.
Step-3 Search for Entity Object in the right side list. Click on  OK button.
Step-4- This is again an wizard to create EO. Provide EO name .
Step-5-Now it is time to provide the data source…We can provide data through two ways--
  • Database Schema Object
  • Service Interface
For the first option-Database Schema Object you can browse schema object .
Step-6 Click on Browse button to explore database.
Objects can be-
  • Table
  • Views
  • Synonyms
  • Materialized view
Step-7 Select one Database schema from drop down and select Object option for this test purpose I will select Table. Click on Query
Step-8- Select the correct table and click on OK button.Click on Next
Step-9- This will open up Attribute table.Click on Next
Step-10 This will open up Attribute setting page. Here you can define for this Entity object What will be primary key and select primary key for required field and click on Next.
Step-11  This is an optional step to provide any java class to add custom behavior. Add Bean here or click on Next.
Step-12 This step is to create View Object and add Application module.Any EO is not attached to Application module or not exposed to Application module will not be accessible !!
Step-13 For this tutorial we will not attach VO and Application module.Click on Next. This will open up Summary page . Click on Finish your Entity Object.
Bingo !!!! We have created the first Entity object. You can see the EO inside model,
The details can be found right side in the TestEO.xml format.
You can change any settings here.

Technorati Tags: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Windows Live Tags: Create,Object,JDeveloper,enterprise,user,architecture,Model,Controller,introduction,View,layer,data,actions,services,interface,logic,Oracle,Fusion,development,effort,Relational,objects,database,cache,Application,server,tier,Associations,relationships,connection,Java,validation,storage,persistence,Association,navigation,rules,Step,Write,menu,Select,option,Component,Search,Click,Provide,Schema,Service,Browse,Table,Synonyms,purpose,Query,Attribute,Here,custom,behavior,Bean,module,tutorial,Summary,Finish,Bingo,TestEO,constraints,frontend,backend,refection
WordPress Tags: Create,Object,JDeveloper,enterprise,user,architecture,Model,Controller,introduction,View,layer,data,actions,services,interface,logic,Oracle,Fusion,development,effort,Relational,objects,database,cache,Application,server,tier,Associations,relationships,connection,Java,validation,storage,persistence,Association,navigation,rules,Step,Write,menu,Select,option,Component,Search,Click,Provide,Schema,Service,Browse,Table,Synonyms,purpose,Query,Attribute,Here,custom,behavior,Bean,module,tutorial,Summary,Finish,Bingo,TestEO,constraints,frontend,backend,refection
Blogger Labels: Create,Object,JDeveloper,enterprise,user,architecture,Model,Controller,introduction,View,layer,data,actions,services,interface,logic,Oracle,Fusion,development,effort,Relational,objects,database,cache,Application,server,tier,Associations,relationships,connection,Java,validation,storage,persistence,Association,navigation,rules,Step,Write,menu,Select,option,Component,Search,Click,Provide,Schema,Service,Browse,Table,Synonyms,purpose,Query,Attribute,Here,custom,behavior,Bean,module,tutorial,Summary,Finish,Bingo,TestEO,constraints,frontend,backend,refection
Powered by Blogger.