KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > vlib > ejb > impl > PublisherBean


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.impl;
16
17 import java.rmi.RemoteException JavaDoc;
18
19 import javax.ejb.CreateException JavaDoc;
20
21 /**
22  * Implementation of the Publisher entity.
23  *
24  * <p>We're using container managed persistance.
25  *
26  * @see org.apache.tapestry.vlib.ejb.IPublisher
27  * @see org.apache.tapestry.vlib.ejb.IPublisherHome
28  *
29  * @version $Id: PublisherBean.java,v 1.3 2004/02/19 17:38:07 hlship Exp $
30  * @author Howard Lewis Ship
31  *
32  **/

33
34 public abstract class PublisherBean extends AbstractEntityBean
35 {
36     public abstract void setPublisherId(Integer JavaDoc value);
37     
38     public abstract Integer JavaDoc getPublisherId();
39     
40     public abstract String JavaDoc getName();
41     
42     public abstract void setName(String JavaDoc value);
43
44     protected String JavaDoc[] getAttributePropertyNames()
45     {
46         return new String JavaDoc[] { "name" };
47     }
48
49     public Integer JavaDoc ejbCreate(String JavaDoc name) throws CreateException JavaDoc, RemoteException JavaDoc
50     {
51         setPublisherId(allocateKey());
52         setName(name);
53         
54         return null;
55     }
56
57     public void ejbPostCreate(String JavaDoc name)
58     {
59         // Do nothing
60
}
61 }
Popular Tags