org.objectweb.jonas_ejb.container.jorm
Class JormFactory

java.lang.Object
  |
  +--org.objectweb.jonas_ejb.container.JFactory
        |
        +--org.objectweb.jonas_ejb.container.JEntityFactory
              |
              +--org.objectweb.jonas_ejb.container.jorm.JormFactory
All Implemented Interfaces:
BeanFactory, org.objectweb.jorm.api.PClassMapping
Direct Known Subclasses:
MedorFactory

public abstract class JormFactory
extends JEntityFactory
implements org.objectweb.jorm.api.PClassMapping

This class is an extension of the JEntityFactory class. It initializes the persitant class (the bean) in the jorm mapper. This class is abstract in order to be extended by the PClassMapping generated for the Bean.

Author:
Sebastien Chassande-Barrioz

Inner classes inherited from class org.objectweb.jorm.api.PClassMapping
org.objectweb.jorm.api.PClassMapping.ReferenceConfigurator
 
Field Summary
protected  EntityCmp2Desc ecd
           
protected  boolean mapped
           
protected  org.objectweb.jorm.api.PMapper mapper
           
protected  int relNonInit
           
 
Fields inherited from class org.objectweb.jonas_ejb.container.JEntityFactory
bctxlist, datasource, entitySwitchUnused, home, instanceCount, localhome, maxCacheSize, minPoolSize, pklist, reentrant, shared
 
Fields inherited from class org.objectweb.jonas_ejb.container.JFactory
beanclass, cont, dd, ejb10Env, ejbname, JNDICtx, naming, tm, txbeanmanaged
 
Fields inherited from interface org.objectweb.jorm.api.PClassMapping
CLEANUP_DONOTHING, CLEANUP_REMOVEALL, CLEANUP_REMOVEDATA, CREATE_STRUCTURE_IF_NEEDED
 
Constructor Summary
JormFactory()
           
 
Method Summary
 void configurePnc(java.lang.String n, org.objectweb.jorm.naming.api.PNamingContext pnc, boolean isMultiple)
          It assignes the PNamingContext which manager a relation.
protected  JEntityContext createNewInstance()
          This method is overrided in order to specify the JEntityContext class which must be instanciated.
abstract  java.lang.Object getConnection(java.lang.Object hints)
           
 JEntitySwitch getJEntitySwitch()
          This method allocates a new JEntitySwitch.
 void init(EntityDesc ed, JContainer c, java.lang.String mapperName)
           
protected  org.objectweb.jorm.api.PClassMapping newGCMInstance(java.lang.String mapperName)
           
abstract  void releaseConnection(java.lang.Object conn)
           
protected abstract  void setMapper(java.lang.String mapperName)
           
 void stop()
          stop this EJB.
 
Methods inherited from class org.objectweb.jonas_ejb.container.JEntityFactory
bindEJB, calculateAutomaticPk, checkTransaction, existEJB, getCacheSize, getDataSource, getEJB, getEntityCounters, getHome, getJContext, getLocalHome, getMaxCacheSize, getMinPoolSize, getPoolSize, init, isReentrant, isShared, reduceCache, releaseJContext, removeEJB, sync
 
Methods inherited from class org.objectweb.jonas_ejb.container.JFactory
checkJonasVersion, checkTransactionContainer, getContainer, getCorbaInitialContext, getDeploymentDescriptor, getEjb10Environment, getEJBName, getEnv, getInitialContext, getTransactionManager, init, isClassAvailable, isTxBeanManaged, myClassLoader, postInvoke, postInvokeRemote, preInvoke, preInvokeRemote, resetComponentContext, setComponentContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jorm.api.PClassMapping
configureRefFields, createPBinding, getClassName, getGenClassMapping, getGenClassMapping, getMetaInfo, getPBinder, getPMapper, getPNameIterator, getPNameManager, getPNameManager, init, initMappingStructures, isConform, removeMappingStructures, setGenClassMapping, setGenClassMapping, setPBinder, setPNamingContext, setPNamingContext
 

Field Detail

relNonInit

protected int relNonInit

mapped

protected boolean mapped

mapper

protected org.objectweb.jorm.api.PMapper mapper

ecd

protected EntityCmp2Desc ecd
Constructor Detail

JormFactory

public JormFactory()
Method Detail

setMapper

protected abstract void setMapper(java.lang.String mapperName)
                           throws org.objectweb.jorm.api.PException

getConnection

public abstract java.lang.Object getConnection(java.lang.Object hints)
                                        throws org.objectweb.jorm.api.PException

releaseConnection

public abstract void releaseConnection(java.lang.Object conn)
                                throws org.objectweb.jorm.api.PException

init

public void init(EntityDesc ed,
                 JContainer c,
                 java.lang.String mapperName)

configurePnc

public void configurePnc(java.lang.String n,
                         org.objectweb.jorm.naming.api.PNamingContext pnc,
                         boolean isMultiple)
                  throws org.objectweb.jorm.api.PException
It assignes the PNamingContext which manager a relation.

stop

public void stop()
Description copied from class: JEntityFactory
stop this EJB. Mainly unregister it in JNDI.
Overrides:
stop in class JEntityFactory

createNewInstance

protected JEntityContext createNewInstance()
                                    throws java.lang.Exception
This method is overrided in order to specify the JEntityContext class which must be instanciated. Create a new instance of the bean and its EntityContext In case of CMP, the bean class is derived to manage entity persistence.
Overrides:
createNewInstance in class JEntityFactory
Following copied from class: org.objectweb.jonas_ejb.container.JEntityFactory
Returns:
JEntityContext

getJEntitySwitch

public JEntitySwitch getJEntitySwitch()
Description copied from class: JEntityFactory
This method allocates a new JEntitySwitch. But no association has been done between the primary key and the new JEntitySwitch. Therefore the initialisation is not done.
Overrides:
getJEntitySwitch in class JEntityFactory
Following copied from class: org.objectweb.jonas_ejb.container.JEntityFactory
Returns:
The JEntitySwitch.

newGCMInstance

protected org.objectweb.jorm.api.PClassMapping newGCMInstance(java.lang.String mapperName)
                                                       throws java.lang.Exception