Saturday 24 December 2011

Database Calls

Table 5-1 summarizes the database access calls in the SavingsAccountBean class. The business methods of the SavingsAccountBean class are absent from the preceding table because they do not access the database. Instead, these business methods update the instance variables, which are written to the database when the EJB container calls ejbStore. Another developer might have chosen to access the database in the business methods of the SavingsAccountBean class. This choice is one of those design decisions that depend on the specific needs of your application.
Before accessing a database, you must connect to it.
Table 5-1 SQL Statements in SavingsAccountBean 
MethodSQL Statement
ejbCreateINSERT
ejbFindByPrimaryKeySELECT
ejbFindByLastNameSELECT
ejbFindInRangeSELECT
ejbLoadSELECT
ejbRemoveDELETE
ejbStoreUPDATE

No comments:

Post a Comment