org.objectweb.jorm.mapper.fos.genclass
Class FosGenClassMapping
java.lang.Object
org.objectweb.jorm.genclass.lib.GenClassMapping
org.objectweb.jorm.mapper.fos.genclass.FosGenClassMapping
- All Implemented Interfaces:
- FosGenClassProp, GenClassProp, Loggable, PClassMapping, PClassMappingCtrl
- public class FosGenClassMapping
- extends GenClassMapping
- implements FosGenClassProp
Fields inherited from class org.objectweb.jorm.genclass.lib.GenClassMapping |
binder, elemClassMapping, elemFields, elemNameCoder, genClassMetaInfo, genClassPType, identifierFields, indexFields, jormClassName, logger, loggerFactory, mapper, projectName |
Method Summary |
PBinding |
createPBinding()
It creates a new PBinding. |
PNameIterator |
getPNameIterator(java.lang.Object conn,
boolean withSubType,
boolean prefetching)
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, getPNameIterator, 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 |
className
protected java.lang.String className
fieldName
protected java.lang.String fieldName
genClassLevel
protected java.lang.String genClassLevel
dirName
protected java.lang.String dirName
FosGenClassMapping
public FosGenClassMapping()
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 PNameIterator getPNameIterator(java.lang.Object conn,
boolean withSubType,
boolean prefetching)
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 supportwithSubType
- indicates if the subclass instances must be included
into the iteratorprefetching
- indicates if prefething must be activated during the
query on the persistent 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