|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.facility.naming.olongid.CompositePLongGen
This object long identifier generates identifier divided in two parts. The first part is the value representing a class persistent class. The second part is a value representing the instance of the class. In fact this generator adds a fixed value (class id) with another long values choosen by a sub PLongGen.
Field Summary | |
protected long |
cid
The identifier of the persitent class |
protected int |
cidSize
|
protected PLongGen |
objectIdGenerator
The inner generator of object identifier |
Constructor Summary | |
CompositePLongGen(PLongGen objectIdGenerator,
long cid,
int cidSize)
|
Method Summary | |
long |
allocateIds(int additional)
Allocate a range of ids. |
long |
current()
return the id that will be assigned next time. |
long |
genId()
Allocates a new composite identifier |
long |
genId(java.lang.Object conn)
Allocates a new composite identifier |
long |
getCid()
|
int |
getIncrement()
|
void |
init(java.lang.String name,
PClassMapping pcm,
LongGenMgr mgr)
Initializes the underlying object identifier generator |
void |
setIncrement(int incr)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected PLongGen objectIdGenerator
protected long cid
protected int cidSize
Constructor Detail |
public CompositePLongGen(PLongGen objectIdGenerator, long cid, int cidSize)
Method Detail |
public long getCid()
public void init(java.lang.String name, PClassMapping pcm, LongGenMgr mgr) throws PException
init
in interface PLongGen
name
- The name identifier associated with this long generator.pcm
- The associated PClassMapping.mgr
- The manager associated with this generator.
PException
public long genId() throws PException
genId
in interface LongGen
PException
public long genId(java.lang.Object conn) throws PException
genId
in interface LongGen
conn
- is a way to access the data support
PException
public long allocateIds(int additional) throws PException
LongGen
allocateIds
in interface LongGen
additional
-
PException
public void setIncrement(int incr)
setIncrement
in interface LongGen
public int getIncrement()
getIncrement
in interface LongGen
public long current()
LongGen
current
in interface LongGen
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |