Association and View Link

Complete Oracle ADF 12c Course for Beginners ADF Business Components (Model Layer)
16 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€67.09
List Price:  €95.85
You save:  €28.75
£55.67
List Price:  £79.54
You save:  £23.86
CA$100.61
List Price:  CA$143.73
You save:  CA$43.12
A$111.94
List Price:  A$159.93
You save:  A$47.98
S$94.87
List Price:  S$135.54
You save:  S$40.66
HK$544.46
List Price:  HK$777.83
You save:  HK$233.37
CHF 62.54
List Price:  CHF 89.34
You save:  CHF 26.80
NOK kr792.28
List Price:  NOK kr1,131.88
You save:  NOK kr339.60
DKK kr500.54
List Price:  DKK kr715.08
You save:  DKK kr214.54
NZ$123.72
List Price:  NZ$176.75
You save:  NZ$53.03
د.إ257.07
List Price:  د.إ367.26
You save:  د.إ110.19
৳8,361.37
List Price:  ৳11,945.33
You save:  ৳3,583.95
₹5,945.38
List Price:  ₹8,493.77
You save:  ₹2,548.38
RM315.51
List Price:  RM450.75
You save:  RM135.24
₦108,452.30
List Price:  ₦154,938.50
You save:  ₦46,486.20
₨19,476.23
List Price:  ₨27,824.38
You save:  ₨8,348.15
฿2,393.75
List Price:  ฿3,419.79
You save:  ฿1,026.04
₺2,463.20
List Price:  ₺3,519.01
You save:  ₺1,055.81
B$425.95
List Price:  B$608.53
You save:  B$182.58
R1,281.50
List Price:  R1,830.80
You save:  R549.29
Лв131.12
List Price:  Лв187.32
You save:  Лв56.20
₩101,234.93
List Price:  ₩144,627.53
You save:  ₩43,392.60
₪255.76
List Price:  ₪365.39
You save:  ₪109.63
₱4,117.86
List Price:  ₱5,882.91
You save:  ₱1,765.05
¥10,950.28
List Price:  ¥15,643.93
You save:  ¥4,693.65
MX$1,405.25
List Price:  MX$2,007.58
You save:  MX$602.33
QR255.07
List Price:  QR364.41
You save:  QR109.33
P967.09
List Price:  P1,381.63
You save:  P414.53
KSh9,046.20
List Price:  KSh12,923.70
You save:  KSh3,877.50
E£3,561.31
List Price:  E£5,087.81
You save:  E£1,526.49
ብር8,934.81
List Price:  ብር12,764.56
You save:  ብር3,829.75
Kz64,250.82
List Price:  Kz91,790.82
You save:  Kz27,540
CLP$69,230.60
List Price:  CLP$98,905.10
You save:  CLP$29,674.50
CN¥510.67
List Price:  CN¥729.56
You save:  CN¥218.89
RD$4,260.81
List Price:  RD$6,087.13
You save:  RD$1,826.32
DA9,439.27
List Price:  DA13,485.25
You save:  DA4,045.98
FJ$162.13
List Price:  FJ$231.62
You save:  FJ$69.49
Q539.13
List Price:  Q770.23
You save:  Q231.09
GY$14,638.94
List Price:  GY$20,913.67
You save:  GY$6,274.72
ISK kr9,737.70
List Price:  ISK kr13,911.60
You save:  ISK kr4,173.90
DH704.21
List Price:  DH1,006.07
You save:  DH301.85
L1,285.64
List Price:  L1,836.70
You save:  L551.06
ден4,129.86
List Price:  ден5,900.06
You save:  ден1,770.19
MOP$560.15
List Price:  MOP$800.26
You save:  MOP$240.10
N$1,288.20
List Price:  N$1,840.36
You save:  N$552.16
C$2,574.79
List Price:  C$3,678.42
You save:  C$1,103.63
रु9,517.84
List Price:  रु13,597.49
You save:  रु4,079.65
S/260.55
List Price:  S/372.23
You save:  S/111.68
K283.74
List Price:  K405.36
You save:  K121.62
SAR262.92
List Price:  SAR375.62
You save:  SAR112.69
ZK1,936.44
List Price:  ZK2,766.46
You save:  ZK830.02
L333.95
List Price:  L477.10
You save:  L143.14
Kč1,686.22
List Price:  Kč2,408.98
You save:  Kč722.76
Ft27,781.13
List Price:  Ft39,689.03
You save:  Ft11,907.90
SEK kr772.16
List Price:  SEK kr1,103.13
You save:  SEK kr330.97
ARS$71,509.21
List Price:  ARS$102,160.40
You save:  ARS$30,651.18
Bs483.51
List Price:  Bs690.76
You save:  Bs207.25
COP$305,137.08
List Price:  COP$435,928.80
You save:  COP$130,791.72
₡35,302.85
List Price:  ₡50,434.81
You save:  ₡15,131.95
L1,776.18
List Price:  L2,537.51
You save:  L761.33
₲545,595.73
List Price:  ₲779,455.88
You save:  ₲233,860.15
$U3,131.93
List Price:  $U4,474.38
You save:  $U1,342.44
zł286.05
List Price:  zł408.66
You save:  zł122.61
Already have an account? Log In

