Module CI

Class StockR

java.lang.Object
com.shr4pnel.db.StockR
Direct Known Subclasses:
StockRW

public class StockR extends Object
Implements read only access to the stock database.
Since:
v0.1.0
Author:
shrapnelnet
  • Constructor Details

    • StockR

      public StockR() throws com.shr4pnel.middleware.StockException
      Connects to database Uses a factory method to help set up the connection
      Throws:
      com.shr4pnel.middleware.StockException - if problem
  • Method Details

    • getConnectionObject

      protected Connection getConnectionObject()
      Used to access the current connection to the database
      Returns:
      The current connection to the database
    • getAllStock

      public String getAllStock()
      Used to access the contents of the StockTable
      Returns:
      Stringified JSON array containing current stock-list
    • getAllOrdersToPack

      public String getAllOrdersToPack()
      Get all orders in the OrderTable
      Returns:
      A stringified JSON array containing the contents of the OrderTable, as well as any items in the BasketTable referenced by an OrderTable foreign key