|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The PClassMapping interface defines the behaviour of objects that contain all information required to map a JORM class. It is a PBinder but mainly delegates this behaviour to a nested PBinder that it must reference. It allows the creation or deletion of the persistent structures required to map this class within a particular hosting data store. It also holds references to naming contexts associated to reference fields, as well as to PClassMapping associated to generic class instances of relevant fields.
Nested Class Summary | |
static interface |
PClassMapping.ReferenceConfigurator
|
Field Summary | |
static byte |
CLEANUP_DONOTHING
It tells that a cleanup is required for a JORM class with nothing to do on existing data or hosting structures. |
static byte |
CLEANUP_REMOVEALL
It tells that a cleanup is required for a JORM class with the removal of existing data as well as hosting structures. |
static byte |
CLEANUP_REMOVEDATA
It tells that a cleanup is required for a JORM class with the removal of only existing data. |
static byte |
CREATE_STRUCTURE_IF_NEEDED
It permits to specify to create the if it does not already exist. |
Method Summary | |
void |
configureRefFields(PClassMapping.ReferenceConfigurator rc)
It permits to assign the PNameCoder of all the reference fields of the persitent class. |
PBinding |
createPBinding()
It creates a new PBinding. |
java.lang.String |
getClassName()
It retrieves the name of the class referenced by this PClassMapping. |
PNameCoder |
getClassPNameCoder()
It returns the PNameCoder to use for the class. |
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. |
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)
Deprecated. use getPNameIterator(Object, boolean, boolean) |
PNameIterator |
getPNameIterator(java.lang.Object conn,
boolean withSubType,
boolean prefetching,
java.lang.Object txctx)
It returns an iterator over all pname of persitent objects availlable in this class. |
java.lang.String |
getProjectName()
It retrieves the project name. |
PType |
getPType()
Retrieves the PType of this mapped JORM 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 |
setPBinder(PBinder pb)
It assigns the PBinder associated to this PClassMapping. |
Field Detail |
public static final byte CLEANUP_REMOVEALL
public static final byte CLEANUP_REMOVEDATA
public static final byte CREATE_STRUCTURE_IF_NEEDED
public static final byte CLEANUP_DONOTHING
Method Detail |
public PBinding createPBinding() throws PException
PException
public void init(PMappingCallback mapper, MetaObject metaclass) throws PException
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.lang.String getClassName()
public java.lang.String getProjectName()
public PClassMapping getGenClassMapping() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
- Raised when the method is not
supported by the PClassMapping.public PClassMapping getGenClassMapping(java.lang.String fn) throws java.lang.UnsupportedOperationException
fn
- The name of the generic class field.
java.lang.UnsupportedOperationException
- Raised when the method is not
supported by the PClassMapping.public MetaObject getMetaInfo()
PMapper.map(org.objectweb.jorm.api.PClassMapping)
public PBinder getPBinder()
public PMapper getPMapper()
public PNameCoder getPNameCoder() throws java.lang.UnsupportedOperationException
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
java.lang.UnsupportedOperationException
- It is raised when no naming
context is associated to
the corresponding field.public PNameCoder getClassPNameCoder()
public PNameIterator getPNameIterator(java.lang.Object conn, boolean withSubType, boolean prefetching, java.lang.Object txctx) throws PException
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.txctx
- The transaction context that can be used in case of
prefetching.
PExceptionProtocol
- A problem occured during the request
that is not related to I/O.
PExceptionIO
- A problem occured during the request.
PException
public java.util.Iterator getPNameIterator(java.lang.Object conn) throws PException
PException
public PType getPType()
public boolean isConform(java.lang.String mappername)
mappername
- The name defining the PMapper kind.
public void setPBinder(PBinder pb) throws PException
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.
PException
public void configureRefFields(PClassMapping.ReferenceConfigurator rc) throws PException, java.lang.UnsupportedOperationException
rc
- is the callback object which knows the PNameCoder 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.
PException
java.lang.UnsupportedOperationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |