org.marketcetera.ors
Class LocalIDFactory

java.lang.Object
  extended by org.marketcetera.ors.LocalIDFactory
All Implemented Interfaces:
IDFactory

public class LocalIDFactory
extends Object
implements IDFactory

A local ID factory. It relies on a block factory to assign blocks, and then locally assigns IDs within that block.

Since:
1.0.0
Version:
$Id: LocalIDFactory.java 16154 2012-07-14 16:34:05Z colin $
Author:
tlerios@marketcetera.com

Field Summary
static int LOCAL_ID_COUNT
          The count of local IDs assigned per block.
 
Constructor Summary
LocalIDFactory(IDFactory blockFactory)
          Creates a new local ID factory that relies on the given block factory.
 
Method Summary
 IDFactory getBlockFactory()
          Returns the receiver's block factory.
 String getNext()
           
 void init()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCAL_ID_COUNT

public static final int LOCAL_ID_COUNT
The count of local IDs assigned per block.

See Also:
Constant Field Values
Constructor Detail

LocalIDFactory

public LocalIDFactory(IDFactory blockFactory)
Creates a new local ID factory that relies on the given block factory.

Parameters:
blockFactory - The block factory.
Method Detail

getBlockFactory

public IDFactory getBlockFactory()
Returns the receiver's block factory.

Returns:
The factory.

init

public void init()
          throws ClassNotFoundException,
                 NoMoreIDsException
Specified by:
init in interface IDFactory
Throws:
ClassNotFoundException
NoMoreIDsException

getNext

public String getNext()
               throws NoMoreIDsException
Specified by:
getNext in interface IDFactory
Throws:
NoMoreIDsException


Copyright © 2012. All Rights Reserved.