|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecttextmaven.dictionaries.MySQLStatementFactory
Creates and instantiates statements appropriate for the MySQL
| Field Summary |
| Fields inherited from interface textmaven.Globals |
C_ATTR_CLASSNAME, C_DICT_BASE_TYPE, C_DICT_TYPE, C_SERVER_BASE_TYPE, C_STEMMER_BASE_TYPE, C_WRITER_BASE_TYPE, CONFIG_FILE, DEFAULT_SENTENCES, DEFAULT_SEPARATOR, NEW_PARA, T_COL_DICTIONARY, T_COL_HOMONYMID, T_COL_ID, T_COL_LEXKEY, T_COL_TRANSLATION, T_COL_WORDCLASS, VERBOSE |
| Constructor Summary | |
MySQLStatementFactory()
|
|
| Method Summary | |
java.lang.String |
getCreateIndexStmt(java.lang.String tableName)
Returns the statement to create the index on the specified the table. |
java.lang.String |
getCreateTableStmt(java.lang.String tableName)
Returns the statement to create the table representing the lex. |
java.sql.PreparedStatement |
getInsertStmt(Translation t)
Returns an executable prepared INSERT statement to insert the given translation. |
java.sql.PreparedStatement |
getLastIDStmt(Translation t)
Returns the unique id (field nr) of the record which was last inserted. |
java.sql.PreparedStatement |
getLookupStmt(java.lang.String key)
Returns an executable prepared SQL SELECT statement to check whether the given key does exist in the database |
java.sql.PreparedStatement |
getTranslationStmt()
Returns an executable prepared SQL SELECT statement to lookup the translation associated with the given key |
java.sql.PreparedStatement |
getTranslationStmt(java.lang.String key)
Returns an executable prepared SQL SELECT statement to lookup the translation associated with the given key |
java.lang.String |
getTranslationStmt(Translation t)
Returns an executable SQL statement as string which upon execution returns all database records matching the non-null fields of the given Translation instance. |
java.sql.PreparedStatement |
getUpdateStmt(Translation t)
Returns an executable prepared UPDATE statement to update the given translation. |
java.lang.String |
getWildcard()
Returns wildcard string for the specific database. |
void |
init(java.sql.Connection con,
java.lang.String tableName)
Initializes the factory instance with the connection to use and the table name to be used for the SQL statements. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MySQLStatementFactory()
| Method Detail |
public void init(java.sql.Connection con,
java.lang.String tableName)
ISQLStatementFactory
init in interface ISQLStatementFactorycon - Connection to usetableName - database table name to usepublic java.sql.PreparedStatement getTranslationStmt(java.lang.String key)
ISQLStatementFactory
getTranslationStmt in interface ISQLStatementFactorykey - to lookup
public java.sql.PreparedStatement getTranslationStmt()
ISQLStatementFactory
getTranslationStmt in interface ISQLStatementFactorypublic java.lang.String getTranslationStmt(Translation t)
ISQLStatementFactory
getTranslationStmt in interface ISQLStatementFactoryt - Translation record, non-null fields will be used in WHERE
clause of select statements
public java.sql.PreparedStatement getLookupStmt(java.lang.String key)
ISQLStatementFactory
getLookupStmt in interface ISQLStatementFactorykey - to lookup
public java.sql.PreparedStatement getInsertStmt(Translation t)
ISQLStatementFactory
getInsertStmt in interface ISQLStatementFactoryt - Translation
public java.sql.PreparedStatement getUpdateStmt(Translation t)
ISQLStatementFactory
getUpdateStmt in interface ISQLStatementFactoryt - Translation
public java.sql.PreparedStatement getLastIDStmt(Translation t)
ISQLStatementFactory
getLastIDStmt in interface ISQLStatementFactoryt - Translation which was inserted last. Value is stored in column ID.
public java.lang.String getWildcard()
ISQLStatementFactory
getWildcard in interface ISQLStatementFactorypublic java.lang.String getCreateTableStmt(java.lang.String tableName)
ISQLStatementFactory
getCreateTableStmt in interface ISQLStatementFactorytableName - table which will hold the lex.
public java.lang.String getCreateIndexStmt(java.lang.String tableName)
ISQLStatementFactory
getCreateIndexStmt in interface ISQLStatementFactorytableName - on which index should be created
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||