org.objectweb.jorm.interp.genclass.memory.lib
Class MemoryGenClassMapping

java.lang.Object
  |
  +--org.objectweb.jorm.interp.genclass.lib.GenClassMapping
        |
        +--org.objectweb.jorm.interp.genclass.memory.lib.MemoryGenClassMapping
All Implemented Interfaces:
GenClassProp, Loggable, MemoryGenClassProp, PClassMapping

public class MemoryGenClassMapping
extends GenClassMapping
implements MemoryGenClassProp


Inner classes inherited from class org.objectweb.jorm.api.PClassMapping
PClassMapping.ReferenceConfigurator
 
Field Summary
protected  java.lang.String className
           
protected  java.lang.String fieldName
           
protected  int genClassLevel
           
static java.lang.String MAPPER_NAME
           
 
Fields inherited from class org.objectweb.jorm.interp.genclass.lib.GenClassMapping
binder, elemClassMapping, elemCodingOnly, elemFields, elemNamingContext, genClassMetaInfo, genClassPType, identifierFields, indexFields, logger, loggerFactory, mapper
 
Fields inherited from interface org.objectweb.jorm.api.PClassMapping
CLEANUP_DONOTHING, CLEANUP_REMOVEALL, CLEANUP_REMOVEDATA, CREATE_STRUCTURE_IF_NEEDED
 
Constructor Summary
MemoryGenClassMapping()
           
 
Method Summary
 PBinding createPBinding()
          It creates a new PBinding.
protected  java.lang.String getDir()
           
 void initMappingStructures(java.lang.Object conn, byte cleanup)
          It initializes the persistent structures required to map a JORM class within a particular Data Store.
 boolean isConform(java.lang.String mappername)
          It specifies if the given kind of PMapper is supported by this PClassMapping.
 void removeMappingStructures(java.lang.Object conn, boolean contentonly)
          It removes the persistent structures required to map a JORM class within a particular Data Store.
 void setFieldName(java.lang.String fn)
           
 void setGenClassLevel(int level)
           
 void setSourceClassName(java.lang.String cn)
           
 
Methods inherited from class org.objectweb.jorm.interp.genclass.lib.GenClassMapping
configureRefFields, getClassName, getElemFields, getGenClassMapping, getGenClassMapping, getIdentifierFields, getIndexFields, getLogger, getLoggerFactory, getMetaInfo, getPBinder, getPMapper, getPNameManager, getPNameManager, getPType, init, setElemDesc, setGcType, setGenClassMapping, setGenClassMapping, setIdentifierDesc, setIndexDesc, setLogger, setLoggerFactory, setPBinder, setPNamingContext, setPNamingContext, 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.interp.genclass.api.GenClassProp
setElemDesc, setGcType, setIdentifierDesc, setIndexDesc
 
Methods inherited from interface org.objectweb.jorm.api.PClassMapping
getPNameIterator
 

Field Detail

MAPPER_NAME

public static final java.lang.String MAPPER_NAME

className

protected java.lang.String className

fieldName

protected java.lang.String fieldName

genClassLevel

protected int genClassLevel
Constructor Detail

MemoryGenClassMapping

public MemoryGenClassMapping()
Method Detail

createPBinding

public PBinding createPBinding()
It creates a new PBinding.
Returns:
The new PBinding with lifecycle state set to LIFECYCLE_NOTBOUNDNOACC.

initMappingStructures

public void initMappingStructures(java.lang.Object conn,
                                  byte cleanup)
                           throws PExceptionProtocol,
                                  PExceptionIO
It initializes the persistent structures required to map a JORM class within a particular Data Store. This method has no effect when the structures already exist, or when the structure must not be manipulated via JORM (e.g., case of a legacy DS). The deletion of these structures may be requested before initializing them.
Parameters:
conn - The connection that can be used to access the DS.
cleanup - Tells if structures and/or data should be removed at initialization time.
Throws:
PExceptionProtocol - A problem occured during initialisation that is not related to I/O.
PExceptionIO - A problem occured during the initialization of the DS.

removeMappingStructures

public void removeMappingStructures(java.lang.Object conn,
                                    boolean contentonly)
                             throws PExceptionProtocol,
                                    PExceptionIO
It removes the persistent structures required to map a JORM class within a particular Data Store. This method has no effect when the structures do not exist, or when the structure must not be manipulated via JORM (e.g., case of a legacy DS).
Parameters:
conn - The connection that can be used to access the DS.
contentonly - It specifies if only the content of the persistent structures should be removed (it only removes data).
Throws:
PExceptionProtocol - A problem occured during the deletion that is not related to I/O.
PExceptionIO - A problem occured during the deletion of the DS.

isConform

public boolean isConform(java.lang.String mappername)
It specifies if the given kind of PMapper is supported by this PClassMapping.
Parameters:
mappername - The name defining the PMapper kind.
Returns:
true if this kind of mapper is supported.

setSourceClassName

public void setSourceClassName(java.lang.String cn)
Specified by:
setSourceClassName in interface MemoryGenClassProp

setFieldName

public void setFieldName(java.lang.String fn)
Specified by:
setFieldName in interface MemoryGenClassProp

setGenClassLevel

public void setGenClassLevel(int level)
Specified by:
setGenClassLevel in interface MemoryGenClassProp

getDir

protected java.lang.String getDir()