KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > samples > petclinic > Entity


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 Entity {
11
12     private Integer JavaDoc id;
13
14     public void setId(Integer JavaDoc id) {
15         this.id = id;
16     }
17
18     public Integer JavaDoc getId() {
19         return id;
20     }
21
22     public boolean isNew() {
23         return (this.id == null);
24     }
25
26 }
27
Popular Tags