Class:SequenceGenerator - Superclass: AbstractIdGenerator AbstractIdGenerator
⌊ SequenceGenerator
public class SequenceGenerator
extends AbstractIdGenerator
Constructor Summary | |
---|---|
SequenceGenerator(string sequenceName, integer allocationSize, Doctrine\ORM\EntityManager em) Initializes a new sequence generator. |
Method Summary | |
---|---|
integer|float | generate(mixed em, object entity) Generates an ID for the given entity. |
integer|float | Gets the maximum value of the currently allocated bag of values. |
integer|float | Gets the next value that will be returned by generate(). |
void | |
void | unserialize(mixed serialized) |
Methods inherited from Doctrine\ORM\Id\AbstractIdGenerator | |
---|---|
generate, isPostInsertGenerator |
public SequenceGenerator(string sequenceName, integer allocationSize, Doctrine\ORM\EntityManager em)
Initializes a new sequence generator.
public integer|float generate(mixed em, object entity)
Generates an ID for the given entity.
public integer|float getCurrentMaxValue()
Gets the maximum value of the currently allocated bag of values.
public integer|float getNextValue()
Gets the next value that will be returned by generate().
public void serialize()
public void unserialize(mixed serialized)
Represents an ID generator that uses a database sequence.