O'Reilly logo

J2EE™ Applications and BEA™ WebLogic Server™ by Sandra L. Emerson, Rob Woollen, Michael Girdley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Entity Bean Inheritance and Polymorphism

Inheritance is a key advantage of object-oriented systems. Objects in a hierarchy gain functionality from their parents or superclasses. Object-oriented systems also generally provide polymorphism, the capability to define common operations across distinct types. EJBs, especially entity beans, can take advantage of inheritance and polymorphism. An EJB programmer might define an employee entity bean with common methods such as getName and getSalary.

The programmer could then define a manager entity bean that extends the employee entity bean and adds manager-specific information. A method such as getSubordinates, for example, could return the manager's employees. The advantage of using inheritance is that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required