org.objectweb.jorm.facility.naming.rdbsequence
Class RdbSequenceLongGen
java.lang.Object
org.objectweb.jorm.facility.naming.rdbsequence.RdbSequenceHelper
org.objectweb.jorm.facility.naming.rdbsequence.RdbSequenceLongGen
- All Implemented Interfaces:
- LongGen
- public class RdbSequenceLongGen
- extends RdbSequenceHelper
- implements LongGen
- Author:
- S.Chassande-Barrioz
Method Summary |
long |
allocateIds(int additional)
Allocate a range of ids. |
long |
current()
return the id that will be assigned next time. |
long |
genId()
/**
Generates a new long identifier. |
long |
genId(java.lang.Object _conn)
|
int |
getIncrement()
|
void |
setIncrement(int incr)
|
Methods inherited from class org.objectweb.jorm.facility.naming.rdbsequence.RdbSequenceHelper |
allocateHint, allocateId, createSequence, getAdapter, getLogger, getSequenceCache, getSequenceIncrement, getSequenceName, getSequenceStart, isSequenceCreated, setAdapter, setLogger, setSequenceCache, setSequenceCreated, setSequenceIncrement, setSequenceName, setSequenceStart |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RdbSequenceLongGen
public RdbSequenceLongGen(PMapperRdb mapper,
java.lang.String seqName,
boolean sequenceCreated)
genId
public long genId()
throws PException
- Description copied from interface:
LongGen
- /**
Generates a new long identifier.
- Specified by:
genId
in interface LongGen
- Returns:
- The new identifier.
- Throws:
PException
genId
public long genId(java.lang.Object _conn)
throws PException
- Specified by:
genId
in interface LongGen
- Throws:
PException
allocateIds
public long allocateIds(int additional)
throws PException
- Description copied from interface:
LongGen
- Allocate a range of ids.
- Specified by:
allocateIds
in interface LongGen
- Parameters:
additional
-
- Returns:
- the last identifier allocated
- Throws:
PException
setIncrement
public void setIncrement(int incr)
- Specified by:
setIncrement
in interface LongGen
getIncrement
public int getIncrement()
- Specified by:
getIncrement
in interface LongGen
current
public long current()
- Description copied from interface:
LongGen
- return the id that will be assigned next time.
- Specified by:
current
in interface LongGen