Frameworks| Hibernate| Struts| JSF| JavaFX| Ajax| Spring| DOJO| JDO| iBatis| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
Business Objects of Business Logic tier 
 

In this section we will develop the objects of business logic tier.

 

Business Objects of Business Logic tier

                          

In this section we will develop the objects of business logic tier. Business logic tier referrers 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 contains the data and logic associated with the data. In our application 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;
    }



    public String getUserEmail() {
        return this.userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserAddress() {
        return this.userAddress;
    }

    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

}

Since we are using Hibernate for persistence, the User business object provides getter and setter methods for all fields.

Business Services

Business Services contains the code to interact with the data tier. In this application we have developed a formal service layer, client can use these services interface. There is only one service in this application the ServiceFinder. The ServiceFinder service is used to get the Spring managed beans from WebApplicationContext.

In the next section we will learn about Integration tier of our application. Integration tier is also known as data access tier.

                          

» View all related tutorials
Related Tags: java c spring server jsf process io int this log ai js technology with proc e il rating it section

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.