org.apache.openjpa.persistence
Class GeneratorImpl

java.lang.Object
  extended by org.apache.openjpa.persistence.GeneratorImpl
All Implemented Interfaces:
Generator

public class GeneratorImpl
extends Object
implements Generator

Represents a store sequence.

Since:
0.4.1
Author:
Abe White

Field Summary
 
Fields inherited from interface org.apache.openjpa.persistence.Generator
UUID_HEX, UUID_STRING, UUID_TYPE4_HEX, UUID_TYPE4_STRING
 
Constructor Summary
GeneratorImpl(Seq seq, String name, StoreContext ctx, ClassMetaData meta)
          Constructor; supply delegate.
 
Method Summary
 void allocate(int additional)
          Hint to the sequence to allocate additional values up-front for efficiency.
 Object current()
          The current sequence value, or null if the sequence does not support current values.
 boolean equals(Object other)
           
 Seq getDelegate()
          Delegate.
 String getName()
          The sequence name.
 int hashCode()
           
 Object next()
          The next sequence value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneratorImpl

public GeneratorImpl(Seq seq,
                     String name,
                     StoreContext ctx,
                     ClassMetaData meta)
Constructor; supply delegate.

Method Detail

getDelegate

public Seq getDelegate()
Delegate.

Specified by:
getDelegate in interface Generator

getName

public String getName()
Description copied from interface: Generator
The sequence name.

Specified by:
getName in interface Generator

next

public Object next()
Description copied from interface: Generator
The next sequence value.

Specified by:
next in interface Generator

current

public Object current()
Description copied from interface: Generator
The current sequence value, or null if the sequence does not support current values.

Specified by:
current in interface Generator

allocate

public void allocate(int additional)
Description copied from interface: Generator
Hint to the sequence to allocate additional values up-front for efficiency.

Specified by:
allocate in interface Generator

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.