com.exponto.jstock
Class JstockDB

java.lang.Object
  extended bycom.exponto.jstock.JstockDB

public class JstockDB
extends java.lang.Object

Creates and ecexute all sql statements. In order to reduce queries to the db, a cople of the smaller key tables are kept in memmory

Author:
kaare

Method Summary
 int createTicker(java.lang.String ticker, java.lang.String exchange)
           
static JstockDB getInstance()
           
 java.util.ArrayList loadLines(TickerID tId, int type)
          Loads lines from the database Discards any lines that may be in the array list before loading.
 java.lang.String loadNotes(TickerID tId)
           
 java.util.ArrayList loadWatchList()
           
 java.lang.String removePersistentLine(PersistentLine pL)
           
 java.util.ArrayList saveLines(TickerID tId, int type, java.util.ArrayList linesArray)
          Saves any modification to the lines in the database.
 java.lang.String saveNotes(TickerID tId, java.lang.String text)
           
 java.lang.String toggleWatchList(TickerID tId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static JstockDB getInstance()

loadWatchList

public java.util.ArrayList loadWatchList()

toggleWatchList

public java.lang.String toggleWatchList(TickerID tId)

loadNotes

public java.lang.String loadNotes(TickerID tId)

saveNotes

public java.lang.String saveNotes(TickerID tId,
                                  java.lang.String text)

loadLines

public java.util.ArrayList loadLines(TickerID tId,
                                     int type)
Loads lines from the database Discards any lines that may be in the array list before loading.

Returns:
the same Lines with content fresh from database.

saveLines

public java.util.ArrayList saveLines(TickerID tId,
                                     int type,
                                     java.util.ArrayList linesArray)
Saves any modification to the lines in the database. If there are any new lines, the lines will be (re)read from the database.

Returns:
The lines as they would be if loaded from database

removePersistentLine

public java.lang.String removePersistentLine(PersistentLine pL)

createTicker

public int createTicker(java.lang.String ticker,
                        java.lang.String exchange)


Copyright © 2004 Kaare Ranum