|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.objectweb.jorm.interp.genclass.lib.GenClassMapping
This abstract class provides all the generic code for the PClassMapping associated with JORM generic classes. It implements all methods except the following ones: createPBinding, initMappingStructures, isConform, and removeMappingStructures.
| Inner classes inherited from class org.objectweb.jorm.api.PClassMapping |
PClassMapping.ReferenceConfigurator |
| Field Summary | |
protected PBinder |
binder
The actual PBinder. |
protected PClassMapping |
elemClassMapping
The PClassMapping of the generic class instance representing the element stored within this generic class object. |
protected boolean |
elemCodingOnly
|
protected FieldDesc[] |
elemFields
This array contains the ScalarField meta object elements which represent the element fields of the generic class instance. |
protected PNamingContext |
elemNamingContext
The naming context associated to the reference elements of this generic class instance. |
protected GenClass |
genClassMetaInfo
It references the meta-information associated with this generic class. |
protected PType |
genClassPType
This field is the PType of the involved generic class. |
protected FieldDesc[] |
identifierFields
This array contains the ScalarField meta object elements which represent the identifier fields of the generic class instance. |
protected FieldDesc[] |
indexFields
This array contains the ScalarField meta object elements which represent the index fields of the generic class instance. |
protected org.objectweb.util.monolog.api.Logger |
logger
The logger to log all information related to the mapping of this class. |
protected org.objectweb.util.monolog.api.LoggerFactory |
loggerFactory
The loggerFactory. |
protected PMapper |
mapper
This field references the mapper. |
| Fields inherited from interface org.objectweb.jorm.api.PClassMapping |
CLEANUP_DONOTHING, CLEANUP_REMOVEALL, CLEANUP_REMOVEDATA, CREATE_STRUCTURE_IF_NEEDED |
| Constructor Summary | |
GenClassMapping()
|
|
| Method Summary | |
void |
configureRefFields(PClassMapping.ReferenceConfigurator rc)
It permits to assign the PNamingContext of all the reference fields of the persitent class. |
java.lang.String |
getClassName()
It retrieves the name of the class mapped by this PClassMapping. |
FieldDesc[] |
getElemFields()
|
PClassMapping |
getGenClassMapping()
It gives access to the PClassMapping associated to the element of a generic class whose type is a generic class. |
PClassMapping |
getGenClassMapping(java.lang.String fn)
It gives access to the PClassMapping associated to a field whose type is a generic class. |
FieldDesc[] |
getIdentifierFields()
|
FieldDesc[] |
getIndexFields()
|
org.objectweb.util.monolog.api.Logger |
getLogger()
Returns a logger to an component that wants to log things. |
org.objectweb.util.monolog.api.LoggerFactory |
getLoggerFactory()
Returns a logger factory that allows the creation of new loggers. |
MetaObject |
getMetaInfo()
It returns the Class/GenClass object representing the meta-information associated to the JORM class/generic class whose mapping is defined by this PClassMapping. |
PBinder |
getPBinder()
It yields the PBinder associated to this PClassMapping. |
PMapper |
getPMapper()
It gives access to the mapper that has mapped the associated JORM class as defined by this PClassMapping. |
PNamingContext |
getPNameManager()
It returns the naming context that manages the references contained by the generic class instance whose mapping is defined by this PClassMapping. |
PNamingContext |
getPNameManager(java.lang.String fn)
It returns the naming context that manages the reference associated to a field whose type is a JORM class. |
PType |
getPType()
Retrieves the PType associated to the JORM class which is the type of the name managed by this naming context. |
void |
init(PMapper mapper,
MetaObject metaclass)
It intialises the class mapping. |
void |
setElemDesc(FieldDesc[] fds)
Defines the fields property specifying the fields composing the element value structure of a generic class instance elements. |
void |
setGcType(PType pt)
Defines the type property of a generic class instance. |
void |
setGenClassMapping(PClassMapping pcm)
It assigns the GenClassMapping used to manage the reference hold by a field whose type is a JORM class. |
void |
setGenClassMapping(java.lang.String fn,
PClassMapping pcm)
It assigns the GenClassMapping used to manage the reference hold by a field whose type is a JORM class. |
void |
setIdentifierDesc(FieldDesc[] fds)
Defines the fields property specifying the fields composing the identifier structure of a generic class instance. |
void |
setIndexDesc(FieldDesc[] fds)
Defines the fields property specifying the fields composing the index structure of a generic class instance elements. |
void |
setLogger(org.objectweb.util.monolog.api.Logger logger)
It assigns a logger to an component that wants to log things. |
void |
setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory lf)
It assigns a logger factory that allows the creation of new loggers. |
void |
setPBinder(PBinder pb)
It assigns the PBinder associated to this PClassMapping. |
void |
setPNamingContext(PNamingContext pnc,
boolean codingonly)
It assigns the PNamingContext used to manage the references hold by a generic class instance whose mapping is described by this PClassMapping. |
void |
setPNamingContext(java.lang.String fn,
PNamingContext pnc,
boolean codingonly)
It assigns the PNamingContext used to manage the reference hold by a field whose type is a JORM class. |
void |
setPType(PType pt)
It assigns the PType associated to the JORM class which is the type of the reference managed by this naming context. |
| 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.api.PClassMapping |
createPBinding, getPNameIterator, initMappingStructures, isConform, removeMappingStructures |
| Field Detail |
protected PMapper mapper
protected GenClass genClassMetaInfo
protected PType genClassPType
protected FieldDesc[] indexFields
protected FieldDesc[] identifierFields
protected FieldDesc[] elemFields
protected PBinder binder
protected PClassMapping elemClassMapping
protected PNamingContext elemNamingContext
protected boolean elemCodingOnly
protected org.objectweb.util.monolog.api.Logger logger
protected org.objectweb.util.monolog.api.LoggerFactory loggerFactory
| Constructor Detail |
public GenClassMapping()
| Method Detail |
public FieldDesc[] getElemFields()
public FieldDesc[] getIdentifierFields()
public FieldDesc[] getIndexFields()
public java.lang.String getClassName()
getClassName in interface PClassMappingorg.objectweb.jorm.api.PClassMappingpublic PClassMapping getGenClassMapping()
getGenClassMapping in interface PClassMappingpublic PClassMapping getGenClassMapping(java.lang.String fn)
getGenClassMapping in interface PClassMappingfn - The name of the generic class field.public MetaObject getMetaInfo()
getMetaInfo in interface PClassMappingPMapper.map(org.objectweb.jorm.api.PClassMapping, byte)public PBinder getPBinder()
getPBinder in interface PClassMappingpublic PMapper getPMapper()
getPMapper in interface PClassMapping
public PNamingContext getPNameManager()
throws java.lang.UnsupportedOperationException
getPNameManager in interface PClassMappingjava.lang.UnsupportedOperationException - It is raised when this
PClassMapping does not map
a generic class instance, or
when the elements of this
generic class instance are
not references.
public PNamingContext getPNameManager(java.lang.String fn)
throws java.lang.UnsupportedOperationException
getPNameManager in interface PClassMappingjava.lang.UnsupportedOperationException - It is raised when no naming
context is associated to
the corresponding field.
public void init(PMapper mapper,
MetaObject metaclass)
init in interface PClassMappingmapper - The mapper to be assigned to this class mapping.metaclass - The meta-object describing the associated class. It may
be null.
public void setPBinder(PBinder pb)
throws PExceptionTyping
setPBinder in interface PClassMappingpb - The PBinder associated to this PClassMapping.PExceptionTyping - It is raised when the structure of the
the name that identifies the DSI for
the PClassMapping is not supported by
this PBinder that should be connected
to this PClassMapping.
public void setPNamingContext(PNamingContext pnc,
boolean codingonly)
throws PExceptionTyping,
java.lang.UnsupportedOperationException
setPNamingContext in interface PClassMappingpnc - The PNamingContext to be associated to this generic class
PClassMapping for managing its reference elements.codingonly - It specifies that when using this naming context for
managing a reference, it only executes coding or
both coding and export/resolve phase.PExceptionTyping - It is raised when the structure of the
the names that reference the DSI stored
within the generic class instance is not
supported by this naming context.java.lang.UnsupportedOperationException - It is raised when this
PClassMapping does not map
a generic class instance, or
when the elements of this
generic class instance are
not references.
public void setPNamingContext(java.lang.String fn,
PNamingContext pnc,
boolean codingonly)
throws PExceptionTyping,
java.lang.UnsupportedOperationException
setPNamingContext in interface PClassMappingfn - The name of the involved field.pnc - The PNamingContext to be associated to this field for
managing the reference it may hold.codingonly - It specifies that when using this naming context for
managing a reference, it only executes coding or
both coding and export/resolve phase.PExceptionTyping - It is raised when the structure of the
the names that reference the DSI stored
within the generic class instance is not
supported by this naming context.java.lang.UnsupportedOperationException - It is raised when no naming
context is associated to
the corresponding field.
public void configureRefFields(PClassMapping.ReferenceConfigurator rc)
throws PException,
java.lang.UnsupportedOperationException
PClassMappingconfigureRefFields in interface PClassMappingorg.objectweb.jorm.api.PClassMappingpncg - is the callback object which knows the PNamingContext to use.PExceptionTyping - It is raised when the structure of the
the names that reference the DSI stored
within the generic class instance is not
supported by the naming context returned
by the callBack method.
public void setGenClassMapping(PClassMapping pcm)
throws java.lang.UnsupportedOperationException
setGenClassMapping in interface PClassMapping
public void setGenClassMapping(java.lang.String fn,
PClassMapping pcm)
throws java.lang.UnsupportedOperationException
setGenClassMapping in interface PClassMappingpublic PType getPType()
public void setPType(PType pt)
pt - The PType of the JORM class reference managed by this naming
context.public void setGcType(PType pt)
setGcType in interface GenClassProppt - The associated type.public void setIdentifierDesc(FieldDesc[] fds)
setIdentifierDesc in interface GenClassPropfds - The array of descriptions of the associated fields.public void setIndexDesc(FieldDesc[] fds)
setIndexDesc in interface GenClassPropfds - The array of descriptions of the associated fields.public void setElemDesc(FieldDesc[] fds)
setElemDesc in interface GenClassPropfds - The array of descriptions of the associated fields.public void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory lf)
setLoggerFactory in interface Loggableloggerfactory - The LoggerFactory object to obtain new loggers.public void setLogger(org.objectweb.util.monolog.api.Logger logger)
setLogger in interface LoggableLogger - The logger object.public org.objectweb.util.monolog.api.Logger getLogger()
LoggablegetLogger in interface Loggableorg.objectweb.jorm.util.api.Loggablelogger - the logger objectpublic org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
LoggablegetLoggerFactory in interface Loggableorg.objectweb.jorm.util.api.Loggableloggerfactory - the LoggerFactory object to obtain new loggers
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||