org.objectweb.jorm.mapper.fos.genclass
Class FosGenClassMapping

java.lang.Object
  extended byorg.objectweb.jorm.genclass.lib.GenClassMapping
      extended byorg.objectweb.jorm.mapper.fos.genclass.FosGenClassMapping
All Implemented Interfaces:
FosGenClassProp, GenClassProp, Loggable, PClassMapping, PClassMappingCtrl

public class FosGenClassMapping
extends GenClassMapping
implements FosGenClassProp


Nested Class Summary
 
Nested classes inherited from class org.objectweb.jorm.api.PClassMapping
PClassMapping.ReferenceConfigurator
 
Field Summary
protected  java.lang.String className
           
protected  java.lang.String dirName
           
protected  java.lang.String fieldName
           
protected  java.lang.String genClassLevel
           
 
Fields inherited from class org.objectweb.jorm.genclass.lib.GenClassMapping
binder, elemClassMapping, elemFields, elemNameCoder, genClassMetaInfo, genClassPType, identifierFields, indexFields, jormClassName, logger, loggerFactory, mapper, projectName
 
Fields inherited from interface org.objectweb.jorm.api.PClassMapping
CLEANUP_DONOTHING, CLEANUP_REMOVEALL, CLEANUP_REMOVEDATA, CREATE_STRUCTURE_IF_NEEDED
 
Constructor Summary
FosGenClassMapping()
           
 
Method Summary
 PBinding createPBinding()
          It creates a new PBinding.
 java.util.Iterator getPNameIterator(java.lang.Object conn)
          It returns an iterator over all pname of persitent objects availlable in this class.
 void init(PMappingCallback mapper, MetaObject metaclass)
          It intialises the class mapping.
 boolean isConform(java.lang.String mappername)
          It specifies if the given kind of PMapper is supported by this PClassMapping.
 void setClassName(java.lang.String cn)
          Specifies the class within which the related generic class is defined.
 void setFieldName(java.lang.String fn)
          Specifies the field of the class which defines the related generic class.
 void setGenClassLevel(java.lang.String level)
          Specifies the level of names of the related generic class (e.g., for a set of lists, lists are level 0).
 
Methods inherited from class org.objectweb.jorm.genclass.lib.GenClassMapping
configureRefFields, getClassName, getElemFields, getGenClassMapping, getGenClassMapping, getIdentifierFields, getIndexFields, getLogger, getLoggerFactory, getMetaInfo, getPBinder, getPMapper, getPNameCoder, getPNameCoder, getProjectName, getPType, setElemDesc, setGenClassMapping, setGenClassMapping, setIdentifierDesc, setIndexDesc, setLogger, setLoggerFactory, setPBinder, setPNameCoder, setPNameCoder, setProjectName, setPType
 
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.genclass.api.GenClassProp
setElemDesc, setIdentifierDesc, setIndexDesc, setPType
 

Field Detail

className

protected java.lang.String className

fieldName

protected java.lang.String fieldName

genClassLevel

protected java.lang.String genClassLevel

dirName

protected java.lang.String dirName
Constructor Detail

FosGenClassMapping

public FosGenClassMapping()
Method Detail

init

public void init(PMappingCallback mapper,
                 MetaObject metaclass)
          throws PException
It intialises the class mapping. It especially assigns a mapper as well as a meta-object describing either a class or a generic class.

Specified by:
init in interface PClassMapping
Overrides:
init in class GenClassMapping
Parameters:
mapper - The mapper to be assigned to this class mapping.
metaclass - The meta-object describing the associated class. It may be null.
Throws:
PException

createPBinding

public PBinding createPBinding()
                        throws PException
It creates a new PBinding.

Specified by:
createPBinding in interface PClassMapping
Returns:
The new PBinding with lifecycle state set to LIFECYCLE_NOTBOUND.
Throws:
PException

getPNameIterator

public java.util.Iterator getPNameIterator(java.lang.Object conn)
                                    throws PException
It returns an iterator over all pname of persitent objects availlable in this class.

Specified by:
getPNameIterator in interface PClassMapping
Parameters:
conn - is the connection which permits to access to the support
Returns:
the iterator over PName objects
Throws:
PExceptionProtocol - A problem occured during the request that is not related to I/O.
PExceptionIO - A problem occured during the request.
PException

isConform

public boolean isConform(java.lang.String mappername)
It specifies if the given kind of PMapper is supported by this PClassMapping.

Specified by:
isConform in interface PClassMapping
Parameters:
mappername - The name defining the PMapper kind.
Returns:
true if this kind of mapper is supported.

setClassName

public void setClassName(java.lang.String cn)
Description copied from interface: FosGenClassProp
Specifies the class within which the related generic class is defined.

Specified by:
setClassName in interface FosGenClassProp

setFieldName

public void setFieldName(java.lang.String fn)
Description copied from interface: FosGenClassProp
Specifies the field of the class which defines the related generic class.

Specified by:
setFieldName in interface FosGenClassProp

setGenClassLevel

public void setGenClassLevel(java.lang.String level)
Description copied from interface: FosGenClassProp
Specifies the level of names of the related generic class (e.g., for a set of lists, lists are level 0).

Specified by:
setGenClassLevel in interface FosGenClassProp