ADF Model Entity Object (EO)

Complete Oracle ADF 12c Course for Beginners ADF Business Components (Model Layer)
18 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.24
List Price:  €96.07
You save:  €28.82
£55.68
List Price:  £79.55
You save:  £23.86
CA$100.66
List Price:  CA$143.82
You save:  CA$43.15
A$111.82
List Price:  A$159.75
You save:  A$47.93
S$94.88
List Price:  S$135.55
You save:  S$40.66
HK$543.79
List Price:  HK$776.87
You save:  HK$233.08
CHF 62.67
List Price:  CHF 89.54
You save:  CHF 26.86
NOK kr792.28
List Price:  NOK kr1,131.89
You save:  NOK kr339.60
DKK kr501.55
List Price:  DKK kr716.53
You save:  DKK kr214.98
NZ$123.71
List Price:  NZ$176.74
You save:  NZ$53.02
د.إ257.07
List Price:  د.إ367.25
You save:  د.إ110.18
৳8,328.16
List Price:  ৳11,897.89
You save:  ৳3,569.72
₹5,958.01
List Price:  ₹8,511.81
You save:  ₹2,553.80
RM314.25
List Price:  RM448.95
You save:  RM134.70
₦108,236.03
List Price:  ₦154,629.53
You save:  ₦46,393.50
₨19,398.69
List Price:  ₨27,713.60
You save:  ₨8,314.91
฿2,394.21
List Price:  ฿3,420.45
You save:  ฿1,026.24
₺2,465.01
List Price:  ₺3,521.60
You save:  ₺1,056.58
B$426.13
List Price:  B$608.79
You save:  B$182.65
R1,290
List Price:  R1,842.93
You save:  R552.93
Лв131.30
List Price:  Лв187.58
You save:  Лв56.28
₩101,582.03
List Price:  ₩145,123.41
You save:  ₩43,541.37
₪254.54
List Price:  ₪363.65
You save:  ₪109.10
₱4,098.92
List Price:  ₱5,855.86
You save:  ₱1,756.93
¥10,967.38
List Price:  ¥15,668.35
You save:  ¥4,700.97
MX$1,406.50
List Price:  MX$2,009.38
You save:  MX$602.87
QR254.06
List Price:  QR362.96
You save:  QR108.89
P963.25
List Price:  P1,376.14
You save:  P412.88
KSh9,053.20
List Price:  KSh12,933.70
You save:  KSh3,880.50
E£3,568.78
List Price:  E£5,098.48
You save:  E£1,529.69
ብር8,687.63
List Price:  ብር12,411.43
You save:  ብር3,723.80
Kz64,250.82
List Price:  Kz91,790.82
You save:  Kz27,540
CLP$69,297.02
List Price:  CLP$99,000
You save:  CLP$29,702.97
CN¥510.87
List Price:  CN¥729.84
You save:  CN¥218.97
RD$4,243.89
List Price:  RD$6,062.96
You save:  RD$1,819.07
DA9,435.69
List Price:  DA13,480.14
You save:  DA4,044.44
FJ$162.05
List Price:  FJ$231.51
You save:  FJ$69.46
Q536.99
List Price:  Q767.16
You save:  Q230.17
GY$14,580.66
List Price:  GY$20,830.41
You save:  GY$6,249.74
ISK kr9,757.30
List Price:  ISK kr13,939.60
You save:  ISK kr4,182.30
DH701.41
List Price:  DH1,002.06
You save:  DH300.64
L1,291.33
List Price:  L1,844.84
You save:  L553.50
ден4,135.36
List Price:  ден5,907.91
You save:  ден1,772.55
MOP$557.92
List Price:  MOP$797.07
You save:  MOP$239.14
N$1,283.07
List Price:  N$1,833.03
You save:  N$549.96
C$2,564.57
List Price:  C$3,663.83
You save:  C$1,099.26
रु9,479.94
List Price:  रु13,543.35
You save:  रु4,063.41
S/259.51
List Price:  S/370.75
You save:  S/111.23
K282.61
List Price:  K403.75
You save:  K121.13
SAR262.99
List Price:  SAR375.71
You save:  SAR112.72
ZK1,928.73
List Price:  ZK2,755.44
You save:  ZK826.71
L334.62
List Price:  L478.06
You save:  L143.43
Kč1,690.23
List Price:  Kč2,414.72
You save:  Kč724.49
Ft27,882.67
List Price:  Ft39,834.10
You save:  Ft11,951.42
SEK kr772.23
List Price:  SEK kr1,103.23
You save:  SEK kr331
ARS$71,547.27
List Price:  ARS$102,214.77
You save:  ARS$30,667.50
Bs481.59
List Price:  Bs688.02
You save:  Bs206.42
COP$305,890.51
List Price:  COP$437,005.17
You save:  COP$131,114.66
₡35,162.35
List Price:  ₡50,234.08
You save:  ₡15,071.73
L1,769.11
List Price:  L2,527.41
You save:  L758.30
₲543,432.39
List Price:  ₲776,365.26
You save:  ₲232,932.87
$U3,131.93
List Price:  $U4,474.38
You save:  $U1,342.44
zł286.59
List Price:  zł409.44
You save:  zł122.84
Already have an account? Log In

