|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alltimeflashdreamer.filelister.SQLQueryBuilder
Title: SQLQueryBuilder
Description: This abstract class defines the methods required by FileLister to
get the wellformed SQL strings for the various database accesses. Implementing
classes must focus on one specific SQL database server.
Important: Implementing classes need an argument-less constructor.
Organization: All Time Flash Dreamer
Constructor Summary | |
SQLQueryBuilder()
|
Method Summary | |
abstract String |
getChildCountString(String sNodeID)
Builds and returns the SQL string which is needed to get the count of the child files (no directories!) |
abstract String |
getCreateTableString(String sTableName)
Builds and returns the SQL query string used to build an indexing table within the database where the index tables are stored. |
abstract String |
getDropTableString(String sTableName)
Builds and returns the SQL query string used to drop the given table. |
protected FileListerConfig |
getFileListerConfig()
Extending classes need to have access to the config object, therefore this method is protected. |
protected String |
getInsertString(String sTableName)
Returns the insert SQL string for a PreparedStatement class used by FileLister's Dumpers. |
abstract String |
getLimitationString()
Builds and returns the (sub)string of the final SQL string that is responsible for result limitation on the database query's amount of results. |
abstract String |
getListAllTablesString(String sTableName)
Builds and returns the SQL query string used to list all the tables that are somehow like (or match) the given one in the current database. |
protected int |
getLowerLimit()
Returns the lower limit value (which is 0, if not yet set). |
abstract String |
getRenameTableString(String sOldTableName,
String sNewTableName)
Builds and returns the SQL query string used to rename the given table. |
protected ArrayList |
getSearchParameters()
Returns the whole list of SearchParameters instances, each for one (consecutive) search configuration input. |
abstract String |
getUpdateNodeIDString(String sTableName,
String sNodeID,
long lUpdateTime)
Builds and returns the SQL update string which updates the (unique) node with the given id with the given update/reindexing time. |
protected int |
getUpperLimit()
Returns the upper limit value (which is 0, if not yet set). |
abstract String |
getUserSearchString(String sNodeID,
boolean bForResultCount)
Builds and returns the SQL query string used to get the information specified by the user. |
protected boolean |
hasFileListerConfig()
Returns whether a FileListerConfig has already been set or not. |
void |
setFileListerConfig(FileListerConfig config)
Sets the config object to be used by the implementing class. |
protected void |
setLowerLimit(int iLowerLimit)
Sets the internal lower-limit value to iLowerLimit or 0, if lower than 0. |
protected void |
setUpperLimit(int iUpperLimit)
Sets the internal upper-limit value to iUpperLimit or 0, if lower than 0. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SQLQueryBuilder()
Method Detail |
public final void setFileListerConfig(FileListerConfig config)
config
- the object which knows everything about the user inputprotected final boolean hasFileListerConfig()
protected final FileListerConfig getFileListerConfig()
protected final ArrayList getSearchParameters()
protected int getLowerLimit()
protected int getUpperLimit()
public abstract String getUserSearchString(String sNodeID, boolean bForResultCount)
sNodeID
- the id of the directory to be searchedbForResultCount
- whether the SQL string leads to the returning of the
result count only or to the returning of the full table data
public abstract String getCreateTableString(String sTableName)
sTableName
- the name of the index table to be created
public abstract String getListAllTablesString(String sTableName)
sTableName
- the name of the table to find the similar/equal ones
public abstract String getDropTableString(String sTableName)
sTableName
- the name of the table to be dropped
public abstract String getRenameTableString(String sOldTableName, String sNewTableName)
sOldTableName
- the name of the table to be renamedsNewTableName
- the name of the table after the renaming
public abstract String getUpdateNodeIDString(String sTableName, String sNodeID, long lUpdateTime)
sTableName
- the name of the table to be droppedsNodeID
- the id of the (unique) node to be updated with the given
timelUpdateTime
- the time to set to the "lastindexed" field
public abstract String getLimitationString()
public abstract String getChildCountString(String sNodeID)
sNodeID
- the id of the (unique) node to get the children of
protected void setLowerLimit(int iLowerLimit)
iLowerLimit
- the new lower limit, but at least 0protected void setUpperLimit(int iUpperLimit)
iUpperLimit
- the new upper limit, but at least 0protected final String getInsertString(String sTableName)
sTableName
- the name of the table to insert entries into
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |