Three types of fields in a containing entity bean.

Architect's Corner
Entity bean relationships in EJB 1.1
Part 1: The basic technique

Grant Holland
Listing 1. Three types of fields in a containing entity bean.


public class LineItem implements EntityBean
{
	public int 		 lineItemID,       // persistent data
	public int 		 orderID,	        // persistent data
	public int 		 quantity;         //  persistent data
	public String	 productName	  //  related key
	public Product product           //  related EJB object


	< all method implementations >
}

public class LineItemPK implements java.io.Serializable
{
	public	int 		lineItemID;	  //  identifying field
	public	int 		orderID;		 //   identifying field
}

Featured

Upcoming Events

AppTrends

Sign up for our newsletter.

I agree to this site's Privacy Policy.