Transcript

Hello, in ADF business component zamata layer, we talk about the entity object view object and we talk about application modules. So, we almost cover the model layer components. The only missing two boys is Association and view links. This is two simple components. I will talk about it this video. So let's go back to the developer and see what is Association and what is view link.

Okay, so now we cover entity object view object application modules. In this video I will talk about Association what is Association association is the relation between two entities So, if you have two entity and you want to make some link between both of them you would create an association This is the association what it is symbol. So, if you have a department's entity list create now a new entity called employee entity map to the employee table and try to create some connection between both of these. So, how you will create an entity object right click new entity object as I said before, entity object is a table is mapped to a table. So here he will ask you what is the schema object what is the table you will you are mapped to I will map this to the entity Okay. Next, this is all attributes of the entity Yes.

So all the information was an attribute okay. Ok. So, next here if you ask you if you want to create a view object based on this entity or not, and if you want to add this view object is application module or not. So, this is just to simplify instead of you create the view object. So, I will not create it and I will do it manually. So, that you will be able to see it but in generally I would just get it straight away here and write the package name, but let me create it manually So, that you would be able to see how to create this Next and Finish Okay, so, as you can see, the whole association is automatically created, but anyway I will create it again, because there are already in the database level, draw a link between the ultimate and the will is this Why he wants to create the entity and buoy it automatically creates a substitution because it reads it from the database.

But let me delete all of this assistant and I would create it manually so that you would be able to see how to create Association. Let's lead this okay and this leads us I prefer that the base can have no links, no constraint, nothing just to blame tables, and you can add the own validation and links in a business component delivery. So now we have a department and we have employee as you can see here, St. Louis has a department ID. So there are a connection between department and employee department like a monster and in bill we it like a detail So, if you want to create a link between both of these two entities this link called Association so let's just create association between both of these two entity. So I will create a new or view link okay there is Association easier Association okay.

So I can say depart meant as am we okay this is a session. So you will find here is it is one to many relation you will find here is entity object in the right and into the objects listed in the left. So, I will say the department ID here will map to the department ID Enza Enki This is the link or you will add a link say one to many From the department ID it has a list of employees and this is attribute as employees which is a foreign key for the departments. So, this is the association. Next, Next Next thing is finished now we are creating the association between department and employee. So, what this the reason why you we are creating this association between two entities, actually we use it in tourism, we need an association between entity not that much important.

The link in between is much important why we'll talk about it later. So, for association is a link between two entity object. We use it in two reasons. First one is in a programmatic way if you if you are in the monster and you want to get List of the employees you can get it from Association straightaway or if you are in the employee and need to get the parent of this employee from Association, you will be able to it this is when in the programmatic way you will able to use Association. The second reason association is you can create a view link based on Association as we will see now, but for now, you should be able to know that association is the links between the link between two entity objects. We will go now for the view object level and I need to make some relation between two view object this relation or link called view link.

