KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > vlib > ejb > Publisher


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

15 package org.apache.tapestry.vlib.ejb;
16
17 import java.io.Serializable JavaDoc;
18
19 /**
20  * A light-weight, read-only version of the {@link IPublisher} bean.
21  *
22  * @version $Id: Publisher.java,v 1.4 2004/02/19 17:37:39 hlship Exp $
23  * @author Howard Lewis Ship
24  *
25  **/

26
27 public class Publisher implements Serializable JavaDoc
28 {
29     private static final long serialVersionUID = -2843992788128325821L;
30     
31     private Integer JavaDoc _id;
32     private String JavaDoc _name;
33
34     public Publisher(Integer JavaDoc id, String JavaDoc name)
35     {
36         _id = id;
37         _name = name;
38     }
39
40     public Integer JavaDoc getId()
41     {
42         return _id;
43     }
44
45     public String JavaDoc getName()
46     {
47         return _name;
48     }
49
50     /**
51      * Name is a writable property of this bean, to support the
52      * applications' EditPublisher's page.
53      *
54      * @see IOperations#updatePublishers(Publisher[],Integer[])
55      *
56      **/

57
58     public void setName(String JavaDoc value)
59     {
60         _name = value;
61     }
62
63     public String JavaDoc toString()
64     {
65         StringBuffer JavaDoc buffer;
66
67         buffer = new StringBuffer JavaDoc("Publisher[");
68         buffer.append(_id);
69         buffer.append(' ');
70         buffer.append(_name);
71         buffer.append(']');
72
73         return buffer.toString();
74     }
75 }
Popular Tags