Class InvoiceRepository
- java.lang.Object
-
- de.narimo.georepo.server.repository.InvoiceRepository
-
public class InvoiceRepository extends Object
-
-
Constructor Summary
Constructors Constructor Description InvoiceRepository()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcreateInvoicesTable()static voidremoveFailedInvoiceId(de.narimo.commons.jdbc.JDBCConnectionJNDI jdbcAuth, int reservedInvoiceCounter, String appInvoicePattern)static intreserveInvoiceId(de.narimo.commons.jdbc.JDBCConnectionJNDI jdbcAuth, String appInvoicePattern, String appkey)Reserves and returns the running invoice id counter.static voidupdateInvoice(de.narimo.commons.jdbc.JDBCConnectionJNDI jdbcAuth, String invoiceName, int reservedInvoiceCounter, String appInvoicePattern)
-
-
-
Method Detail
-
createInvoicesTable
public static void createInvoicesTable()
-
reserveInvoiceId
public static int reserveInvoiceId(de.narimo.commons.jdbc.JDBCConnectionJNDI jdbcAuth, String appInvoicePattern, String appkey) throws SQLExceptionReserves and returns the running invoice id counter. If the subsequent invoicing process is failing, the written row MUST be removed from the table to preserve the invoice id counter without missing values!- Parameters:
invoiceName-- Returns:
- Throws:
SQLException
-
updateInvoice
public static void updateInvoice(de.narimo.commons.jdbc.JDBCConnectionJNDI jdbcAuth, String invoiceName, int reservedInvoiceCounter, String appInvoicePattern) throws SQLException- Throws:
SQLException
-
removeFailedInvoiceId
public static void removeFailedInvoiceId(de.narimo.commons.jdbc.JDBCConnectionJNDI jdbcAuth, int reservedInvoiceCounter, String appInvoicePattern) throws SQLException- Throws:
SQLException
-
-