org.opensubsystems.core.logic.impl
Class BasicDataControllerImpl

java.lang.Object
  extended by org.opensubsystems.core.logic.impl.StatelessControllerImpl
      extended by org.opensubsystems.core.logic.impl.DataControllerImpl
          extended by org.opensubsystems.core.logic.impl.BasicDataControllerImpl
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean, BasicDataController, DataController, StatelessController
Direct Known Subclasses:
ModifiableDataControllerImpl

public abstract class BasicDataControllerImpl
extends DataControllerImpl
implements BasicDataController

Implementation of BasicDataController interface to manage data. It can be used by any component which provides BasicDataFactory to access the data. If this class is used in J2EE environment each method implementation may create transaction boundary. We do not want to generate EJB for this class since it is abstract base class for real EJBs

Version:
$Id: BasicDataControllerImpl.java,v 1.7 2007/01/28 06:54:51 bastafidli Exp $
Author:
Miro Halas
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.1 2005/08/16 05:25:54 bastafidl
XDoclet tag:
generate="false" We need to generate interface since xdoclet will require them for interfaces derived from BasicDataController. Since remote and local interfaces have to extend different ejb interfaces and we have only one base interface, the extends tags have to except our controller contain also the interfaces required by the spec
XDoclet tag:
local-extends="javax.ejb.EJBLocalObject, org.opensubsystems.core.logic.BasicDataController" extends="javax.ejb.EJBObject, org.opensubsystems.core.logic.BasicDataController"

Constructor Summary
BasicDataControllerImpl()
           
 
Method Summary
 DataObject create(DataObject data)
          Create data object.
 void delete(int iId)
          This implementation will delete only the default data object supported by this controller in case the controller supports multiple data types.
protected abstract  BasicDataFactory getDataFactory(DataObject data)
          Get data factory which can be used to access persistence layer for a data object managed by this controller.
 
Methods inherited from class org.opensubsystems.core.logic.impl.DataControllerImpl
get, getDataFactory
 
Methods inherited from class org.opensubsystems.core.logic.impl.StatelessControllerImpl
constructor, ejbActivate, ejbPassivate, ejbRemove, setSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensubsystems.core.logic.DataController
get
 
Methods inherited from interface org.opensubsystems.core.logic.StatelessController
constructor
 

Constructor Detail

BasicDataControllerImpl

public BasicDataControllerImpl()
Method Detail

create

public DataObject create(DataObject data)
                  throws OSSException
Create data object.

Specified by:
create in interface BasicDataController
Parameters:
data - - data object to create
Returns:
DataObject - newly created data object, null if user doesn't have access to that data object granted
Throws:
OSSException - - an error has occured
XDoclet tag:
XDoclet tag:
type="Required"

delete

public void delete(int iId)
            throws OSSException
This implementation will delete only the default data object supported by this controller in case the controller supports multiple data types.

Specified by:
delete in interface BasicDataController
Parameters:
iId - - id of the data object to delete
Throws:
OSSException - - an error has occured
XDoclet tag:
XDoclet tag:
type="Required"

getDataFactory

protected abstract BasicDataFactory getDataFactory(DataObject data)
Get data factory which can be used to access persistence layer for a data object managed by this controller. In case the controller supports multiple data types this method should look at the type of the data and return the factory supporting given data type.

Parameters:
data - - data object which will be manipulated using the returned factory
Returns:
DataFactory - data factory for given data object


Copyright © 2003 - 2006 OpenSubsystems s.r.o.