cancel
Showing results for 
Search instead for 
Did you mean: 

what is differencre iin entity and application service???

Former Member
0 Kudos

Hi all;

I do not understand the difference between application and entity service---

Both seems to be Entity beans

both have CRUD methods

we can call query also in both

Then what is the diference between the two?

Why do we need both of them ?

Please Help me to understand this concept

Tahnks

--Points assured for help

Accepted Solutions (1)

Accepted Solutions (1)

former_member4529
Active Contributor
0 Kudos

Hi Shobhendra,

Entity service represents the business objects. You can only add attributes to the entity services. The CRUD methods are automatically generated for the entity services and you can't change/delete/edit them. You can only add additional query methods to the entity services.

But in app services you can add any methods you like. And it's also possible to add custom logic to the app service methods. Within the app service methods you'll call the entity service's CRUD methods with some custom logic. So app service methods are required if you need to add custom logic over the CRUD methods of the entity service e.g. your entity service has a id field where you want to assign a sequence number, which the user won't fill up but generated automatically by some custom logic. You need to have a custom create method in your app service where you can implement this logic and call the entity service's create method.

Thanks,

Dipankar

Answers (1)

Answers (1)

ashutosh_rastogi
Active Contributor
0 Kudos

Check out this Blog

<a href="/people/ashutosh.rastogi/blog/2006/11/24/when-to-use-which-caf-service to use which CAF Service ?</a>

Hope this helps

Ashutosh