• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is the difference between finder and select methods?  RSS feed

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference between finder and select methods?
 
Vaithiya Sundaram
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Select method is NOT directly exposed to the client. Business methods will use select method.

A Find method is directly exposed to the client.


An ejbSelect method can be called while the bean instance is in the pooled state or ready state.

An ejbFind method can be called while the bean instance is in the pooled state only.
 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A Select method is NOT directly exposed to the client
What is the rationale behind it? I think a developer can indirectly expose select method to the client. For instance

public Foo getFoo(){
return selectFoo();
}
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finder methods are used to find OBJECTS.

Select methods can be used to select ATTRIBUTES of certain objects.

Nick
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!