org.jpox.store.rdbms.poid
Class MaxPoidGenerator
java.lang.Object
org.jpox.store.poid.AbstractPoidGenerator
org.jpox.store.poid.AbstractDatastorePoidGenerator
org.jpox.store.rdbms.poid.AbstractRDBMSPoidGenerator
org.jpox.store.rdbms.poid.MaxPoidGenerator
- All Implemented Interfaces:
- PoidGenerator, javax.jdo.datastore.Sequence
- public class MaxPoidGenerator
- extends AbstractRDBMSPoidGenerator
This generator for Relational Databases uses the "select max(column) from
table" strategy. The block Poid size is limited to 1. MaxPoidGenerator works
with numbers, so clients using this Poid must cast the ID to Long
Properties required for this PoidGenerator:
- Version:
- $Revision: 1.4 $
Constructor Summary |
MaxPoidGenerator(java.lang.String name,
java.util.Properties props)
Constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCALISER_RDBMS
protected static final Localiser LOCALISER_RDBMS
MaxPoidGenerator
public MaxPoidGenerator(java.lang.String name,
java.util.Properties props)
- Constructor.
- Parameters:
name
- Symbolic name for this generatorprops
- Properties defining the behaviour of this generator
reserveBlock
public PoidBlock reserveBlock(long size)
- Method to reserve a block of identities.
Note : Only allocates a single id always.
- Specified by:
reserveBlock
in class AbstractPoidGenerator
- Parameters:
size
- The block size
- Returns:
- The reserved block
Copyright © -2007 . All Rights Reserved.