|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Creates SQL statements appropriate for the database in use.
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. |
Method Detail |
public void init(java.sql.Connection con, java.lang.String tableName)
con
- Connection to usetableName
- database table name to usepublic java.sql.PreparedStatement getTranslationStmt(java.lang.String key)
key
- to lookup
public java.sql.PreparedStatement getTranslationStmt()
public java.lang.String getTranslationStmt(Translation t)
t
- Translation record, non-null fields will be used in WHERE
clause of select statements
public java.sql.PreparedStatement getLookupStmt(java.lang.String key)
key
- to lookup
public java.sql.PreparedStatement getInsertStmt(Translation t)
t
- Translation
public java.sql.PreparedStatement getUpdateStmt(Translation t)
t
- Translation
public java.sql.PreparedStatement getLastIDStmt(Translation t)
t
- Translation which was inserted last. Value is stored in column ID.
public java.lang.String getCreateTableStmt(java.lang.String tableName)
tableName
- table which will hold the lex.
public java.lang.String getCreateIndexStmt(java.lang.String tableName)
tableName
- on which index should be created
public java.lang.String getWildcard()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |