KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > core > logic > impl > ModifiableDataControllerImpl


1 /*
2  * Copyright (c) 2005 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenSubsystems
5  *
6  * $Id: ModifiableDataControllerImpl.java,v 1.4 2007/01/07 06:14:42 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */

21
22 package org.opensubsystems.core.logic.impl;
23
24 import org.opensubsystems.core.data.ModifiableDataObject;
25 import org.opensubsystems.core.error.OSSException;
26 import org.opensubsystems.core.logic.ModifiableDataController;
27 import org.opensubsystems.core.persist.ModifiableDataFactory;
28
29 /**
30  * Implementation of ModifiableDataController interface to manage data. It can
31  * be used by any component which provides ModifiableDataFactory to access the
32  * data. If this class is used in J2EE environment each method implementation
33  * may create transaction boundary.
34  *
35  * We do not want to generate EJB for this class since it is abstract base
36  * class for real EJBs
37  * @ejb.bean generate="false"
38  *
39  * We need to generate interface since xdoclet will require them for interfaces
40  * derived from BasicDataController. Since remote and local interfaces have to
41  * extend different ejb interfaces and we have only one base interface, the
42  * extends tags have to except our controller contain also the interfaces
43  * required by the spec
44  * @ejb.interface
45  * local-extends="javax.ejb.EJBLocalObject, org.opensubsystems.core.logic.ModifiableDataController"
46  * extends="javax.ejb.EJBObject, org.opensubsystems.core.logic.ModifiableDataController"
47  *
48  * @version $Id: ModifiableDataControllerImpl.java,v 1.4 2007/01/07 06:14:42 bastafidli Exp $
49  * @author Miro Halas
50  * @code.reviewer Miro Halas
51  * @code.reviewed 1.1 2005/08/16 05:25:54 bastafidli
52  */

53 public abstract class ModifiableDataControllerImpl extends BasicDataControllerImpl
54                                                    implements ModifiableDataController
55 {
56    /**
57     * {@inheritDoc}
58     *
59     * @ejb.interface-method
60     * @ejb.transaction type="Required"
61     */

62    public ModifiableDataObject save(
63       ModifiableDataObject data
64    ) throws OSSException
65    {
66       return ((ModifiableDataFactory)getDataFactory(data)).save(data);
67    }
68 }
69
Popular Tags