org.objectweb.speedo.mapper.lib
Class BasicJormFactory

java.lang.Object
  extended byorg.objectweb.speedo.mapper.lib.BasicJormFactory
All Implemented Interfaces:
org.objectweb.fractal.api.control.AttributeController, org.objectweb.fractal.api.control.BindingController, java.util.EventListener, JormFactory, JormFactoryAttributes, org.objectweb.fractal.api.control.LifeCycleController, org.objectweb.jorm.naming.api.PNameCoder, javax.jdo.spi.RegisterClassListener

public class BasicJormFactory
extends java.lang.Object
implements JormFactory, org.objectweb.jorm.naming.api.PNameCoder, org.objectweb.fractal.api.control.BindingController, org.objectweb.fractal.api.control.LifeCycleController, JormFactoryAttributes, javax.jdo.spi.RegisterClassListener

This class manages the initialization and the naming, of persistent class. The type of naming supported depends on the NamingManager registered into the NamingManagerFactory

Author:
S.Chassande-Barrioz
See Also:
NamingManager

Field Summary
protected  java.util.Map binders
          key = String class name value = PBinder binder of the class
protected  org.objectweb.perseus.cache.api.CacheManager cache
          The cache to assign to the binders
static java.lang.String CACHE_MANAGER_BINDING
          fractal binding name to the cache manager
protected  java.util.Map cn2pcm
          temporaly variable use in the recursive algorithm
protected  org.objectweb.util.monolog.api.Logger logger
           
protected  org.objectweb.jorm.api.PMapper mapper
          The mapper is used to map and find the Jorm classes.
static java.lang.String MAPPER_BINDING
          fractal binding name to the mapper
protected  ProxyManagerFactory pmf
           
static java.lang.String PMF_BINDING
           
protected  java.util.Map pnamingContexts
          key = String class name value = PNamingContext pnc of the class
protected  org.objectweb.perseus.persistence.api.TransactionalPersistenceManager tpm
           
static java.lang.String TPM_BINDING
           
 
Fields inherited from interface org.objectweb.jorm.naming.api.PNameCoder
CTBIGDECIMAL, CTBIGINTEGER, CTBYTE, CTBYTEARRAY, CTCHAR, CTCHARARRAY, CTCOMPOSITE, CTDATE, CTINT, CTLONG, CTOBYTE, CTOCHAR, CTOINT, CTOLONG, CTOSHORT, CTSHORT, CTSTRING, CTSYSTEM
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Fields inherited from interface org.objectweb.speedo.mapper.api.JormFactoryAttributes
CREATE_IF_REQUIRED, DELETE_DATA, DO_NOTHING, FORCE_CREATE
 
Constructor Summary
BasicJormFactory()
          builds the BasicJormFactory and the hosting structure for the binder list.
 
Method Summary
 void bindFc(java.lang.String s, java.lang.Object o)
           
 boolean codingSupported(int codingtype)
           
 org.objectweb.jorm.naming.api.PName decode(byte[] en)
           
 org.objectweb.jorm.naming.api.PName decodeAbstract(java.lang.Object oid, java.lang.Object context)
           
 org.objectweb.jorm.naming.api.PName decodeBigDecimal(java.math.BigDecimal en)
           
 org.objectweb.jorm.naming.api.PName decodeBigInteger(java.math.BigInteger en)
           
 org.objectweb.jorm.naming.api.PName decodeByte(byte en)
           
 org.objectweb.jorm.naming.api.PName decodeChar(char en)
           
 org.objectweb.jorm.naming.api.PName decodeCharArray(char[] en)
           
 org.objectweb.jorm.naming.api.PName decodeDate(java.util.Date en)
           
 org.objectweb.jorm.naming.api.PName decodeInt(int en)
           
 org.objectweb.jorm.naming.api.PName decodeLong(long en)
           
 org.objectweb.jorm.naming.api.PName decodeObyte(java.lang.Byte en)
           
 org.objectweb.jorm.naming.api.PName decodeOchar(java.lang.Character en)
           
 org.objectweb.jorm.naming.api.PName decodeOint(java.lang.Integer en)
           
 org.objectweb.jorm.naming.api.PName decodeOlong(java.lang.Long en)
           
 org.objectweb.jorm.naming.api.PName decodeOshort(java.lang.Short en)
           
 org.objectweb.jorm.naming.api.PName decodeShort(short en)
           
 org.objectweb.jorm.naming.api.PName decodeString(java.lang.String en)
           
 byte[] encode(org.objectweb.jorm.naming.api.PName pn)
           
 java.lang.Object encodeAbstract(org.objectweb.jorm.naming.api.PName pn)
           
 java.math.BigDecimal encodeBigDecimal(org.objectweb.jorm.naming.api.PName pn)
           
 java.math.BigInteger encodeBigInteger(org.objectweb.jorm.naming.api.PName pn)
           
 byte encodeByte(org.objectweb.jorm.naming.api.PName pn)
           
 char encodeChar(org.objectweb.jorm.naming.api.PName pn)
           
 char[] encodeCharArray(org.objectweb.jorm.naming.api.PName pn)
           
 java.util.Date encodeDate(org.objectweb.jorm.naming.api.PName pn)
           
 int encodeInt(org.objectweb.jorm.naming.api.PName pn)
           
 long encodeLong(org.objectweb.jorm.naming.api.PName pn)
           
 java.lang.Byte encodeObyte(org.objectweb.jorm.naming.api.PName pn)
           
 java.lang.Character encodeOchar(org.objectweb.jorm.naming.api.PName pn)
           
 java.lang.Integer encodeOint(org.objectweb.jorm.naming.api.PName pn)
           
 java.lang.Long encodeOlong(org.objectweb.jorm.naming.api.PName pn)
           
 java.lang.Short encodeOshort(org.objectweb.jorm.naming.api.PName pn)
           
 short encodeShort(org.objectweb.jorm.naming.api.PName pn)
           
 java.lang.String encodeString(org.objectweb.jorm.naming.api.PName pn)
           
 org.objectweb.jorm.naming.api.PBinder findPBinder(java.lang.String className, java.lang.ClassLoader classLoader, java.lang.String hints)
          Retrieves a PBinder managing a given persistent class.
protected  org.objectweb.jorm.naming.api.PNameManager findPNameManager(java.lang.String className, java.lang.ClassLoader classLoader, org.objectweb.jorm.api.PClassMapping pcm, java.lang.String hints)
          Retrieves a PNameManager managing a given persistent class and its sub classes.
 java.lang.ClassLoader getClassLoader(java.lang.String className)
          Retrieves the classloader of a class if the class has been already mapped.
 java.lang.String getFcState()
           
