|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.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, and isConform.
Nested Class Summary |
Nested classes inherited from class org.objectweb.jorm.api.PClassMapping |
PClassMapping.ReferenceConfigurator |
Field Summary | |
protected PBinder |
binder
The actual PBinder. |
protected PNameCoder |
classPNC
|
protected PClassMapping |
elemClassMapping
The PClassMapping of the generic class instance representing the element stored within this generic class object. |
protected FieldDesc[] |
elemFields
This array contains the ScalarField meta object elements which represent the element fields of the generic class instance. |
protected PNameCoder |
elemNameCoder
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 java.lang.String |
jormClassName
Fully quailied name of the persitent class |
protected Logger |
logger
The logger to log all information related to the mapping of this class. |
protected LoggerFactory |
loggerFactory
The loggerFactory. |
protected PMappingCallback |
mapper
This field references the mapper. |
protected java.lang.String |
projectName
|
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 PNameCoder of all the reference fields of the persitent class. |
java.lang.String |
getClassName()
It retrieves the name of the class mapped by this PClassMapping. |
PNameCoder |
getClassPNameCoder()
It returns the PNameCoder to use for the class. |
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()
|
Logger |
getLogger()
Returns a logger to an component that wants to log things. |
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. |
PNameCoder |
getPNameCoder()
It returns the naming context that manages the references contained by the generic class instance whose mapping is defined by this PClassMapping. |
PNameCoder |
getPNameCoder(java.lang.String fn)
It returns the naming context that manages the reference associated to a field whose type is a JORM class. |
java.util.Iterator |
getPNameIterator(java.lang.Object conn)
|
java.lang.String |
getProjectName()
It retrieves the project name. |
PType |
getPType()
Retrieves the PType associated to the JORM class which is the type of the name managed by this naming context. |
void |
init(PMappingCallback mapper,
MetaObject metaclass)
It intialises the class mapping. |
void |
read(PBinding pb,
java.lang.Object conn,
PAccessor pa,
java.lang.Object txctx)
It reads the data store instance designated by the PName of a binding and transfers each attribute value to the accessor object. |
void |
read(PBinding pb,
java.lang.Object conn,
PAccessor pa,
java.lang.Object txctx,
boolean forUpdate)
|
void |
setClassPNameCoder(PNameCoder pnc)
It assigns the PNameCoder to use for the class. |
void |
setElemDesc(FieldDesc[] fds)
Defines the fields property specifying the fields composing the element value structure of a generic class instance elements. |
void |
setGenClassMapping(PClassMapping pcm)
It assigns the GenClassMapping used to manage the reference hold by a field whose type is a JORM gen 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(Logger logger)
It assigns a logger to an component that wants to log things. |
void |
setLoggerFactory(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 |
setPNameCoder(PNameCoder pnc)
It assigns the PNameCoder used to manage the references hold by a generic class instance whose mapping is described by this PClassMapping. |
void |
setPNameCoder(java.lang.String fn,
PNameCoder pnc)
It assigns the PNameCoder used to manage the reference hold by a field whose type is a JORM class. |
void |
setProjectName(java.lang.String projectName)
Assignes the project name to a PClassMapping. |
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 |
addAssociation, classDefined, createPBinding, exist, getAssociationTable, getDecodedPName, getIndexesTable, getPNameIterator, getSubPCMs, init, isConform, match, read, resolve, write |
Field Detail |
protected PMappingCallback mapper
protected GenClass genClassMetaInfo
protected PType genClassPType
protected java.lang.String jormClassName
protected FieldDesc[] indexFields
protected FieldDesc[] identifierFields
protected FieldDesc[] elemFields
protected PBinder binder
protected PNameCoder classPNC
protected PClassMapping elemClassMapping
protected PNameCoder elemNameCoder
protected java.lang.String projectName
protected Logger logger
protected LoggerFactory loggerFactory
Constructor Detail |
public GenClassMapping()
Method Detail |
public FieldDesc[] getElemFields()
public FieldDesc[] getIdentifierFields()
public FieldDesc[] getIndexFields()
public java.lang.String getProjectName()
PClassMapping
getProjectName
in interface PClassMapping
public void setProjectName(java.lang.String projectName)
PClassMappingCtrl
setProjectName
in interface PClassMappingCtrl
projectName
- to be assignedpublic java.lang.String getClassName()
getClassName
in interface PClassMapping
public PClassMapping getGenClassMapping()
getGenClassMapping
in interface PClassMapping
public PClassMapping getGenClassMapping(java.lang.String fn)
getGenClassMapping
in interface PClassMapping
fn
- The name of the generic class field.
public MetaObject getMetaInfo()
getMetaInfo
in interface PClassMapping
PMapper.map(org.objectweb.jorm.api.PClassMapping)
public PBinder getPBinder()
getPBinder
in interface PClassMapping
public PNameCoder getClassPNameCoder()
PClassMapping
getClassPNameCoder
in interface PClassMapping
public PMapper getPMapper()
getPMapper
in interface PClassMapping
public PNameCoder getPNameCoder() throws java.lang.UnsupportedOperationException
getPNameCoder
in interface PClassMapping
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 PNameCoder getPNameCoder(java.lang.String fn) throws java.lang.UnsupportedOperationException
getPNameCoder
in interface PClassMapping
java.lang.UnsupportedOperationException
- It is raised when no naming
context is associated to
the corresponding field.public void init(PMappingCallback mapper, MetaObject metaclass) throws PException
init
in interface PClassMapping
mapper
- The mapper to be assigned to this class mapping.metaclass
- The meta-object describing the associated class. It may
be null.
PException
public java.util.Iterator getPNameIterator(java.lang.Object conn) throws PException
getPNameIterator
in interface PClassMapping
PException
public void setPBinder(PBinder pb) throws PExceptionTyping
setPBinder
in interface PClassMapping
pb
- 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 setClassPNameCoder(PNameCoder pnc) throws PException
PClassMappingCtrl
setClassPNameCoder
in interface PClassMappingCtrl
PException
public void configureRefFields(PClassMapping.ReferenceConfigurator rc) throws PException, java.lang.UnsupportedOperationException
PClassMapping
configureRefFields
in interface PClassMapping
rc
- is the callback object which knows the PNameCoder to use.
PException
java.lang.UnsupportedOperationException
public void setPNameCoder(PNameCoder pnc) throws PException, java.lang.UnsupportedOperationException
setPNameCoder
in interface PClassMappingCtrl
pnc
- The PNameCoder to be associated to this generic class
PClassMapping for managing its reference elements.
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.
PException
public void setPNameCoder(java.lang.String fn, PNameCoder pnc) throws PException, java.lang.UnsupportedOperationException
setPNameCoder
in interface PClassMappingCtrl
fn
- The name of the involved field.pnc
- The PNameCoder to be associated to this field for
managing the reference it may hold.
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.
PException
public void setGenClassMapping(PClassMapping pcm) throws java.lang.UnsupportedOperationException
setGenClassMapping
in interface PClassMappingCtrl
java.lang.UnsupportedOperationException
public void setGenClassMapping(java.lang.String fn, PClassMapping pcm) throws java.lang.UnsupportedOperationException
setGenClassMapping
in interface PClassMappingCtrl
java.lang.UnsupportedOperationException
public PType getPType()
getPType
in interface PClassMapping
public void setPType(PType pt)
setPType
in interface GenClassProp
pt
- The PType of the JORM class reference managed by this naming
context.public void read(PBinding pb, java.lang.Object conn, PAccessor pa, java.lang.Object txctx) throws PException
PClassMapping
read
in interface PClassMapping
conn
- The connection that can be used to refer to the DS.pa
- The PAccessor used to access memory variables.txctx
- The transaction context that can be used in case of
prefetching.
PException
public void read(PBinding pb, java.lang.Object conn, PAccessor pa, java.lang.Object txctx, boolean forUpdate) throws PException
read
in interface PClassMapping
PException
public void setIdentifierDesc(FieldDesc[] fds)
setIdentifierDesc
in interface GenClassProp
fds
- The array of descriptions of the associated fields.public void setIndexDesc(FieldDesc[] fds)
setIndexDesc
in interface GenClassProp
fds
- The array of descriptions of the associated fields.public void setElemDesc(FieldDesc[] fds)
setElemDesc
in interface GenClassProp
fds
- The array of descriptions of the associated fields.public void setLoggerFactory(LoggerFactory lf)
setLoggerFactory
in interface Loggable
lf
- The LoggerFactory object to obtain new loggers.public void setLogger(Logger logger)
setLogger
in interface Loggable
logger
- The logger object.public Logger getLogger()
Loggable
getLogger
in interface Loggable
public LoggerFactory getLoggerFactory()
Loggable
getLoggerFactory
in interface Loggable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |