KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > ojb > samples > bean > Employee


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.cocoon.ojb.samples.bean;
18
19 import java.io.Serializable JavaDoc;
20
21 /**
22  * Employee's Bean
23  *
24  * @author <a HREF="mailto:antonio@apache.org">Antonio Gallardo</a>
25  * @version CVS $Id: Employee.java 30932 2004-07-29 17:35:38Z vgritsenko $
26 */

27 public class Employee implements Serializable JavaDoc {
28
29     private int id;
30     protected int departmentId;
31     protected String JavaDoc name;
32
33     public Employee(){
34         this.id = 1;
35         this.departmentId = 1;
36         this.name = "My Name";
37     }
38
39     public int getId() {
40         return this.id;
41     }
42
43     public int getDepartmentId() {
44         return this.departmentId;
45     }
46
47     public String JavaDoc getName() {
48         return this.name;
49     }
50
51     public void setId(int newId) {
52         this.id = newId;
53     }
54
55     public void setDepartmentId(int newDepartmentId) {
56         this.departmentId = newDepartmentId;
57     }
58
59     public void setName(String JavaDoc newName) {
60         this.name = newName;
61     }
62 }
63
Popular Tags