1 package info.ejava.examples.ejb.ejbjpa.dto; 2 3 import java.io.Serializable; 4 5 public class RoomDTO implements Serializable { 6 private static final long serialVersionUID = 1L; 7 private int number; 8 private boolean occupied; 9 10 public RoomDTO() {} 11 public RoomDTO(int number) { 12 this.number = number; 13 } 14 15 public int getNumber() { return number; } 16 public void setNumber(int number) { 17 this.number = number; 18 } 19 20 public boolean isOccupied() { return occupied; } 21 public void setOccupied(boolean occupied) { 22 this.occupied = occupied; 23 } 24 25 @Override 26 public String toString() { 27 StringBuilder builder = new StringBuilder(); 28 builder.append("RoomDTO [number=").append(number) 29 .append(", occupied=").append(occupied) 30 .append("]"); 31 return builder.toString(); 32 } 33 }