This is the fifth component of ADF business components. So, the first component we took with entity object second component is a view object 30 components is application module for the component Is Association fifth component and the last component is view links. So, view links is a relation between view objects and this is a one of the most important things you will use to create like a master detail if you have master detail in the page as we will see it now you will use a view neck. So, let's now create a view object we have now with the button interview object but we don't have a inventory view object you have to you you you have two options to create department or sorry in between view based on employee entity, you can right click in on the entity and you can create a new default view object.

In that case, it will create a view object based on this entity or you can carry it You view object and you can select as an entity here. So you have two ways you can create view object based on entities whatever suits you. So are you just right click on the entity object and the new default view object and I will add it is the vo package, okay and this is name. So it will create a view object based on entity. If you open the entity you will find this base entity, that's fine. So let's now create a view link between departments and inventory.

Because this view link will make you able to create master detail in the page. So I will right click new view link. So I can say the link Okay because of your creating view link, you will find retrieval will automatically get a list of the view Object Mode into the object list of the view object IDs all right and lifts the relation between one to many. So I will say department ID in the we department right you can make something like this so you can say I need a relation between departments and in Bluey. To be from the department ID I need to get two filters MPV from department ID foreign key, this is one option. But I didn't recommend it this if you have Association, so, you can carry it to you link like this as a solution.

It will work fine, no problem. Or you can use Association as a view link, so you create an assistant And you already mapped the department ID to the department IDs employee. So if when you create a unique you can select the association in the state of Surrey selecting the attribute itself to exist you can select as usual what is the benefit of this as I said in one entity object you can create multiple view objects. So if you make any change in association link, it will map automatically to all other view object view links. So now I have a link between two view objects but I select the association okay nickers nickers nickers nickers to finish. So now we are creating a view link between the birth meant and the inventory.

If you don't know the relation, you can open the department view link and you can go there relationship you will find it is metros Association. Once you will Association closer relationship you will know it is departments department ID map to embroidery department ID set you will be able to know what is this view link point to. Now, after you create a view link we need to use a master detail using this view link. So, as I said the the way which you control the view object is application module. So, we will back to the application module here and we need to add a master detail. So, we have a department we expected we can have an MPV beside a under it, so, you will find here when we why it is appear here like this because we carry it via link without view link you will not see this hierarchy this three so what you can do you can select the employee which is under the department and syndicated the worth of it as a table and Shorter it like this.

So we have a device which is like a monster and we like it. So here is the control you will find the department when you extract your funds the employees who have a master detail now, you you can see this because of we are creating view link if you remove the view link you will not see this, you can able to create this master detail. So in the page, you can easily drag let's create another tab. Okay with the burgers his master detail. All you need to do is just drag the detail or if you want to direct one by one just fine or you can drag the details here. Select the master detail I need muscle to be for and details to be table okay.

So, you can run. So, how we can create this is a way how you can create master detail is a relation between view objects and called view link relation between equal Association. You can see here the MBE for the department. Next, you will find the middle ear for the thickest you can navigate and see master detail like this. This is how to implement master detail using a view object link. Now, we are covering All it is business component, I will summarize it modal layer, model layer as I said before, it has five components.

First one is an entity object and the entity object is mapped to the table in the database. Second one is a view object as there are four types of view object view object can be based on the entity object. In this case, the user who uses view object in the page can insert update delete, or it can be just a list of value or just the query read only view object or static view object has static value or programmatic. This is a second component in the ADF business component. third component is application module and we see the application module like a gate will control the view object instance and he can decide whichever object will be used in the future few layer. He can control a master detail he can control the old innocence He can cite witchiness and use whichever view criteria Plus he can configure the data connection data source and in connection related to the bullying and data connection.

Third, you can see can test it, this is a view object before you use it in the beach. This is the third component, fourth component we talk about is Association association is just a link between two entity object. last component the fifth component is a view link view link is Association also is the link between two view objects. Link can be business tuition or can be a standalone not depending on the association. So this is the five components we cover in the ADF model that Score next video, I will move to the view controller and we will start talking about sub pages and say you all so see you next video

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.