Transcript

Hello, last video, we have connected developer with database and now the developer and database are ready to start creating ADF application from this video I will start working on it a business component some other layer I think you remember this short I wish I took before about it. Now are you focused for a couple of upcoming videos on model layer? So I will talk about entity object in detail. Then I will talk about view object in detail and application modules. There are two more components like cold Association and view link. I will talk about it as well in detail.

So, first thing now I will talk about it this way You is entity object. So Let's now move to developer and start working on ADF application. Let us now create a new application ADF application. Okay. It's your PDF application, I will call this application called HR ADF application. As I said before, Jennifer Barone automatically create to project first the project for the model.

This model which I will talk about it, we should talk about it business components, like entity object view object application modules Association and a few links. And the second project is view control controller, which is talking about the user interface GCF pages and interfaces components as a page editor. fiscal flows and so on. Next finish After you create the PDF application, the first step you have to do is to create some other. So, in EDF application once you created the application, you should create an EDF model but before you created a model you have various database should be ready. So, now let us now create a model pointed to the HR schema and start working on it.

So, here I will right click in the model and select business components from tables. I will look up to the HRT connection which we already created. I will copy the connection so, this is a connection which is a model we'll deal with okay. As I say before the first component of the if business component is a model is an entity objects. So I will put this in the package called eo two was the entity object on it. I press query to get all the tables in this connection, it's your connection.

This now create one entity called departments. Okay, next Nicolas, this is a view object we can create this view object as well for now. So I will create it is a package called model to and I will select the department's view Nick is this is another type of view object. I will talk about it later. Now. This is application modules.

Nick is Nick is Nick is Finish okay. So, let's discuss this view controller now we are working on their model layer okay as I said in the model layer, model layer has five components, first component is entity objects, second one is view object third one is application module and there are two more components I will talk about it later is associations and view link. Once you aware about these five components, you will be aware about the old if business component model. In this video, I will talk in detail about entity object. As I said before the entity object is you can consider it as a table So, each table database should map to the entity object. So this entity object is mapped to which table how we will know in the general what you find here in schema object, it does departments so it points to the department's table.

For each table, you will have this open the department's table here. You will have some column, we can go see the data if you want. department ID, department name manager ID Manager, location ID is the entity object in the attribute you will find the column here for column it will create attribute for each column. We call this attributes in the entity object and it will take the same data type of the column so if the department is numeric department department ID is a numeric what we name is our core measure number Location is a number you will find here gt will automatically create attribute with the same datatype which found here in the database. So, entity object is a table and attribute is a column of that table. Okay.

So what can we do in this entity object? What is the feature or what is the thing is in as an ADF application can do in this entity object. Let's talk about one by one first one. Here, you will find here something called alternative or alternate keys. Alternate keys it is if you want to mark a column one column is a database to be a key, but actually it is not a primary key. As you can see here is a database the department Or the column called department ID is a primary key okay of that table this is a primary key, but at the same time you want the department name should not be repeated you don't want this department name to be repeated as a key.

So, you can define here it as alternate key. So, you just press Add and I need to say this department name should not be repeated as well. In it a business component, you can define all business rule on all constraints and own all validation is that for the table, even this validation is not exist in the database level. So maybe the department table has no constraint at all. It is just like a table. There is no validation nothing at all, but you can put all validation you want is that entity level.

So, here I tells a framework that if the user try to insert a new row or update a current existing row with a department name already exist, you just give me a validation error. So this is the fairest Thank you can do is the entity object so the first thing is you can create alternate keys I will just go with a mean mean things okay for for tunings, we don't do anything and just Unix on the rest of the thing is just here. Just in general, you will know what's the table and you can find alternate key. But defined alternate key alone is not enough you have to define business rule for this alternate key. So I will talk about the business rules. business rules is the most important thing is the entity object.

