Monday, October 31, 2011

Understanding Hibernate - Part I


A simple pojo class representing a customer

package org.training.hibernate;

import java.io.Serializable;
import java.util.List;
import java.util.Set;

public class Customer implements Serializable {
private int customerID;
private String customerName;
private List<String> customerPhoneNumbers;
private Set<String> customerAddress;
public Customer() {
// TODO Auto-generated constructor stub
}
public Customer(int customerID, String customerName,
List<String> customerPhoneNumbers, Set<String> customerAddress) {
super();
this.customerID = customerID;
this.customerName = customerName;
this.customerPhoneNumbers = customerPhoneNumbers;
this.customerAddress = customerAddress;
}

public int getCustomerID() {
return customerID;
}

public void setCustomerID(int customerID) {
this.customerID = customerID;
}

public String getCustomerName() {
return customerName;
}

public void setCustomerName(String customerName) {
this.customerName = customerName;
}

public List<String> getCustomerPhoneNumbers() {
return customerPhoneNumbers;
}

public void setCustomerPhoneNumbers(List<String> customerPhoneNumbers) {
this.customerPhoneNumbers = customerPhoneNumbers;
}

public Set<String> getCustomerAddress() {
return customerAddress;
}

public void setCustomerAddress(Set<String> customerAddress) {
this.customerAddress = customerAddress;
}
}

No comments:

Post a Comment