O'Reilly logo

EJB 3.1 Cookbook by Richard M. Reese

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

Creating an entity facade

A building facade is a false front to a building. Movie sets frequently use facades to give the appearance of an actual building avoiding the cost of a real building. In programming, a facade is an object which provides an interface to another class to make the hidden class easier to use or reduce dependencies among classes.

Getting ready

We will build upon the EntityBeanApplication application from the previous recipe. We will be adding to the EJB module two new classes to the packt package: AbstractFacade and PartsBeanFacade.

An entity facade is commonly used to hide the entity class. A typical approach is to create a base class encapsulating much of the common functionality of an entity and then extend this class with ...

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