org.opensubsystems.core.logic.impl
Class DataControllerImpl

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

public abstract class DataControllerImpl
extends StatelessControllerImpl
implements DataController

Implementation of DataController interface to access data. It can be used by any component which provides DataFactory 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: DataControllerImpl.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/15 13:39:10 bastafidli
XDoclet tag:
generate="false" We need to generate interface since xdoclet will require them for interfaces derived from DataController. 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.DataController" extends="javax.ejb.EJBObject, org.opensubsystems.core.logic.DataController"

Constructor Summary
DataControllerImpl()
           
 
Method Summary
 DataObject get(int iId)
          This implementation will get only the default data object supported by this controller in case the controller supports multiple data types.
protected abstract  DataFactory getDataFactory()
          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.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.StatelessController
constructor
 

Constructor Detail

DataControllerImpl

public DataControllerImpl()
Method Detail

get

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

Specified by:
get in interface DataController
Parameters:
iId - - ID of the data object to retrieve
Returns:
DataObject DataObject - retrieved data object, null if the data object doesn't exists or if user doesn't have access to that data object granted
Throws:
OSSException - - an error has occured
XDoclet tag:
XDoclet tag:
type="Supports"

getDataFactory

protected abstract DataFactory getDataFactory()
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 return the factory for the default data type.

Returns:
DataFactory


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