return retVal;
}
public Token getTokenByID( TokenID tokenID ) {
TokenImpl retVal = null;
Connection connection = null;
try {
String sql = "select * from bpm_token" +
" where tokenid = " + tokenID.getID();
connection = getConnection();
Statement statement = connection.createStatement();
ResultSet result = statement.executeQuery( sql );
result.next();
retVal = new TokenImpl();
retVal.setTokenID( new TokenID( result.getInt( "tokenid" ) ) );
retVal.setInstanceID( new InstanceID(
result.getInt( "instanceid" ) ) );
retVal.setCurrentNodeID(new NodeID(result.getInt("nodeid")));
retVal.setCurrentState( result.getInt( "state" ) );
retVal.setActive( result.getBoolean( "active" ) );
result.close();
statement.close();
} catch( SQLException e ) {
throw new RuntimeException( e );