org.objectweb.jorm.facility.naming.polymorphid
Interface PolymorphIdMgr

All Known Implementing Classes:
PolymorphIdMgrImpl

public interface PolymorphIdMgr

This manager allows the retrieval/allocation of PBinders and PNamingContext that manage polymorphic identifiers/references. These identifiers/references are composed of two longs: the first is the class identifier and the second one is the object identifier within this class (see PolymorphName.pd).

Author:
P. Dechamboux

Method Summary
 void binderTypeDef(PolymorphIdBinderInfo b)
          Notifies the manager that a PType has been associated with this binder.
 LongGenMgr getLongGenMgr()
          Retrieves the LongGenMgr associated with this PolymorphIdMgr.
 PBinder getPBinder(long id)
          Retrieves a PBinder that manages polymorphic identifiers for the class with the given name.
 PBinder getPBinder(java.lang.String cn)
          Retrieves a PBinder that manages polymorphic identifiers for the class with the given name.
 PBinder getPBinder(java.lang.String cn, java.lang.Object conn)
          Retrieves a PBinder that manages polymorphic identifiers for the class with the given name.
 PMapper getPMapper()
          Retrieves the mapper associated with this PolymorphIdMgr.
 PNamingContext getRefNC(java.lang.String cn)
          Retrieves a PNamingContext that manages polymorphic references for the class with the given name.
 void init(PMapper pm, byte clact)
          Initializes a polymorphic identifier manager by mapping relevant classes to the given mapper, and setting up relevant initial persistent information.
 void ncTypeDef(PolymorphRefNC n)
          Notifies the manager that a PType has been associated with this binder.
 long newClassId()
          Allocates a new persisttent class identifier.
 long newClassId(java.lang.Object conn)
           
 

Method Detail

binderTypeDef

public void binderTypeDef(PolymorphIdBinderInfo b)
Notifies the manager that a PType has been associated with this binder.


getLongGenMgr

public LongGenMgr getLongGenMgr()
Retrieves the LongGenMgr associated with this PolymorphIdMgr.


getPBinder

public PBinder getPBinder(java.lang.String cn)
                   throws PException
Retrieves a PBinder that manages polymorphic identifiers for the class with the given name. If it does not exist, creates it.

Parameters:
cn - The class name.
Throws:
PException

getPBinder

public PBinder getPBinder(long id)
                   throws PException
Retrieves a PBinder that manages polymorphic identifiers for the class with the given name. If it does not exist, creates it.

Throws:
PException

getPBinder

public PBinder getPBinder(java.lang.String cn,
                          java.lang.Object conn)
                   throws PException
Retrieves a PBinder that manages polymorphic identifiers for the class with the given name. If it does not exist, creates it.

Parameters:
cn - The class name.
Throws:
PException

getPMapper

public PMapper getPMapper()
Retrieves the mapper associated with this PolymorphIdMgr.


getRefNC

public PNamingContext getRefNC(java.lang.String cn)
Retrieves a PNamingContext that manages polymorphic references for the class with the given name. This means that such references can point to object of this class or any of its sub-classes. If it does not exist, creates it.

Parameters:
cn - The class name.

init

public void init(PMapper pm,
                 byte clact)
          throws PException
Initializes a polymorphic identifier manager by mapping relevant classes to the given mapper, and setting up relevant initial persistent information.

Throws:
PException

ncTypeDef

public void ncTypeDef(PolymorphRefNC n)
Notifies the manager that a PType has been associated with this binder.


newClassId

public long newClassId()
                throws PException
Allocates a new persisttent class identifier.

Throws:
PException

newClassId

public long newClassId(java.lang.Object conn)
                throws PException
Throws:
PException