User 22c88daf92
07-12-2012 02:11:06
hello!
Usually, we do search as following:
public static int[] subStrucSearch(String queryStruc)
{
JChemSearch jcs = new JChemSearch();
JChemSearchOptions jcSearchOptions = new JChemSearchOptions(SearchConstants.SUBSTRUCTURE);
int hitSum=0;
int[] hitID=null;
try {
jcs.setStructureTable(structTableName);
jcs.setQueryStructure(queryStruc);
jcs.setSearchOptions(jcSearchOptions);
jcs.setConnectionHandler(getConnJCB());
jcs.run();
hitSum=jcs.getResultCount();
.........................................................
Every time we call this search method in our software, we must initialize these setting again(as red color code). So, we want to know whether there has a more efficiency method to initialize these setting once?
Is there any java examples? Thanks!