Class MaxGenerator

  extended by
      extended by
          extended by
              extended by
All Implemented Interfaces:

public class MaxGenerator
extends AbstractRDBMSGenerator

This generator for Relational Databases uses the "select max(column) from table" strategy. The block size is limited to 1. MaxPoidGenerator works with numbers, so clients using this generator must cast the ID to Long *

Required user properties

Optional user properties

Field Summary
protected static org.datanucleus.util.Localiser LOCALISER_RDBMS
Fields inherited from class
Fields inherited from class
connectionProvider, storeMgr
Fields inherited from class
allocationSize, block, initialValue, LOCALISER, name, properties, repositoryExists
Constructor Summary
MaxGenerator(java.lang.String name, java.util.Properties props)
Method Summary reserveBlock(long size)
          Method to reserve a block of identities.
Methods inherited from class
obtainGenerationBlock, requiresConnection
Methods inherited from class
setConnectionProvider, setStoreManager
Methods inherited from class
allocate, createRepository, current, currentValue, getName, getStorageClass, next, nextValue, obtainGenerationBlock, repositoryExists, requiresRepository, reserveBlock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected static final org.datanucleus.util.Localiser LOCALISER_RDBMS
Constructor Detail


public MaxGenerator(java.lang.String name,
                    java.util.Properties props)

name - Symbolic name for this generator
props - Properties defining the behaviour of this generator
Method Detail


public reserveBlock(long size)
Method to reserve a block of identities. Note : Only allocates a single id always.

Specified by:
reserveBlock in class
size - The block size
The reserved block

Copyright © 2009. All Rights Reserved.