net.sf.hibernate.id
Class CounterGenerator

java.lang.Object
  extended bynet.sf.hibernate.id.CounterGenerator
All Implemented Interfaces:
IdentifierGenerator

Deprecated. use IncrementGenerator instead

public class CounterGenerator
extends Object
implements IdentifierGenerator

vm

An IdentifierGenerator that returns a long, constructed from the system time and a counter value. Not safe for use in a cluster!

Author:
Gavin King
See Also:
IncrementGenerator

Constructor Summary
CounterGenerator()
          Deprecated.  
 
Method Summary
 Serializable generate(SessionImplementor cache, Object obj)
          Deprecated. Generate a new identifier.
protected static short getCount()
          Deprecated.  
static void main(String[] args)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CounterGenerator

public CounterGenerator()
Deprecated. 
Method Detail

getCount

protected static short getCount()
Deprecated. 

generate

public Serializable generate(SessionImplementor cache,
                             Object obj)
Deprecated. 
Description copied from interface: IdentifierGenerator
Generate a new identifier.

Specified by:
generate in interface IdentifierGenerator
Parameters:
cache -
obj - the entity or toplevel collection for which the id is being generated
Returns:
Serializable a new identifier

main

public static void main(String[] args)
                 throws Exception
Deprecated. 
Throws:
Exception