public class TextSearch extends java.lang.Object implements UpgConstants, ScriptApp
Util
for sql statements to implement text search
on a table or column.DB2, doNotUpdateACTION, doNotUpdateALNDOMAIN, doNotUpdateAPPLICATIONAUTH, doNotUpdateAUTOKEY, doNotUpdateCONDITION, doNotUpdateCONTRACTPROPERTY, doNotUpdateCONTRACTTYPE, doNotUpdateCROSSOVERDOMAIN, doNotUpdateDOCTYPES, doNotUpdateLANGUAGE, doNotUpdateMAXAPPS, doNotUpdateMAXCONDDETAIL, doNotUpdateMAXCONTROLVALUE, doNotUpdateMAXDOMAIN, doNotUpdateMAXLOGAPPENDER, doNotUpdateMAXLOGGER, doNotUpdateMAXMENU, doNotUpdateMAXMESSAGES, doNotUpdateMAXMODULES, doNotUpdateMAXPROP, doNotUpdateMAXPROPVALUE, doNotUpdateMAXROLE, doNotUpdateMAXSEQUENCE, doNotUpdateMAXSERSECURITY, doNotUpdateMAXSERVICE, doNotUpdateMAXTABLEDOMAIN, doNotUpdateMAXVARS, doNotUpdateMAXVARTYPE, doNotUpdateMXCOLLAB, doNotUpdateMXCOLLABREF, doNotUpdateNUMERICDOMAIN, doNotUpdateNUMRANGEDOMAIN, doNotUpdatePORTLET, doNotUpdatePRICALC, doNotUpdateSECURITYRESTRICT, doNotUpdateSIGOPTION, doNotUpdateSYNONYMDOMAIN, doNotUpdateTAXTYPE, doNotUpdateWORKPRIORITY, doNotUpdateWORKTYPE, doNotUpdateWPEDITSETTING, messageCache, NEWONLY, OLDANDNEW, OLDONLY, ORACLE, SQLINET, SQLMICROSOFT, SQLSERVER, SYSDATATABLES, SYSTEMTABLES, UNKNOWN
PauseLogging, Redirect, RedirectLine, ResumeLogging, ScriptApp, ScriptAppClose, ScriptAppComment, WarningLogOnly
Constructor and Description |
---|
TextSearch(Util util,
java.sql.Connection con,
java.lang.Object owner)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
adjustTextSearchOneTable(java.util.HashMap objInfo)
After a table has been altered or rebuilt, determine whether the table or any of its
columns needs to be enabled or disabled for rich text search.
|
void |
doWait(java.lang.Integer milli)
Wait the specified number of milliseconds.
|
void |
enableTextSearchAllTables()
Enable text search for all tables/columns that have it flagged.
|
int |
getNumberOfCollections()
Return the number of collections - DB2 specific method.
|
static java.lang.String |
getRichTextCreateIndexStatement(java.sql.Connection con,
int dbOut,
java.lang.String ixname,
java.lang.String tbname,
java.lang.String colName,
boolean multilang,
java.lang.String langColumnName,
java.lang.String storageClause) |
static java.lang.String |
getRichTextCreateIndexStatement(java.sql.Connection con,
ServerType server,
java.lang.String ixname,
java.lang.String tbname,
java.lang.String colName,
boolean multilang,
java.lang.String langColumnName,
java.lang.String storageClause) |
static java.lang.String |
getRichTextCreateIndexStatement(java.sql.Connection con,
java.lang.String ixname,
java.lang.String tbname,
java.lang.String colName,
boolean multilang,
java.lang.String langColumnName,
java.lang.String storageClause) |
boolean |
isTextSearchingEnabled()
Is there an active text searching process?
|
void |
restartTextJobs()
Restart Oracle Text jobs.
|
void |
setDB2PrintStream(java.io.PrintStream db2Out,
java.io.PrintStream db2Out2)
Set value for
db2TextOut and (optionally)
db2TextOut2 . |
void |
startTextSearchJobs()
Start text search jobs from scratch.
|
void |
stopTextSearchJobs(boolean dropProcedures,
boolean doWait)
Stop text search jobs.
|
public TextSearch(Util util, java.sql.Connection con, java.lang.Object owner)
util
- con
- owner
- The class that is constructing TextSearch.
This should be an instance of CommonShell or UpdateDB.java.lang.Exception
public boolean isTextSearchingEnabled() throws java.lang.Exception
java.lang.Exception
public void setDB2PrintStream(java.io.PrintStream db2Out, java.io.PrintStream db2Out2)
db2TextOut
and (optionally)
db2TextOut2
. If this is not called then
these both default to null and db2text statements are executed
immediately rather than output to a stream.db2Out
- Print Stream for db2text commands.
Usually this method is not called.
See javadocs for db2TextOut
.db2Out2
- Second Print Stream for db2text commands,
when output needs to go to two different streams.
If output needs to go to only one stream, then
db2Out will be non-null and
db2Out2 will be null.public void stopTextSearchJobs(boolean dropProcedures, boolean doWait) throws java.lang.Exception
dropProcedures
- If true, this method also attempts to drop the maximo text search procedures.doWait
- If true, then if the first try at stopping the jobs is not successful, the method
will continue trying for 2 minutes before giving up.java.lang.Exception
public void doWait(java.lang.Integer milli) throws java.lang.Exception
milli
- java.lang.Exception
public int getNumberOfCollections() throws java.lang.Exception
java.lang.Exception
public void startTextSearchJobs() throws java.lang.Exception
java.lang.Exception
public void restartTextJobs() throws java.lang.Exception
java.lang.Exception
public void enableTextSearchAllTables() throws java.lang.Exception
public void adjustTextSearchOneTable(java.util.HashMap objInfo) throws java.lang.Exception
objInfo
- The table and column metadata, from getObjectMeta
.java.lang.Exception
Util.getIndexMeta(java.lang.String, boolean)
,
Util.enableRichTextSearch(String, String, String, HashMap, boolean)
,
Util.disableRichTextSearch(java.lang.String, java.lang.String, java.lang.String)
,
Util.getTextSearchIndexForColumn(java.lang.String, java.lang.String, java.util.TreeMap)
,
Util.activateRichTextSearch(java.util.ArrayList<java.lang.String>, java.lang.String, boolean)
public static java.lang.String getRichTextCreateIndexStatement(java.sql.Connection con, java.lang.String ixname, java.lang.String tbname, java.lang.String colName, boolean multilang, java.lang.String langColumnName, java.lang.String storageClause) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String getRichTextCreateIndexStatement(java.sql.Connection con, int dbOut, java.lang.String ixname, java.lang.String tbname, java.lang.String colName, boolean multilang, java.lang.String langColumnName, java.lang.String storageClause) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String getRichTextCreateIndexStatement(java.sql.Connection con, ServerType server, java.lang.String ixname, java.lang.String tbname, java.lang.String colName, boolean multilang, java.lang.String langColumnName, java.lang.String storageClause) throws java.sql.SQLException
java.sql.SQLException