org.objectweb.speedo.genclass
Class AbstractGenClassHome

java.lang.Object
  extended by org.objectweb.speedo.mim.lib.AbstractHomeImpl
      extended by org.objectweb.speedo.genclass.AbstractGenClassHome
All Implemented Interfaces:
org.objectweb.jorm.api.PClassMapping, org.objectweb.jorm.util.api.Loggable, HomeItf, UserCacheManager
Direct Known Subclasses:
EJBGenClassHome, JDOGenClassHome

public abstract class AbstractGenClassHome
extends AbstractHomeImpl

This implementation of HomeItf delegated the PClassMapping roles to another instance. This implementation is dedicated to GenClass (Collection, List, Vector, Map, ...).

Author:
S.Chassande-Barrioz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.objectweb.jorm.api.PClassMapping
org.objectweb.jorm.api.PClassMapping.ReferenceConfigurator
 
Field Summary
 
Fields inherited from class org.objectweb.speedo.mim.lib.AbstractHomeImpl
namedQueries, personality, pmf, tpm, userCaches
 
Fields inherited from interface org.objectweb.speedo.mim.api.HomeItf
ALL, CACHED, FIXED, NO_CACHE, POST_ATTACH, POST_CLEAR, POST_CREATE, POST_DELETE, POST_DETACH, POST_DIRTY, POST_LOAD, POST_NEW, POST_REMOVE, POST_UPDATE, PRE_ATTACH, PRE_CLEAR, PRE_CREATE, PRE_DELETE, PRE_DETACH, PRE_DIRTY, PRE_NEW, PRE_REMOVE, PRE_UPDATE
 
Fields inherited from interface org.objectweb.jorm.api.PClassMapping
CLEANUP_DONOTHING, CLEANUP_REMOVEALL, CLEANUP_REMOVEDATA, CREATE_STRUCTURE_IF_NEEDED
 
Constructor Summary
AbstractGenClassHome(Personality p)
           
 
Method Summary
 void addAssociation(org.objectweb.jorm.api.PClassMapping targetClass, int[] indexes)
           
 void classDefined(org.objectweb.jorm.api.PMappingStructuresManager pmsm)
           
 void configureRefFields(org.objectweb.jorm.api.PClassMapping.ReferenceConfigurator rc)
           
 org.objectweb.jorm.api.PBinding createPBinding()
           
 boolean exist(org.objectweb.jorm.api.PBinding pb, java.lang.Object conn)
           
 java.util.HashMap getAssociationTable()
           
 java.lang.String getClassName()
           
 org.objectweb.jorm.naming.api.PNameCoder getClassPNameCoder()
           
 java.util.Properties getClassProperties()
           
 org.objectweb.jorm.naming.api.PName getDecodedPName(TupleCollection tc, org.objectweb.jorm.naming.api.PName pname, boolean intermediaryTuple)
           
 org.objectweb.jorm.api.PClassMapping getGenClassMapping()
           
 org.objectweb.jorm.api.PClassMapping getGenClassMapping(java.lang.String fn)
           
 int[] getIndexesTable(org.objectweb.jorm.api.PClassMapping targetClass)
           
 org.objectweb.util.monolog.api.Logger getLogger()
           
 org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
           
 org.objectweb.jorm.metainfo.api.MetaObject getMetaInfo()
           
 java.lang.String getPath()
           
 org.objectweb.jorm.naming.api.PBinder getPBinder()
           
 org.objectweb.jorm.api.PMapper getPMapper()
           
 org.objectweb.jorm.naming.api.PNameCoder getPNameCoder()
           
 org.objectweb.jorm.naming.api.PNameCoder getPNameCoder(java.lang.String fn)
           
 java.util.Iterator getPNameIterator(java.lang.Object conn)
           
 org.objectweb.jorm.api.PNameIterator getPNameIterator(java.lang.Object conn, boolean withSubType, boolean prefetching, java.lang.Object txctx)
           
 java.lang.String getProjectName()
           
 org.objectweb.jorm.type.api.PType getPType()
           
 org.objectweb.jorm.api.PClassMapping getRealPClassMapping()
           
 org.objectweb.jorm.api.PClassMapping[] getSubPCMs()
           
 byte getVersioningStrategy()
          The versioning strategy.
 void init(org.objectweb.jorm.api.PClassMapping _pcm, TransactionalPersistenceManager _tpm, POManagerFactoryItf _pmf, java.lang.String p)
           
 void init(org.objectweb.jorm.api.PMappingCallback mapper, org.objectweb.jorm.metainfo.api.MetaObject metaclass)
           
 void init(org.objectweb.jorm.api.PMappingStructuresManager pmsm)
           
 boolean isConform(java.lang.String mappername)
           
 boolean isDetachable()
          Indicates if the class has been marked as detacheable
 void makePersistent(POManagerItf pm, java.util.Iterator it, SpeedoGenClassPO thepo, java.util.Map map)
           
 void makePersistent(POManagerItf pm, PersistentObjectItf sp, SpeedoGenClassPO thepo, java.util.Map map)
           
 boolean match(java.lang.Object obj, boolean b)
           
 void read(org.objectweb.jorm.api.PBinding pb, java.lang.Object conn, org.objectweb.jorm.api.PAccessor pa)
           
 void read(org.objectweb.jorm.api.PBinding pb, java.lang.Object conn, org.objectweb.jorm.api.PAccessor pa, java.lang.Object txctx)
           
 void read(org.objectweb.jorm.api.PBinding pb, java.lang.Object conn, org.objectweb.jorm.api.PAccessor pa, java.lang.Object txctx, boolean forUpdate)
           
 org.objectweb.jorm.naming.api.PName resolve(java.lang.Object conn, org.objectweb.jorm.naming.api.PName pname)
           
 void setLogger(org.objectweb.util.monolog.api.Logger logger)
           
 void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory loggerfactory)
           
 void setPBinder(org.objectweb.jorm.naming.api.PBinder pb)
           
 void setPrefetchOnGenClass(boolean prefetch)
          Indicates if the prefetching must be activated genclass loading.
 void write(org.objectweb.jorm.api.PBinding pb, java.lang.Object conn, org.objectweb.jorm.api.PAccessor pa)
           
 
Methods inherited from class org.objectweb.speedo.mim.lib.AbstractHomeImpl
activeUserCache, addNamedQuery, addUserCache, allLoaded, attachCopy, detachCopy, fgGetFieldsToLoad, fgGetFieldsToLoad, fgGetNestedFetchGroups, fgIsDefined, getActiveUserCache, getClassForQuery, getNamedQuery, getPOManagerFactory, getPrefetchOnExtent, getPrefetchOnGenClass, getPrefetchOnQuery, getState, getTransactionalPersistenceManager, getUserCache, getUserCache, hasToFix, initSH, isAbstract, isCacheable, isFieldLockingLevel, isShareable, newSpeedoPOInstance, readIntention, removeNamedQuery, setCachePolicy, setFieldLockingLevel, setPOManagerFactory, setPrefetchOnExtent, setPrefetchOnQuery, setShareable, setTransactionalPersistenceManager, userCacheEntryUnbound, writeIntention, writeIntention
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.speedo.mim.api.HomeItf
addInstanceLifeCycleListener, hasInstanceLifeCycleListeners, removeInstanceLifeCycleListener, sendEvent
 

Constructor Detail

AbstractGenClassHome

public AbstractGenClassHome(Personality p)
Method Detail

init

public void init(org.objectweb.jorm.api.PClassMapping _pcm,
                 TransactionalPersistenceManager _tpm,
                 POManagerFactoryItf _pmf,
                 java.lang.String p)

getRealPClassMapping

public org.objectweb.jorm.api.PClassMapping getRealPClassMapping()

makePersistent

public void makePersistent(POManagerItf pm,
                           PersistentObjectItf sp,
                           SpeedoGenClassPO thepo,
                           java.util.Map map)

makePersistent

public void makePersistent(POManagerItf pm,
                           java.util.Iterator it,
                           SpeedoGenClassPO thepo,
                           java.util.Map map)

isDetachable

public boolean isDetachable()
Description copied from interface: HomeItf
Indicates if the class has been marked as detacheable


getVersioningStrategy

public byte getVersioningStrategy()
Description copied from interface: HomeItf
The versioning strategy.

See Also:
speedo.metadata.SpeeedoVersion, speedo.metadata.SpeeedoVersion, NO_VERSION

getClassProperties

public java.util.Properties getClassProperties()

getPath

public java.lang.String getPath()
Specified by:
getPath in interface HomeItf
Overrides:
getPath in class AbstractHomeImpl

setPrefetchOnGenClass

public void setPrefetchOnGenClass(boolean prefetch)
Description copied from interface: HomeItf
Indicates if the prefetching must be activated genclass loading. This method is only applicable for gen class home.

Specified by:
setPrefetchOnGenClass in interface HomeItf
Overrides:
setPrefetchOnGenClass in class AbstractHomeImpl

getProjectName

public java.lang.String getProjectName()

createPBinding

public org.objectweb.jorm.api.PBinding createPBinding()
                                               throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

init

public void init(org.objectweb.jorm.api.PMappingCallback mapper,
                 org.objectweb.jorm.metainfo.api.MetaObject metaclass)
          throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

getClassName

public java.lang.String getClassName()

getGenClassMapping

public org.objectweb.jorm.api.PClassMapping getGenClassMapping()
                                                        throws java.lang.UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException

getGenClassMapping

public org.objectweb.jorm.api.PClassMapping getGenClassMapping(java.lang.String fn)
                                                        throws java.lang.UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException

getMetaInfo

public org.objectweb.jorm.metainfo.api.MetaObject getMetaInfo()

getPBinder

public org.objectweb.jorm.naming.api.PBinder getPBinder()

getPMapper

public org.objectweb.jorm.api.PMapper getPMapper()

getPNameCoder

public org.objectweb.jorm.naming.api.PNameCoder getPNameCoder()
                                                       throws java.lang.UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException

getPNameCoder

public org.objectweb.jorm.naming.api.PNameCoder getPNameCoder(java.lang.String fn)
                                                       throws java.lang.UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException

getClassPNameCoder

public org.objectweb.jorm.naming.api.PNameCoder getClassPNameCoder()

getPNameIterator

public org.objectweb.jorm.api.PNameIterator getPNameIterator(java.lang.Object conn,
                                                             boolean withSubType,
                                                             boolean prefetching,
                                                             java.lang.Object txctx)
                                                      throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

getPNameIterator

public java.util.Iterator getPNameIterator(java.lang.Object conn)
                                    throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

getPType

public org.objectweb.jorm.type.api.PType getPType()

isConform

public boolean isConform(java.lang.String mappername)

setPBinder

public void setPBinder(org.objectweb.jorm.naming.api.PBinder pb)
                throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

configureRefFields

public void configureRefFields(org.objectweb.jorm.api.PClassMapping.ReferenceConfigurator rc)
                        throws org.objectweb.jorm.api.PException,
                               java.lang.UnsupportedOperationException
Throws:
org.objectweb.jorm.api.PException
java.lang.UnsupportedOperationException

exist

public boolean exist(org.objectweb.jorm.api.PBinding pb,
                     java.lang.Object conn)
              throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

read

public void read(org.objectweb.jorm.api.PBinding pb,
                 java.lang.Object conn,
                 org.objectweb.jorm.api.PAccessor pa)
          throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

read

public void read(org.objectweb.jorm.api.PBinding pb,
                 java.lang.Object conn,
                 org.objectweb.jorm.api.PAccessor pa,
                 java.lang.Object txctx)
          throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

read

public void read(org.objectweb.jorm.api.PBinding pb,
                 java.lang.Object conn,
                 org.objectweb.jorm.api.PAccessor pa,
                 java.lang.Object txctx,
                 boolean forUpdate)
          throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

write

public void write(org.objectweb.jorm.api.PBinding pb,
                  java.lang.Object conn,
                  org.objectweb.jorm.api.PAccessor pa)
           throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

getLogger

public org.objectweb.util.monolog.api.Logger getLogger()

getLoggerFactory

public org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()

setLogger

public void setLogger(org.objectweb.util.monolog.api.Logger logger)

setLoggerFactory

public void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory loggerfactory)

getSubPCMs

public org.objectweb.jorm.api.PClassMapping[] getSubPCMs()
                                                  throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

getAssociationTable

public java.util.HashMap getAssociationTable()

addAssociation

public void addAssociation(org.objectweb.jorm.api.PClassMapping targetClass,
                           int[] indexes)

getIndexesTable

public int[] getIndexesTable(org.objectweb.jorm.api.PClassMapping targetClass)

resolve

public org.objectweb.jorm.naming.api.PName resolve(java.lang.Object conn,
                                                   org.objectweb.jorm.naming.api.PName pname)
                                            throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

match

public boolean match(java.lang.Object obj,
                     boolean b)
              throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

getDecodedPName

public org.objectweb.jorm.naming.api.PName getDecodedPName(TupleCollection tc,
                                                           org.objectweb.jorm.naming.api.PName pname,
                                                           boolean intermediaryTuple)
                                                    throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

init

public void init(org.objectweb.jorm.api.PMappingStructuresManager pmsm)
          throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException

classDefined

public void classDefined(org.objectweb.jorm.api.PMappingStructuresManager pmsm)
                  throws org.objectweb.jorm.api.PException
Throws:
org.objectweb.jorm.api.PException