Skip to content

Commit

Permalink
Fix Invalid Procedure instance to be instantiable (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsami authored Mar 3, 2021
1 parent 78719e1 commit f6d1713
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/com/oltpbenchmark/api/TransactionType.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,21 @@

package com.oltpbenchmark.api;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Random;

public class TransactionType implements Comparable<TransactionType> {

public abstract static class Invalid extends Procedure { }
public static class Invalid extends Procedure {
@Override
public ResultSet run(
Connection conn, Random gen, int terminalWarehouseID, int numWarehouses, int terminalDistrictLowerID,
int terminalDistrictUpperID, Worker w) throws SQLException {
return null;
}
}
public static final int INVALID_ID = 0;
public static final TransactionType INVALID = new TransactionType(Invalid.class, INVALID_ID);

Expand Down

0 comments on commit f6d1713

Please sign in to comment.