• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

create() in Home

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do Home interfaces necessarily declare at least one create() method for entity beans? What if I don't want to permit creation of new entities?

The same goes for remove().

Thanks,
Bojan
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The create() method in the entity bean home interface is optional. Making this method optional gives us the option of preventing the client from inserting data into the database.
The only one method, findByPrimaryKey(), that is required to put into the entity bean home interface.

The following two methods defined in the javax.ejb.EJBHome interface used by entity beans to delete/remove an actual entity in the database.

void remove(Handle handle) throws RemoveException, RemoteException;
void remove(Object primaryKey) throws RemoveException, RemoteException;


Thanks,
Mahesh

----------
SCJP 1.4 | SCWCD 1.4 | SCBCD 1.3 | SCEA Part I - In Progress
 
Your mind is under my control .... your will is now mine .... read this tiny ad
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic