View Javadoc

1   package org.springframework.samples.petclinic;
2   
3   /**
4    * Simple JavaBean domain object with an id property.
5    * Used as a base class for objects needing this property.
6    *
7    * @author Ken Krebs
8    * @author Juergen Hoeller
9    */
10  public class BaseEntity {
11  
12  	private Integer id;
13  	
14  
15  	public void setId(Integer id) {
16  		this.id = id;
17  	}
18  
19  	public Integer getId() {
20  		return id;
21  	}
22  
23  	public boolean isNew() {
24  		return (this.id == null);
25  	}
26  
27  }