From this tab, you can define A validation for this table there are two type of validation validation in the attribute level or a column level or validation in the old entity level. There are a breed defined business rule a it f has a predefined business rule and it will make easy to add a validation. So, now we create alternate key after you can use alternate key you have to go business rule and this is will be entity validation because this is not related to a specific column not related to a specific entity, this is general in the general entity. So, you just right click and you can add new validator and from the type you will find some alternative type I will talk about this later. So, what we have we have a unique key and you will find your alternate key. You just write a failure or error message If the user tried to add a department name, which is already exist, so you can say this deport mean name is already exists.

For example, this is Aramis. That's it. So, you add a validation in the entity whole entity level, this validation is a unique key validation boy into to you alternate key c user is a very simple there is no code at all. So, if in your ADF application want a specific table to be in one column was a specific table to be a unique you can come to the entity object which map to that table and you can create alternate key. Also they can be composite. You can see for example, the birth committee name and the location ID should be unique Both of them not only they're working with name so you can add any altona key as you want.

So, this is the first one second is attributes, its attributes there are a lot of things you can do in the attribute level or the column level in the case. For example, here let's talk about take select one of the attributes you will find here from some department he has this key sign it means this is a primary key and you will find here it is automatically mandatory. So no user has to SIDS the department ID before it insert. Here, what is the column which is this attribute is mapped to and the data type. As you can see here, updatable is always you can have here, never update, updatable at all or while new. Most of the times are primary should be while new while new it means once a user can create a new row for the departments, the department ID will be open as a field will be open to that the user can enter the department ID.

But once the user save and commit the changes to the database, he will not be able to update this value anymore. This is the thing is I will show you once we can eat a beach and I can show you all these kind of things. Here in UI you can give a label. So once a user use this view object or this entity object in the page, you will find the label behind or beside the field. For example, you can here say to bar meant ID you can see here Name Manager Location something like this you can give a label or a text on the for each attribute. This is for the attribute level.

You'll find here a validation rule for attributes even as I sit here as a business rule validations attribute you can do it from here or you can do it from here. So, for example, in the department name, you will find there are two rules already defined coming from the database, which is it is a mandatory and the value should be around 30. Characters what what else you can do here, you will find here some other validation rule. If you want to add a regular expression, it should match for example, if you have email Or something like this you can say it should emit has this says format to be validated or if you have a phone number you can use this better. So, you can define a regular expression for a specific column or a Pacific attribute you can be arranged if it is value it is integral value or double value you can say the minimum value should be 20 and the maximum should be for example 100 So, if the value out of this range you should write an error message okay.

So, you will define this range is defined the list it should be in this list only the user can add some lists only like for example, should be in between this list some signal exists and if the value is not in this list, you can add an error message here. There are a method if you need to make some customization we will call about programmatic and later, but this is if you want something programmatic It's another compare if you say the value should equal to exhibition or another attribute in some other view object or the query result you can write a select statement and if the value is not in say is selected statement result you will place error. So, as there are a lot of predefined validation in the attribute level you can you can defined and this is one of the most important feature and entity object.

So, in EDF application if if application if you want to add some validation in a specific field you should do it in the entity object. You just select it select the business rule and see sit your validation This is insane attribute third one is a business rule as I said there are two level of business rule one in the entity level and one in the attribute level is the entity level you can add something like unique as we say before or has the same attribute but this is will be in the whole entity living for example, if you have started date at the end date in the table and you want indeed it to be always greet or send start date. So, you should say here, select the attribute and compare results and other attribute and select a lot of it and so on here Here you will do all these kinds of things we will show it later, but I just want to know what is what you can do in entity object, what what exactly used for this object is used for.

So, in the entity object, so most of Important thing we will use is attribute level as a business rule. And Java will be used if you do want to do something programmatic. There are dedicated sections for all programmatics in RDF. And this is you need to add this view accessor and business event Forget it. So, this is the most three tabs you will use, and the entity object, attribute business rule and Java. For this video, I'll give you a quick explanation about entity object.

I will come back again to this entity object. Why did we create a beach so that you will be able to see the change and you manage to see the change so the next video, let us create a new page and we can make some change in that attribute and run and see how it will affect in the beach. 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.