Modifier and Type | Field and Description |
---|---|
protected DatabaseConnection |
conn |
private java.lang.String |
prefix |
private java.lang.String |
urlstub |
private java.util.HashMap<java.lang.Integer,java.lang.String> |
users |
Constructor and Description |
---|
PhpBB3Dao(java.lang.String urlstub,
java.lang.String dbType,
java.lang.String host,
int port,
java.lang.String dbname,
java.lang.String prefix,
java.lang.String user,
java.lang.String pw) |
Modifier and Type | Method and Description |
---|---|
void |
close()
close the connection to the database
|
protected void |
finalize() |
java.util.Date |
first()
return the date of the first entry
|
DCEntry |
get(int item)
retrieve a single item from the database
|
private DCEntry |
getOne(java.lang.String sql) |
private java.lang.String |
getUser(int poster_id) |
java.util.Date |
latest()
return the date of the latest entry
|
static void |
main(java.lang.String[] args) |
protected DCEntry |
parseResultSet(java.sql.ResultSet rs) |
java.util.concurrent.BlockingQueue<DCEntry> |
query(java.util.Date from,
int queueSize)
retrieve a set of entries in the database;
the result set contains all entries up to the most recent
all retrieved objects are pushed to the blocking queue
|
java.util.concurrent.BlockingQueue<DCEntry> |
query(int from,
int until,
int queueSize)
retrieve a set of entries in the database;
the object denoted with until is not contained in the result set
all retrieved objects are pushed concurrently to a blocking queue
|
int |
size()
get the maximum number of possible DCEntry items in the database
|
private java.util.concurrent.BlockingQueue<DCEntry> |
toQueue(java.lang.StringBuilder sql,
int queueSize) |
int |
writeSurrogates(java.util.concurrent.BlockingQueue<DCEntry> queue,
java.io.File targetdir,
java.lang.String versioninfo,
int maxEntriesInFile) |
static java.lang.String |
xmlCleaner(java.lang.String s) |
protected DatabaseConnection conn
private final java.lang.String urlstub
private final java.lang.String prefix
private final java.util.HashMap<java.lang.Integer,java.lang.String> users
public PhpBB3Dao(java.lang.String urlstub, java.lang.String dbType, java.lang.String host, int port, java.lang.String dbname, java.lang.String prefix, java.lang.String user, java.lang.String pw) throws java.lang.Exception
java.lang.Exception
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.util.Date first()
Dao
public java.util.Date latest()
Dao
public int size() throws java.sql.SQLException
Dao
public DCEntry get(int item)
Dao
public java.util.concurrent.BlockingQueue<DCEntry> query(int from, int until, int queueSize)
Dao
public java.util.concurrent.BlockingQueue<DCEntry> query(java.util.Date from, int queueSize)
Dao
private DCEntry getOne(java.lang.String sql)
private java.util.concurrent.BlockingQueue<DCEntry> toQueue(java.lang.StringBuilder sql, int queueSize)
protected DCEntry parseResultSet(java.sql.ResultSet rs) throws java.sql.SQLException, java.net.MalformedURLException
java.sql.SQLException
java.net.MalformedURLException
public static java.lang.String xmlCleaner(java.lang.String s)
private java.lang.String getUser(int poster_id)
public int writeSurrogates(java.util.concurrent.BlockingQueue<DCEntry> queue, java.io.File targetdir, java.lang.String versioninfo, int maxEntriesInFile)
writeSurrogates
in interface Dao
public void close()
Dao
public static void main(java.lang.String[] args)