pt.jcodeutil.core.ejb.numbering
Interface NumberingManager

All Superinterfaces:
javax.ejb.EJBObject, java.rmi.Remote

public interface NumberingManager
extends javax.ejb.EJBObject

Title: NumberingManagerBean

Description:

Version:
1.0
Author:
Marco Samuel (samuelbb@sapo.pt)

Method Summary
 long getCurrentID(java.lang.String id, java.lang.String dsourceEnv)
          Get the current ID for the identifier given by argument.
 long getNextID(java.lang.String id, java.lang.String dsourceEnv)
          Get the next ID for the identifier given by argument.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

getNextID

public long getNextID(java.lang.String id,
                      java.lang.String dsourceEnv)
               throws java.rmi.RemoteException,
                      java.sql.SQLException
Get the next ID for the identifier given by argument.
Parameters:
id - identifier of the key.
dsourceEnv - the root for the datasource in the environment
Returns:
long Next value for use given the key. If it doesn't exist, it will create one starting in 1.
Throws:
java.rmi.RemoteException -  
java.sql.SQLException -  

getCurrentID

public long getCurrentID(java.lang.String id,
                         java.lang.String dsourceEnv)
                  throws java.rmi.RemoteException,
                         java.sql.SQLException
Get the current ID for the identifier given by argument.
Parameters:
id - identifier of the key.
dsourceEnv - the root for the datasource in the environment
Returns:
long current value for use given the key.
Throws:
java.rmi.RemoteException -  
java.sql.SQLException -