Magazine
 

Integrating JSF, Spring and Hibernate

 

.style3 {font-size: 13px; font-family:
Verdana, Arial, Helvetica, sans-serif;}
.style4 {
font-family: Verdana, Arial, Helvetica, sansserif;
font-weight:bold;
color: #FF0000;
}
.errors {
font-style: italic;
color: green;
}


7. Business Objects of Business Logic tier

In this section we will develop the objects of business logic tier. Business logic tier refers to the mid tier of 3-tier web application architecture.

Business Objects
Business logic tier communicates both with user interface tier and the database tier. In the business logic tier all the logic are encapsulated. The business objects and business services in the application resides in the Business logic tier. The business objects contain the data and logic associated with the data. In our application there
is only one business object the User.

Here is the code of User.java business object:

package net.roseindia.dao.hibernate;
import java.io.Serializable;
/** @author Hibernate CodeGenerator */
public class User implements Serializable {
/** identifier field */
private Integer userId;
/** nullable persistent field */
private String userName;
/** nullable persistent field */
private String userPassword;
/** nullable persistent field */
private String userEmail;

 

/** nullable persistent field */
private String userAddress;
/** full constructor */
public User(Integer userId, String
userName, String userPassword, String
userEmail,
String userAddress) {
this.userId = userId;
this.userName = userName;
this.userPassword = userPassword;
this.userEmail = userEmail;
this.userAddress = userAddress;
}
/** default constructor */
public User() {
}
/** minimal constructor */
public User(Integer userId) {
this.userId = userId;
}
public Integer getUserId() {
return this.userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getUserName() {
return this.userName;
}
public void setUserName(String
userName) {
this.userName = userName;
}
public String getUserPassword() {
return this.userPassword;
}
public void setUserPassword(String
userPassword) {
this.userPassword = userPassword;
}

Jan 2008 | Java Jazz Up | 68
previous
index
next
 
View All Topics
All Pages of this Issue
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

30
, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 , 54, 55, 56, 57,

58
, 59, 60, 61, 62, 63 , 64, 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , 80 , 81 , 82 ,

83, 84 , 85 , 86, 87 , 88, 89 , 90 , 91 , 92 , 93 , 94 , 95 , 96 , 97 , 98 , 99 , 100 , 101 , 102 , 103, 104 , 105 ,

106, 107,

Download PDF