net.shrine.sheriff.model
Class ProtocolNumberCounter
java.lang.Object
net.shrine.sheriff.model.ProtocolNumberCounter
public class ProtocolNumberCounter
- extends Object
|
Method Summary |
static int |
getLast(org.hibernate.Session session,
int year)
|
static int |
getNext(org.hibernate.Session session,
int year)
Drop to JDBC to atomically increment and make available for return the next protocol
number value for a givern year. |
String |
toString()
|
ProtocolNumberCounter
public ProtocolNumberCounter()
getLast
public static int getLast(org.hibernate.Session session,
int year)
getNext
public static int getNext(org.hibernate.Session session,
int year)
- Drop to JDBC to atomically increment and make available for return the next protocol
number value for a givern year. I believe that the SQL (LOCK TABLE syntax) is MYSQL
specific.
- Parameters:
session - year -
- Returns:
- the value incremented by this connection
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2011. All Rights Reserved.