protected  java.lang.String getGCMClassName(java.lang.String mapperName)
          Retrieves the class name of the PClassMapping implementation for the generic class for a given mapper name.
 org.objectweb.jorm.api.PClassMapping getGenClassMapping(java.lang.String path)
          Retrieve the PClassMapping of a gen class since its path
 boolean getMappingOnClassRegistration()
          Indicates if during the class registration, the persistent classes have to be mapped.
 byte getMappingStructureRule()
           
 org.objectweb.jorm.naming.api.PName getNull()
           
 org.objectweb.jorm.naming.api.PBinder getPBinder(java.lang.Class clazz)
          Retrieve the Binder managing the persistent class (Not a Generic class).
 org.objectweb.jorm.naming.api.PBinder getPBinder(java.lang.String classname, java.lang.ClassLoader cl)
          Retrieve the Binder managing the persistent class (Not a Generic class).
 org.objectweb.jorm.api.PClassMapping getPClassMapping(java.lang.Class clazz)
          Retrieves a PClassMapping instance managing a jorm class.
 org.objectweb.jorm.api.PClassMapping getPClassMapping(java.lang.String className, java.lang.ClassLoader classLoader)
          This method is the real implementation of the getPClassMapping methods from the JormFactory interface.
 org.objectweb.jorm.naming.api.PNamingContext getPNamingContext(java.lang.Class clazz)
          Retrieve the PNamingcontext managing the persistent class (Not a Generic class) and its sub classes.
 org.objectweb.jorm.naming.api.PNamingContext getPNamingContext(java.lang.String classname, java.lang.ClassLoader cl)
          This Method is a shortcut to the getPNamingContext(SpeedoProxy) method.
 org.objectweb.jorm.type.api.PType getPType()
           
 java.util.Properties getSpeedoProperties()
          Returns speedo properties used to configure each home (caching, ...)
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String s)
           
 void registerClass(javax.jdo.spi.RegisterClassEvent event)
          Automatic mechanism for persistent clas registration.
 void setMappingOnClassRegistration(boolean val)
           
 void setMappingStructureRule(byte rule)
           
 void setNullPName(java.lang.Object o)
           
 void setPType(org.objectweb.jorm.type.api.PType pt)
           
 void setSpeedoProperties(java.util.Properties p)
          Assignes speedo properties which permits to configure each home (caching, ...)
 void startFc()
           
 void stopFc()
           
 boolean supportCompositeField(java.lang.String fn, org.objectweb.jorm.type.api.PType ft)
           
 boolean supportDynamicComposite()
           
 boolean supportStaticComposite()
           
 void unbindFc(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAPPER_BINDING

public static final java.lang.String MAPPER_BINDING
fractal binding name to the mapper

See Also:
Constant Field Values

CACHE_MANAGER_BINDING

public static final java.lang.String CACHE_MANAGER_BINDING
fractal binding name to the cache manager

See Also:
Constant Field Values

TPM_BINDING

public static final java.lang.String TPM_BINDING
See Also:
Constant Field Values

PMF_BINDING

public static final java.lang.String PMF_BINDING
See Also:
Constant Field Values

tpm

protected org.objectweb.perseus.persistence.api.TransactionalPersistenceManager tpm

pmf

protected ProxyManagerFactory pmf

mapper

protected org.objectweb.jorm.api.PMapper mapper
The mapper is used to map and find the Jorm classes.


cache

protected org.objectweb.perseus.cache.api.CacheManager cache
The cache to assign to the binders


binders

protected java.util.Map binders
key = String class name value = PBinder binder of the class


pnamingContexts

protected java.util.Map pnamingContexts
key = String class name value = PNamingContext pnc of the class


cn2pcm

protected java.util.Map cn2pcm
temporaly variable use in the recursive algorithm


logger

protected org.objectweb.util.monolog.api.Logger logger
Constructor Detail

BasicJormFactory

public BasicJormFactory()
builds the BasicJormFactory and the hosting structure for the binder list.

Method Detail

getMappingStructureRule

public byte getMappingStructureRule()
Specified by:
getMappingStructureRule in interface JormFactory
See Also:
JormFactoryAttributes

setMappingStructureRule

public void setMappingStructureRule(byte rule)
Specified by:
setMappingStructureRule in interface JormFactoryAttributes
Parameters:
rule - is the default mapping structure rule to apply during the map operation of the persistent classes.

getMappingOnClassRegistration

public boolean getMappingOnClassRegistration()
Description copied from interface: JormFactoryAttributes
Indicates if during the class registration, the persistent classes have to be mapped. True : the class are mapped at class registration time False: nothing is done.

Specified by:
getMappingOnClassRegistration in interface JormFactoryAttributes

setMappingOnClassRegistration

public void setMappingOnClassRegistration(boolean val)
Specified by:
setMappingOnClassRegistration in interface JormFactoryAttributes
Parameters:
val - is a boolean value Indicating if during the class registration, the persistent classes have to be mapped. True : the class are mapped at class registration time False: nothing is done.

listFc

public java.lang.String[] listFc()
Specified by:
listFc in interface org.objectweb.fractal.api.control.BindingController

lookupFc

public java.lang.Object lookupFc(java.lang.String s)
Specified by:
lookupFc in interface org.objectweb.fractal.api.control.BindingController

bindFc

public void bindFc(java.lang.String s,
                   java.lang.Object o)
Specified by:
bindFc in interface org.objectweb.fractal.api.control.BindingController

unbindFc

public void unbindFc(java.lang.String s)
Specified by:
unbindFc in interface org.objectweb.fractal.api.control.BindingController

getFcState

public java.lang.String getFcState()
Specified by:
getFcState in interface org.objectweb.fractal.api.control.LifeCycleController

startFc

public void startFc()
             throws org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
startFc in interface org.objectweb.fractal.api.control.LifeCycleController
Throws:
org.objectweb.fractal.api.control.IllegalLifeCycleException

stopFc

public void stopFc()
            throws org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
stopFc in interface org.objectweb.fractal.api.control.LifeCycleController
Throws:
org.objectweb.fractal.api.control.IllegalLifeCycleException

getPBinder

public org.objectweb.jorm.naming.api.PBinder getPBinder(java.lang.Class clazz)
                                                 throws org.objectweb.jorm.api.PException
Description copied from interface: JormFactory
Retrieve the Binder managing the persistent class (Not a Generic class). This method is a shortcut to this call: getPClassMapping(clazz).getPBinder()

Specified by:
getPBinder in interface JormFactory
Parameters:
clazz - the Jorm class name managed which the PBinder is asked
Returns:
the PBinder instance to use for the given jorm class name
Throws:
org.objectweb.jorm.api.PException

getPBinder

public org.objectweb.jorm.naming.api.PBinder getPBinder(java.lang.String classname,
                                                        java.lang.ClassLoader cl)
                                                 throws org.objectweb.jorm.api.PException
Description copied from interface: JormFactory
Retrieve the Binder managing the persistent class (Not a Generic class). This method is a shortcut to this call: getPClassMapping(Class.forName(classname, cl, true)).getPBinder()

Specified by:
getPBinder in interface JormFactory
Parameters:
classname - is the class name of the jorm class which the PBinder is required
cl - is the classloader where to find/load the class
Returns:
the PBinder instance to use for the given jorm class name
Throws:
org.objectweb.jorm.api.PException

getClassLoader

public java.lang.ClassLoader getClassLoader(java.lang.String className)
Description copied from interface: JormFactory
Retrieves the classloader of a class if the class has been already mapped. Otherwise a null value is returned

Specified by:
getClassLoader in interface JormFactory

getGenClassMapping

public org.objectweb.jorm.api.PClassMapping getGenClassMapping(java.lang.String path)
Description copied from interface: JormFactory
Retrieve the PClassMapping of a gen class since its path

Specified by:
getGenClassMapping in interface JormFactory
Parameters:
path - is the path representing the way to access the GenClassMapping

getPClassMapping

public org.objectweb.jorm.api.PClassMapping getPClassMapping(java.lang.Class clazz)
                                                      throws org.objectweb.jorm.api.PException
Description copied from interface: JormFactory
Retrieves a PClassMapping instance managing a jorm class. If the PClassMapping does not already exist then it is created, configured and mapped in the PMapper. The PClassMapping configuration contains the PBinder assignement, the PNamingContext assignement for each reference, and the GenClassMapping assignement. The assigned GenClassMapping must also be configured. In other hand the PClassMapping of referenced class is not configured now. Only the PNamingContext is needed.

Specified by:
getPClassMapping in interface JormFactory
Parameters:
clazz - is the class of the jorm class which the PClassMapping is required
Returns:
the PClassMapping which manages the persistent class
Throws:
org.objectweb.jorm.api.PException

getPNamingContext

public org.objectweb.jorm.naming.api.PNamingContext getPNamingContext(java.lang.String classname,
                                                                      java.lang.ClassLoader cl)
                                                               throws org.objectweb.jorm.api.PException
This Method is a shortcut to the getPNamingContext(SpeedoProxy) method. It only does the instanciation of the classname (Class.ForName(classsName).newInstance()) and call the getPNamingContext(SpeedoProxy) method with the created instance. Then if an instance is availlable it is better to use the other method.

Specified by:
getPNamingContext in interface JormFactory
Parameters:
classname - the Jorm class name managed by the wanted PNamingContext
Returns:
the PNamingContext instance to use for the given jorm class name
Throws:
org.objectweb.jorm.api.PException
See Also:
JormFactory.getPNamingContext(Class)

getPNamingContext

public org.objectweb.jorm.naming.api.PNamingContext getPNamingContext(java.lang.Class clazz)
                                                               throws org.objectweb.jorm.api.PException
Description copied from interface: JormFactory
Retrieve the PNamingcontext managing the persistent class (Not a Generic class) and its sub classes.

Specified by:
getPNamingContext in interface JormFactory
Parameters:
clazz - the Jorm class name managed which the PNamingContext is asked
Returns:
the PBinder instance to use for the given jorm class name
Throws:
org.objectweb.jorm.api.PException

getSpeedoProperties

public java.util.Properties getSpeedoProperties()
Description copied from interface: JormFactoryAttributes
Returns speedo properties used to configure each home (caching, ...)

Specified by:
getSpeedoProperties in interface JormFactoryAttributes

setSpeedoProperties

public void setSpeedoProperties(java.util.Properties p)
Description copied from interface: JormFactoryAttributes
Assignes speedo properties which permits to configure each home (caching, ...)

Specified by:
setSpeedoProperties in interface JormFactoryAttributes

registerClass

public void registerClass(javax.jdo.spi.RegisterClassEvent event)
Automatic mechanism for persistent clas registration.

Specified by:
registerClass in interface javax.jdo.spi.RegisterClassListener

codingSupported

public boolean codingSupported(int codingtype)
Specified by:
codingSupported in interface org.objectweb.jorm.naming.api.PNameCoder

decode

public org.objectweb.jorm.naming.api.PName decode(byte[] en)
                                           throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
decode in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

decodeAbstract

public org.objectweb.jorm.naming.api.PName decodeAbstract(java.lang.Object oid,
                                                          java.lang.Object context)
                                                   throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                                          java.lang.UnsupportedOperationException
Specified by:
decodeAbstract in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

decodeByte

public org.objectweb.jorm.naming.api.PName decodeByte(byte en)
                                               throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                                      java.lang.UnsupportedOperationException
Specified by:
decodeByte in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

decodeObyte

public org.objectweb.jorm.naming.api.PName decodeObyte(java.lang.Byte en)
                                                throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                                       java.lang.UnsupportedOperationException
Specified by:
decodeObyte in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

decodeChar

public org.objectweb.jorm.naming.api.PName decodeChar(char en)
                                               throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                                      java.lang.UnsupportedOperationException
Specified by:
decodeChar in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

decodeOchar

public org.objectweb.jorm.naming.api.PName decodeOchar(java.lang.Character en)
                                                throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                                       java.lang.UnsupportedOperationException
Specified by:
decodeOchar in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

decodeInt

public org.objectweb.jorm.naming.api.PName decodeInt(int en)
                                              throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                                     java.lang.UnsupportedOperationException
Specified by:
decodeInt in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

decodeOint

public org.objectweb.jorm.naming.api.PName decodeOint(java.lang.Integer en)
                                               throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                                      java.lang.UnsupportedOperationException
Specified by:
decodeOint in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

decodeLong

public org.objectweb.jorm.naming.api.PName decodeLong(long en)
                                               throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                                      java.lang.UnsupportedOperationException
Specified by:
decodeLong in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

decodeOlong

public org.objectweb.jorm.naming.api.PName decodeOlong(java.lang.Long en)
                                                throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                                       java.lang.UnsupportedOperationException
Specified by:
decodeOlong in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

decodeShort

public org.objectweb.jorm.naming.api.PName decodeShort(short en)
                                                throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                                       java.lang.UnsupportedOperationException
Specified by:
decodeShort in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

decodeOshort

public org.objectweb.jorm.naming.api.PName decodeOshort(java.lang.Short en)
                                                 throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                                        java.lang.UnsupportedOperationException
Specified by:
decodeOshort in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

decodeString

public org.objectweb.jorm.naming.api.PName decodeString(java.lang.String en)
                                                 throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
decodeString in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

decodeCharArray

public org.objectweb.jorm.naming.api.PName decodeCharArray(char[] en)
                                                    throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
decodeCharArray in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

decodeDate

public org.objectweb.jorm.naming.api.PName decodeDate(java.util.Date en)
                                               throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
decodeDate in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

decodeBigInteger

public org.objectweb.jorm.naming.api.PName decodeBigInteger(java.math.BigInteger en)
                                                     throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
decodeBigInteger in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

decodeBigDecimal

public org.objectweb.jorm.naming.api.PName decodeBigDecimal(java.math.BigDecimal en)
                                                     throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
decodeBigDecimal in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

encode

public byte[] encode(org.objectweb.jorm.naming.api.PName pn)
              throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
encode in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

encodeAbstract

public java.lang.Object encodeAbstract(org.objectweb.jorm.naming.api.PName pn)
                                throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                       java.lang.UnsupportedOperationException
Specified by:
encodeAbstract in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

encodeByte

public byte encodeByte(org.objectweb.jorm.naming.api.PName pn)
                throws org.objectweb.jorm.naming.api.PExceptionNaming,
                       java.lang.UnsupportedOperationException
Specified by:
encodeByte in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

encodeObyte

public java.lang.Byte encodeObyte(org.objectweb.jorm.naming.api.PName pn)
                           throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                  java.lang.UnsupportedOperationException
Specified by:
encodeObyte in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

encodeChar

public char encodeChar(org.objectweb.jorm.naming.api.PName pn)
                throws org.objectweb.jorm.naming.api.PExceptionNaming,
                       java.lang.UnsupportedOperationException
Specified by:
encodeChar in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

encodeOchar

public java.lang.Character encodeOchar(org.objectweb.jorm.naming.api.PName pn)
                                throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                       java.lang.UnsupportedOperationException
Specified by:
encodeOchar in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

encodeInt

public int encodeInt(org.objectweb.jorm.naming.api.PName pn)
              throws org.objectweb.jorm.naming.api.PExceptionNaming,
                     java.lang.UnsupportedOperationException
Specified by:
encodeInt in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

encodeOint

public java.lang.Integer encodeOint(org.objectweb.jorm.naming.api.PName pn)
                             throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                    java.lang.UnsupportedOperationException
Specified by:
encodeOint in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

encodeLong

public long encodeLong(org.objectweb.jorm.naming.api.PName pn)
                throws org.objectweb.jorm.naming.api.PExceptionNaming,
                       java.lang.UnsupportedOperationException
Specified by:
encodeLong in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

encodeOlong

public java.lang.Long encodeOlong(org.objectweb.jorm.naming.api.PName pn)
                           throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                  java.lang.UnsupportedOperationException
Specified by:
encodeOlong in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

encodeShort

public short encodeShort(org.objectweb.jorm.naming.api.PName pn)
                  throws org.objectweb.jorm.naming.api.PExceptionNaming,
                         java.lang.UnsupportedOperationException
Specified by:
encodeShort in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

encodeOshort

public java.lang.Short encodeOshort(org.objectweb.jorm.naming.api.PName pn)
                             throws org.objectweb.jorm.naming.api.PExceptionNaming,
                                    java.lang.UnsupportedOperationException
Specified by:
encodeOshort in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming
java.lang.UnsupportedOperationException

encodeString

public java.lang.String encodeString(org.objectweb.jorm.naming.api.PName pn)
                              throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
encodeString in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

encodeCharArray

public char[] encodeCharArray(org.objectweb.jorm.naming.api.PName pn)
                       throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
encodeCharArray in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

encodeDate

public java.util.Date encodeDate(org.objectweb.jorm.naming.api.PName pn)
                          throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
encodeDate in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

encodeBigInteger

public java.math.BigInteger encodeBigInteger(org.objectweb.jorm.naming.api.PName pn)
                                      throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
encodeBigInteger in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

encodeBigDecimal

public java.math.BigDecimal encodeBigDecimal(org.objectweb.jorm.naming.api.PName pn)
                                      throws org.objectweb.jorm.naming.api.PExceptionNaming
Specified by:
encodeBigDecimal in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.naming.api.PExceptionNaming

getNull

public org.objectweb.jorm.naming.api.PName getNull()
Specified by:
getNull in interface org.objectweb.jorm.naming.api.PNameCoder

setNullPName

public void setNullPName(java.lang.Object o)
                  throws org.objectweb.jorm.api.PException
Specified by:
setNullPName in interface org.objectweb.jorm.naming.api.PNameCoder
Throws:
org.objectweb.jorm.api.PException

supportDynamicComposite

public boolean supportDynamicComposite()
Specified by:
supportDynamicComposite in interface org.objectweb.jorm.naming.api.PNameCoder

supportCompositeField

public boolean supportCompositeField(java.lang.String fn,
                                     org.objectweb.jorm.type.api.PType ft)
Specified by:
supportCompositeField in interface org.objectweb.jorm.naming.api.PNameCoder

supportStaticComposite

public boolean supportStaticComposite()
Specified by:
supportStaticComposite in interface org.objectweb.jorm.naming.api.PNameCoder

getPType

public org.objectweb.jorm.type.api.PType getPType()
Specified by:
getPType in interface org.objectweb.jorm.naming.api.PNameCoder

setPType

public void setPType(org.objectweb.jorm.type.api.PType pt)
Specified by:
setPType in interface org.objectweb.jorm.naming.api.PNameCoder

getPClassMapping

public org.objectweb.jorm.api.PClassMapping getPClassMapping(java.lang.String className,
                                                             java.lang.ClassLoader classLoader)
                                                      throws org.objectweb.jorm.api.PException
This method is the real implementation of the getPClassMapping methods from the JormFactory interface. It instanciates and configure a persistent class. That represents - the instanciation of the PClassMapping - its configuration: fetching PNamingContext instances for each reference and allocating GenClassMapping for each gen class reference (collection). - the mapping of class (map operation on the mapper) - the management of data strucutre for the cluster (creation table)

Specified by:
getPClassMapping in interface JormFactory
Parameters:
className - is the class name of the persistent class which the PClasMapping is asked
classLoader - is the classloader for the persistent class. It assumes that the classloader contains the Speedo/Jorm classes about the persistent class (PClassMapping, PAccessor, PName, PBinder, PNG, ...)
Returns:
The PClassMapping of the persistent class
Throws:
org.objectweb.jorm.api.PException

findPBinder

public org.objectweb.jorm.naming.api.PBinder findPBinder(java.lang.String className,
                                                         java.lang.ClassLoader classLoader,
                                                         java.lang.String hints)
                                                  throws org.objectweb.jorm.api.PException
Retrieves a PBinder managing a given persistent class. This implementation delegates the PBinder allocation to NamingManager.

Parameters:
className - is the name of the persistent class which the asked PBinder must managed
classLoader - is the classloader for the persistent class. It assumes that the classloader contains the Speedo/Jorm classes about the persistent class (PClassMapping, PAccessor, PName, PBinder, PNG, ...)
hints - is a string data permitting to allocate and to configure the PBinder.
Returns:
the PBinder managing the given persistent class.
Throws:
org.objectweb.jorm.api.PException
See Also:
NamingManager

findPNameManager

protected org.objectweb.jorm.naming.api.PNameManager findPNameManager(java.lang.String className,
                                                                      java.lang.ClassLoader classLoader,
                                                                      org.objectweb.jorm.api.PClassMapping pcm,
                                                                      java.lang.String hints)
                                                               throws org.objectweb.jorm.api.PException
Retrieves a PNameManager managing a given persistent class and its sub classes. This implementation delegates the PNameManager allocation to NamingManager.

Parameters:
className - is the name of the persistent class which the asked PNameManager must managed (non null value is required)
classLoader - is the classloader for the persistent class. It assumes that the classloader contains the Speedo/Jorm classes about the persistent class (PClassMapping, PAccessor, PName, PBinder, PNG, ...) (non null value is required)
hints - is a string data permitting to allocate and to configure the PNameManager. (non null value is required)
Returns:
the PNameManager managing the given persistent class and its sub classes.
Throws:
org.objectweb.jorm.api.PException
See Also:
NamingManager

getGCMClassName

protected java.lang.String getGCMClassName(java.lang.String mapperName)
Retrieves the class name of the PClassMapping implementation for the generic class for a given mapper name.

Parameters:
mapperName - is a name of a Jorm Mapper (rdb, rdb.postgres, fos, ..)