java.lang.Object
com.shr4pnel.db.StockR
- Direct Known Subclasses:
StockRW
Implements read only access to the stock database.
- Since:
- v0.1.0
- Author:
- shrapnelnet
-
Constructor Summary
ConstructorsConstructorDescriptionStockR()Connects to database Uses a factory method to help set up the connection -
Method Summary
Modifier and TypeMethodDescriptionGet all orders in the OrderTableUsed to access the contents of the StockTableprotected ConnectionUsed to access the current connection to the database
-
Constructor Details
-
StockR
public StockR() throws com.shr4pnel.middleware.StockExceptionConnects to database Uses a factory method to help set up the connection- Throws:
com.shr4pnel.middleware.StockException- if problem
-
-
Method Details
-
getConnectionObject
Used to access the current connection to the database- Returns:
- The current connection to the database
-
getAllStock
Used to access the contents of the StockTable- Returns:
- Stringified JSON array containing current stock-list
-
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
-