public class BasicJDBCSerializer extends Object implements IJDBCSerializer
BaseCrawlData
instances.Modifier and Type | Field and Description |
---|---|
protected static String |
ALL_FIELDS |
Constructor and Description |
---|
BasicJDBCSerializer() |
Modifier and Type | Method and Description |
---|---|
String |
getCachedCrawlDataSQL()
Gets the SQL to obtain all
ICrawlData from the cache table. |
Object[] |
getCachedCrawlDataValues(String reference)
Gets the
PreparedStatement values (if any) necessary to
execute the SQL obtained with IJDBCSerializer.getCachedCrawlDataSQL() . |
String[] |
getCreateTableSQLs(String table)
Gets the SQLs used to create a data store table.
|
String |
getDeleteCrawlDataSQL(String table)
Gets the SQL to delete a
ICrawlData from the given table. |
Object[] |
getDeleteCrawlDataValues(String table,
ICrawlData crawlURL)
Gets the
PreparedStatement values (if any) necessary to
execute the SQL obtained with IJDBCSerializer.getDeleteCrawlDataSQL(String) . |
String |
getInsertCrawlDataSQL(String table)
Gets the SQL to insert a new
ICrawlData in the given table. |
Object[] |
getInsertCrawlDataValues(String table,
ICrawlData crawlData)
Gets the
PreparedStatement values (if any) necessary to
execute the SQL obtained with IJDBCSerializer.getInsertCrawlDataSQL(String) . |
String |
getNextQueuedCrawlDataSQL()
Gets the SQL to obtain the next
ICrawlData from the queue table. |
Object[] |
getNextQueuedCrawlDataValues()
Gets the
PreparedStatement values (if any) necessary to
execute the SQL obtained with IJDBCSerializer.getNextQueuedCrawlDataSQL() . |
String |
getReferenceExistsSQL(String table)
Gets the SQL to find if a
ICrawlData exists in the given table. |
Object[] |
getReferenceExistsValues(String table,
String reference)
Gets the
PreparedStatement values (if any) necessary to
execute the SQL obtained with IJDBCSerializer.getReferenceExistsSQL(String) . |
String |
getSelectCrawlDataSQL(String table)
Gets the SQL to obtain all
ICrawlData entries in the given
table. |
ICrawlData |
toCrawlData(String table,
ResultSet rs)
Convert a database entry to a
ICrawlData instance. |
protected static final String ALL_FIELDS
public String[] getCreateTableSQLs(String table)
IJDBCSerializer
getCreateTableSQLs
in interface IJDBCSerializer
table
- the table to create an SQL forpublic String getSelectCrawlDataSQL(String table)
IJDBCSerializer
ICrawlData
entries in the given
table.getSelectCrawlDataSQL
in interface IJDBCSerializer
table
- table namepublic String getDeleteCrawlDataSQL(String table)
IJDBCSerializer
ICrawlData
from the given table.getDeleteCrawlDataSQL
in interface IJDBCSerializer
table
- table namepublic Object[] getDeleteCrawlDataValues(String table, ICrawlData crawlURL)
IJDBCSerializer
PreparedStatement
values (if any) necessary to
execute the SQL obtained with IJDBCSerializer.getDeleteCrawlDataSQL(String)
.
The values must be returned in the expected order.getDeleteCrawlDataValues
in interface IJDBCSerializer
table
- table namecrawlURL
- the crawl data to deletepublic String getInsertCrawlDataSQL(String table)
IJDBCSerializer
ICrawlData
in the given table.getInsertCrawlDataSQL
in interface IJDBCSerializer
table
- table namepublic Object[] getInsertCrawlDataValues(String table, ICrawlData crawlData)
IJDBCSerializer
PreparedStatement
values (if any) necessary to
execute the SQL obtained with IJDBCSerializer.getInsertCrawlDataSQL(String)
.
The values must be returned in the expected order.getInsertCrawlDataValues
in interface IJDBCSerializer
table
- table namecrawlData
- the crawl data to insertpublic String getNextQueuedCrawlDataSQL()
IJDBCSerializer
ICrawlData
from the queue table.getNextQueuedCrawlDataSQL
in interface IJDBCSerializer
public Object[] getNextQueuedCrawlDataValues()
IJDBCSerializer
PreparedStatement
values (if any) necessary to
execute the SQL obtained with IJDBCSerializer.getNextQueuedCrawlDataSQL()
.
The values must be returned in the expected order.getNextQueuedCrawlDataValues
in interface IJDBCSerializer
public String getCachedCrawlDataSQL()
IJDBCSerializer
ICrawlData
from the cache table.getCachedCrawlDataSQL
in interface IJDBCSerializer
public Object[] getCachedCrawlDataValues(String reference)
IJDBCSerializer
PreparedStatement
values (if any) necessary to
execute the SQL obtained with IJDBCSerializer.getCachedCrawlDataSQL()
.
The values must be returned in the expected order.getCachedCrawlDataValues
in interface IJDBCSerializer
reference
- the referencepublic String getReferenceExistsSQL(String table)
IJDBCSerializer
ICrawlData
exists in the given table.getReferenceExistsSQL
in interface IJDBCSerializer
table
- table namepublic Object[] getReferenceExistsValues(String table, String reference)
IJDBCSerializer
PreparedStatement
values (if any) necessary to
execute the SQL obtained with IJDBCSerializer.getReferenceExistsSQL(String)
.
The values must be returned in the expected order.getReferenceExistsValues
in interface IJDBCSerializer
table
- table namereference
- the referencepublic ICrawlData toCrawlData(String table, ResultSet rs) throws SQLException
IJDBCSerializer
ICrawlData
instance.toCrawlData
in interface IJDBCSerializer
table
- table namers
- SQL result setSQLException
- SQL errorCopyright © 2014–2021 Norconex Inc.. All rights reserved.