NickolausDS / sousms

SOU Stock Market Simulator
2 stars 1 forks source link

Write java 'looper' Order and Buy classes #37

Open NickolausDS opened 11 years ago

NickolausDS commented 11 years ago

Documentation here:

https://github.com/NickolausDS/sousms/wiki/Executor-Orders

Also, The database connection should probably be made and kept by the Executor, so we don't have to make one each time we execute an order. The Executor should pass the live connection to the order via execute().

It should look something like public abstract execute(Connection dbConn)

nchelix commented 11 years ago

Currently working on this....question, would this interact with a SQL stored procedure?

NickolausDS commented 11 years ago

Yes. A from the buy class method execute(), it should call the stored procedure for buy in the database. I think this is all it will need to do, since a simple market by doesn't need to do anything else. A limit buy on the other hand, would check the stock price before it did the buy.

nchelix commented 11 years ago

This is done-ish....but need to figure out how to call which ID, it may need to pull order ID in a loop or something. Stored Procedure doesn't remove the ID value as expected

NickolausDS commented 11 years ago

The order class has been updated with documentation within the last couple hours. It should now have the data you were looking for, but it won't actually run yet until I fix the Executor class.