Advertisement
Guest User

Simple customer model

a guest
Aug 8th, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.26 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package uk.co.jmkg.jaxrstesting.model;
  6.  
  7. import java.util.ArrayList;
  8. import java.util.Date;
  9. import java.util.List;
  10. import javax.xml.bind.annotation.XmlElement;
  11. import javax.xml.bind.annotation.XmlRootElement;
  12.  
  13. /**
  14.  *
  15.  * @author jamesgreen
  16.  */
  17. @XmlRootElement
  18. public class Customer {
  19.     private int id;
  20.     private String firstName;
  21.     private String lastName;
  22.     private Date dob;
  23.     private List<Bill> bills;
  24.  
  25.     public Date getDob() {
  26.         return dob;
  27.     }
  28.  
  29.     public void setDob(Date dob) {
  30.         this.dob = dob;
  31.     }
  32.  
  33.     public String getFirstName() {
  34.         return firstName;
  35.     }
  36.  
  37.     public void setFirstName(String firstName) {
  38.         this.firstName = firstName;
  39.     }
  40.  
  41.     public int getId() {
  42.         return id;
  43.     }
  44.  
  45.     public void setId(int id) {
  46.         this.id = id;
  47.     }
  48.  
  49.     public String getLastName() {
  50.         return lastName;
  51.     }
  52.  
  53.     public void setLastName(String lastName) {
  54.         this.lastName = lastName;
  55.     }
  56.  
  57.     @XmlElement
  58.     public List<Bill> getBills() {
  59.         if (bills == null)
  60.             bills = new ArrayList<Bill>();
  61.         return bills;
  62.     }
  63.    
  64.    
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement