|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.facility.naming.olongid.LongIdManager
Is a manager helping the used of LongId identifier. A LongId is composed of two parts. The high bits describe the class identifier, whereas the low bits describes the object instance identifier. The limit between both parts are defined are building time (constructor). The allocation of identifiers is done through long generator. The manager permits to allocates PBinder and PNamingContext for normal class and generic class.
Field Summary | |
static java.lang.String |
CLASS_ID_NAME
Is the name of the persistent class used to load/store the association between a class name and its class identifier |
static int |
DEFAULT_CID_SIZE
Is the default size of the class identifier in term of number of bits |
static java.lang.String |
ID_CLASS_NAME
Is the name of the persistent class used to load/store the association between a class identifier and its class name. |
static int |
LONG_SIZE
is the number of bits of an identifier. |
Constructor Summary | |
LongIdManager()
Builds a LongIdManager with the default class identifier size. |
|
LongIdManager(PMapper mapper)
Builds and intializes a LongIdManager with the default class identifier size. |
|
LongIdManager(PMapper mapper,
int cidSize)
Builds and intializes a LongIdManager with a particular class identifier size. |
Method Summary | |
int |
getCidSize()
|
PMapper |
getMapper()
|
PBinder |
newClassPBinder(java.lang.String className,
java.lang.Object conn)
Allocates a new PBinder for a normal persistent class (not a generic class). |
PNamingContext |
newClassPNamingContext()
Allocates a new PNamingcontext for a normal persistent class (not a generic class). |
PBinder |
newGenClassPBinder()
Allocates a new PBinder for gen class. |
void |
setCidSize(int cidSize)
|
void |
setPMapper(PMapper mapper)
Instanciates and initializes a LongGenMgr Allocates a class identifier generator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_CID_SIZE
public static final int LONG_SIZE
public static final java.lang.String CLASS_ID_NAME
public static final java.lang.String ID_CLASS_NAME
Constructor Detail |
public LongIdManager()
public LongIdManager(PMapper mapper) throws PException
mapper
- is the mapper where the generator are persistent.public LongIdManager(PMapper mapper, int cidSize) throws PException
mapper
- is the mapper where the generator are persistent.cidSize
- is the number of bits allocated for the class identifier among the
number of bits of a long value (64).Method Detail |
public int getCidSize()
public void setCidSize(int cidSize)
public PMapper getMapper()
public void setPMapper(PMapper mapper) throws PException
mapper
- the mapper where the id generator are stored
PException
- if no LongGenMgr has been found in the specified
mapper.public PBinder newGenClassPBinder() throws PException
PException
public PNamingContext newClassPNamingContext() throws PException
PException
public PBinder newClassPBinder(java.lang.String className, java.lang.Object conn) throws PException
className
- is the name of the persistent classconn
- is a way to access the data support. If the value is null,
a connection is allocated from the mapper.
PException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |