Class InvoiceRepository


  • public class InvoiceRepository
    extends Object
    • Constructor Detail

      • InvoiceRepository

        public InvoiceRepository()
    • Method Detail

      • createInvoicesTable

        public static void createInvoicesTable()
      • reserveInvoiceId

        public static int reserveInvoiceId​(de.narimo.commons.jdbc.JDBCConnectionJNDI jdbcAuth,
                                           String appInvoicePattern,
                                           String appkey)
                                    throws SQLException
        Reserves 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