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, org.objectweb.jorm.api.PClassMappingCtrl
- Direct Known Subclasses:
- MedorFactory
- public abstract class JormFactory
- extends JEntityFactory
- implements org.objectweb.jorm.api.PClassMapping, org.objectweb.jorm.api.PClassMappingCtrl
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
Nested classes inherited from class org.objectweb.jorm.api.PClassMapping |
org.objectweb.jorm.api.PClassMapping.ReferenceConfigurator |
Fields inherited from interface org.objectweb.jorm.api.PClassMapping |
CLEANUP_DONOTHING, CLEANUP_REMOVEALL, CLEANUP_REMOVEDATA, CREATE_STRUCTURE_IF_NEEDED |
Method Summary |
void |
configurePnc(java.lang.String n,
org.objectweb.jorm.naming.api.PNamingContext pnc,
boolean isMultiple)
It assignes the PNamingContext which manages 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)
Create a GenClassMapping |
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, 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, getPNameCoder, getPNameCoder, getPNameIterator, getProjectName, getPType, init, isConform, setPBinder |
Methods inherited from interface org.objectweb.jorm.api.PClassMappingCtrl |
setGenClassMapping, setGenClassMapping, setPNameCoder, setPNameCoder, setProjectName |
relNonInit
protected int relNonInit
mapped
protected boolean mapped
mapper
protected org.objectweb.jorm.api.PMapper mapper
ecd
protected EntityCmp2Desc ecd
JormFactory
public JormFactory()
- constructor
setMapper
protected abstract void setMapper(java.lang.String mapperName)
throws org.objectweb.jorm.api.PException
- Throws:
org.objectweb.jorm.api.PException
getConnection
public abstract java.lang.Object getConnection(java.lang.Object hints)
throws org.objectweb.jorm.api.PException
- Throws:
org.objectweb.jorm.api.PException
releaseConnection
public abstract void releaseConnection(java.lang.Object conn)
throws org.objectweb.jorm.api.PException
- 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 manages a relation.
- Parameters:
n
- pnc
- isMultiple
-
- Throws:
org.objectweb.jorm.api.PException
stop
public void stop()
- Description copied from class:
JEntityFactory
- stop this EJB.
Mainly unregister it in JNDI.
- Specified by:
stop
in interface BeanFactory
- 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
- Returns:
- JEntityContext
- Throws:
java.lang.Exception
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
- Returns:
- The JEntitySwitch.
newGCMInstance
protected org.objectweb.jorm.api.PClassMapping newGCMInstance(java.lang.String mapperName)
throws java.lang.Exception
- Create a GenClassMapping
- Parameters:
mapperName
- name of the mapper
- Throws:
java.lang.Exception